FatFractal customer forums



Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jonnycools

Pages: 1 2 [3] 4 5
31
NoServer Questions and Answers / Re: Data import
« on: February 24, 2014, 01:14:29 PM »

32
NoServer Questions and Answers / Re: Sorting instances in GrabBag
« on: February 24, 2014, 09:34:42 AM »
The secret is registering for notifications on forum posts and replies.

I find other users ask the most interesting questions.

33
NoServer Questions and Answers / Re: Sorting instances in GrabBag
« on: February 23, 2014, 10:22:21 PM »
Unofficial response

Check out the last post on this thread

https://forum.fatfractal.com/forum/index.php?topic=70.0

34
NoServer Questions and Answers / Re: Core Data Sync
« on: February 23, 2014, 09:04:58 AM »
Unofficial response.

Check out this thread about core data syncing earlier in the forums. It's not a tutorial but Italy point you in the right direction.

https://forum.fatfractal.com/forum/index.php?topic=40.msg206#msg206

35
Servlets/Ruby Questions and Answers / Re: Java Servlet Vs. NoServer
« on: February 21, 2014, 08:05:18 AM »
I know learning all about the java servlet. It's a bit too raw for my tastes. There's just too much functionality I would I loose. Perhaps later when I get a handle things I'll revisit the use of a servlet to augment the function of NoServer.

Thanks again for responding

36
Servlets/Ruby Questions and Answers / Java Servlet Vs. NoServer
« on: February 13, 2014, 08:12:35 PM »
Whats the main differences between the servlet and NoServer?

If I choose to use the servlet to augment my NoServer would I have to implement my own solutions for user authentication, permissions, native SDK, queries, grab bags, server code and such.

It looks like i'd be responsible for managing my own SQL databases? Would that mean I would have to forgo the Grabbag and BackReferences in favor of my own SQL.

Is it a modular approach where I can pick and choose which components I want to use. Like event handlers or client side deserializer?

Where could I find more documentation about this?

37
NoServer Questions and Answers / Re: Retrieve Handler Issue
« on: January 31, 2014, 04:16:56 PM »
I know i'm needy, one last question.

Code: [Select]

exports.venueDeleteAsync = function()
{

var venue = ff.getEventHandlerData();

var clean = ff.getArrayFromUri(venue.ffUrl + "/account or permission or images or menu or BackReferences.Album.creator or BackReferences.Like.object or BackReferences.Review.object or BackReferences.Subscription.object or BackReferences.Event.creator or BackReferences.Employee.employer or BackReferences.EventRequest.object or BackReferences.Verification.object or BackReferences.WishListItem.object or BackReferences.Checkin.venue or BackReferences.Stream.creator or BackReferences.Activity.creator or BackReferences.Report.object or BackReferences.Photo.creator BackReferences.EventGroup.creator or BackReferences.Comment.creator");

for (var i = 0; i < clean.length; i++)
{

ff.deleteObj(clean[i]);

}

}


Could I do this async after the object has been deleted? I.E would the venue's ffUrl still be valid to find references or would I need to use POST or PRE? I'm scarred to use pre as I feel it would be excited before validation.

38
NoServer Questions and Answers / Re: Retrieve Handler Issue
« on: January 31, 2014, 04:13:04 PM »
Never mind, I know its not what I want (wishful thinking). Thanks for the help. I don't see any need to rethink as this works just fine. Its finally coming together

39
NoServer Questions and Answers / Re: Retrieve Handler Issue
« on: January 31, 2014, 03:49:28 PM »
The new API you released this morning has fixed the issue. Don't know if I'm actually getting anything as there are no objects in the like or subscription collections, but that's a problem for another day.

Thanks!

Swapped to this:

Code: [Select]

exports.promoterRetrievePost = function()
{

var user = ff.getActiveUser();

var promoter = ff.getEventHandlerData();

promoter.like = ff.getObjFromUri("/Like/(ffRefs.url eq '" + promoter.ffUrl + "' and ffRefs.url eq '" + user.ffUrl + "')");

promoter.subscription = ff.getObjFromUri("/Subscription/(ffRefs.url eq '" + promoter.ffUrl + "' and ffRefs.url eq '" + user.ffUrl + "')");

}


40
NoServer Questions and Answers / Re: Retrieve Handler Issue
« on: January 31, 2014, 03:38:41 PM »
Code: [Select]

exports.promoterRetrievePost = function()
{

var user = ff.getActiveUser();

var promoter = ff.getEventHandlerData();

promoter.like = ff.getObjFromUri("/Like/(ffRefs.url eq '" + promoter.ffUrl + "' and ffRefs.url eq '" + user.ffUrl + "')");  //ff.getObjFromUri(promoter.ffUrl + "/BackReferences.Like.object/(createdBy eq '"  + user.guid + "')");

promoter.subscription = ff.getObjFromUri("/Subscription/(ffRefs.url eq '" + promoter.ffUrl + "' and ffRefs.url eq '" + user.ffUrl + "')");

}


I'm also trying this as well.

The thing is the like and subscription is unique to the user. Getting all of them is just a waste as their could be thousands. Trust me I have trolled that post about alias. I read every post on here.

Before you rethink that. If I update a property on the event would the query use that value or the value before. Say I updated the trending value would the new value be available for query, basically allowing me to personalize the trending value for the user?

41
NoServer Questions and Answers / Retrieve Handler Issue
« on: January 31, 2014, 03:24:43 PM »
I'm using a retrieve event handler to load transient properties: Like and Subscription. Both have references to the event as object.

When I attempt to access the BackReferences grabbag is the retrieve handler being executed?

I've tried several things but I'm lost.

Code: [Select]

CREATE HANDLER EventRetrievePost POST ON /Event Retrieve AS javascript:require('scripts/event').eventRetrievePost();


Code: [Select]

exports.eventRetrievePost = function()
{

var user = ff.getActiveUser();

var event = ff.getEventHandlerData();

event.like = ff.getObjFromUri(event.ffUrl + "/BackReferences.Like.object/(createdBy eq '"  + user.guid + "')");

event.subscription = ff.getObjFromUri(event.ffUrl + "/BackReferences.Subscription.object(createdBy eq '" + user.guid + "')");

}


I'm getting this error whenever i make most CRUD operations to the database, that aren't even related to /Event. I was trying to delete an FFUserGroup and I got three of these errors.

Quote

FatFractal.getArrayFromUri 500, {"result":null,"statusMessage":"Recursive event handler guard - count for CREATE on /Event has reached 4"}

Error 500: {"result":null,"statusMessage":"Recursive event handler guard - count for CREATE on /Event has reached 4"}
FatFractal.js:745

xmlHTTP : {"readyState":4,"timeout":0,"onloadend":null,"withCredentials":false,"status":500,"upload":{},"responseType":"","response":"{\"result\":null,\"statusMessage\":\"Recursive event handler guard - count for CREATE on /Event has reached 4\"}","statusText":"Internal Server Error","responseText":"{\"result\":null,\"statusMessage\":\"Recursive event handler guard - count for CREATE on /Event has reached 4\"}"}



The console logs are littered with entries like this

Quote

15:07:28 at org.mozilla.javascript.gen._Event_RETRIEVE_EventRetrievePost_16.call(/Event.RETRIEVE.EventRetrievePost)
15:07:28 at org.mozilla.javascript.gen._Event_RETRIEVE_EventRetrievePost_16.exec(/Event.RETRIEVE.EventRetrievePost)


I've made no attempt to make any CRUD operations with the /Events collection. I should not that I get that error for all Collections that I defined retrieve handlers for. All of the handlers are similar.

42
NoServer Questions and Answers / Re: Quick permissions question
« on: January 31, 2014, 10:45:05 AM »
Seeing as deleteAllForQuery does utilize traversals is there anyway to delete grab bags or references without retrieving them first. This could potentially be lots of objects

43
NoServer Questions and Answers / Re: Quick permissions question
« on: January 31, 2014, 10:31:27 AM »
Also does getResultCountForQuery also not support the full query syntax. Like backReferences and such. I'm trying to use it to see if an object is contained in a grabbag and its throwing the same exception

44
NoServer Questions and Answers / Re: Quick permissions question
« on: January 31, 2014, 10:28:50 AM »
So break up the deleteAllForQuery.

Does the delete handler have to be PRE, POST or ASYNC, Can I use its FFURL to get at it references in any of these or just PRE

So i've i try to query in a post handler using the ffurl will it work or just return nothing?

45
NoServer Questions and Answers / Re: Quick permissions question
« on: January 31, 2014, 09:57:50 AM »
Code: [Select]

exports.deletePermission = function()
{

var permission = ff.getEventHandlerData();

ff.deleteAllForQuery(permission.ffUrl + "/account or activity or administrator or comment or edit or employee or event or eventGroup or eventRequest or gallery or menu or reservation or stream or transaction");

}


I've tried this as both a pre and post delete handler but it keeps giving me a

Delete request failed with status code 500 statusMessage {"result":null,"statusMessage":"getCursorForQuery: single-collection queries only - eg. /Collection/(query)"}

All the or are the REFERENCES to an FFUserGroup. it works in the console but not here. I'm getting that message in a lot of other places too

Just to clarify once the object has been deleted on post I can't use is ffUrl anymore to clean up related data?

Pages: 1 2 [3] 4 5
Copyright © FatFractal customer forums