For what it worth, I'm working on a ERBlog example where the admin is using 
stateful components and the "public" site will use ERRest with the HTML routing 
+ "regular" (non-HTML) route for adding posts and categories. Someone could do 
a D2W version of the admin, and a iPhone app to connect to the ERRest non-HTML 
routes to manage the blog.

> That would be amazing - ERRest certainly is powerful - you have to get the 
> idea about implementation, but once you do I can see there are lots of tricks 
> and patterns to take advantage of.
> 
> I'm interested in exploring the interaction with D2W and HTML/Components, as 
> well as crafting precise filters, adding authentication layers and making 
> safe qualifier APIs
> 
> Glad to help as I move along!
> 
> On Mar 19, 2011, at 12:30 PM, Mike Schrag wrote:
> 
>> there actually is an example in ERXKeyFilter's javadoc as well as in 
>> ERXRouteRequestHandler, but those are not particularly discoverable where 
>> someone actually runs into this issue ... probably there should be a short 
>> rest tutorial written up and put on the wiki.
>> 
>> On Mar 19, 2011, at 12:03 PM, Jesse Tayler wrote:
>> 
>>> sweet.
>>> 
>>> maybe I should put a few examples into the docs - if you're not familiar it 
>>> might be nice to see some code slices.
>>> 
>>> On Mar 18, 2011, at 10:19 PM, Mike Schrag wrote:
>>> 
>>>> .include returns a key filter that corresponds to the next relationship. 
>>>> You can .includeAttributes on that (or whatever else you want to do)
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>> On Mar 18, 2011, at 9:49 PM, Pascal Robert <[email protected]> wrote:
>>>> 
>>>>> I never had to include all properties from a relation, but to get some of 
>>>>> them, I do something like this:
>>>>> 
>>>>> filter.include(InvitationUser.INVITATION.dot(Invitation.YOURPROPERTY1)
>>>>> filter.include(InvitationUser.INVITATION.dot(Invitation.YOURPROPERTY2)
>>>>> ...
>>>>> 
>>>>>> Can't get ERRest to include attributes along a keypath?
>>>>>> 
>>>>>> I show the attributes of the "invitation" relationship, but I wanted 
>>>>>> this filter to include attributes for "invitation.author" - I can only 
>>>>>> get the type and id for "author"?
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> public WOActionResults inboxAction() {
>>>>>>    EOQualifier qual = InvitationUser.USER.eq(user());
>>>>>>    ERXRestFetchSpecification<InvitationUser> fetchSpec = new 
>>>>>> ERXRestFetchSpecification<InvitationUser>(InvitationUser.ENTITY_NAME, 
>>>>>> qual, null, queryFilter(), null, 25);
>>>>>>    ERXKeyFilter filter = ERXKeyFilter.filterWithAll();
>>>>>>    
>>>>>> filter.include(InvitationUser.INVITATION).includeAttributesAndToOneRelationships();
>>>>>>    return response(fetchSpec, filter);
>>>>>> }
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> (
>>>>>> {
>>>>>>    "id" = "1";
>>>>>>    "invitation" = {
>>>>>>        "author" = {
>>>>>>            "type" = "Person";
>>>>>>            "id" = "1";
>>>>>>        };
>>>>>>        "status" = "<com.webobjects.foundation.NSKeyValueCoding$Null>";
>>>>>>        "mtly" = {
>>>>>>            "type" = "Mtly";
>>>>>>            "id" = "27";
>>>>>>        };
>>>>>>        "id" = "1";
>>>>>>        "active" = "true";
>>>>>>        "created" = "2011-01-10 05:00:00 Etc/GMT";
>>>>>>        "type" = "Invitation";
>>>>>>        "name" = "<com.webobjects.foundation.NSKeyValueCoding$Null>";
>>>>>>        "adjusted" = "2011-01-10 05:24:01 Etc/GMT";
>>>>>>    };
>>>>>>    "type" = "InvitationUser";
>>>>>>    "user" = {
>>>>>>        "type" = "Person";
>>>>>>        "id" = "1";
>>>>>>    };
>>>>>> },
>>>>>> {
>>>>>>    "id" = "2";
>>>>>>    "invitation" = {
>>>>>>        "author" = {
>>>>>>            "type" = "Person";
>>>>>>            "id" = "1";
>>>>>>        };
>>>>>>        "status" = "<com.webobjects.foundation.NSKeyValueCoding$Null>";
>>>>>>        "mtly" = {
>>>>>>            "type" = "Mtly";
>>>>>>            "id" = "27";
>>>>>>        };
>>>>>>        "id" = "1";
>>>>>>        "active" = "true";
>>>>>>        "created" = "2011-01-10 05:00:00 Etc/GMT";
>>>>>>        "type" = "Invitation";
>>>>>>        "name" = "<com.webobjects.foundation.NSKeyValueCoding$Null>";
>>>>>>        "adjusted" = "2011-01-10 05:24:01 Etc/GMT";
>>>>>>    };
>>>>>>    "type" = "InvitationUser";
>>>>>>    "user" = {
>>>>>>        "type" = "Person";
>>>>>>        "id" = "1";
>>>>>>    };
>>>>>> }
>>>>>> )
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> Webobjects-dev mailing list      ([email protected])
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca
>>>>>> 
>>>>>> This email sent to [email protected]
>>>>> 
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list      ([email protected])
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com
>>>>> 
>>>>> This email sent to [email protected]
>>>> 
>>> 
>> 
>> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to