OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [wsrp] Ajax and WSRP


Hi Satish,

By render params, I'm assuming that you are talking about navigationalState.

If an impl chooses to push such state into links, the consumer will have
to return that state along in response to the XHR, and update the state 
in the browser.

For example, let's say a user interacted with P1 which caused an XHR. P1
fired an event, and P2 handled it. The state of P1 and P2 now changed,
which may make the state stored by the consumer in URLs stale.

The consumer has a few choices:

a. Include its own state in the XHR response, and run some javascript on
the client side to replace all state stored. In this case, the response 
from the consumer to the browser may look like

<consumer-message>
   <update-nav-state>
     <current-state>abc</current-state>
     <new-state>xyz</new-state>
   </update-nav-state>
   <replace-markup inskey='p2'><![CDATA[ ... ]]></replace-markup>
   <activate-callback inskey='p1'>
     <wsrp-fragment><![CDATA[ ... ]]></wsrp-fragment>
   </activate-callback>
</consumer-message>

The consumer could use some javascript to do a find/replace of the state

document.body.innerHTML = document.body.innerHTML.replace("abc",
                                     "xyz");

The exact details depend on the consumer's implementation.

b. Set new cookies containing the state. Next time, when a request comes
in, the consumer will get state stored in the URL plus these cookies.

There may be other possibilities. My goal was to leave open a channel 
for consumers to return consumer-specific data to the browser along with 
the portlet's response. Otherwise, consumer's won't be able to process 
state updates and events.

The idea of a new window state seems to be a common work-around to 
address some of the Ajax use cases. There is one key difference between 
the proposal and a new window state like a "fragment" window state. 
Window state (for that matter, the mode too) applies to the entire 
portlet's markup. When portlets are using Ajax, they are using it to 
update just a part of the portlet's markup itself. Semantically it would 
be confusing to have a portlet rendered in wsrp:normal state rendering a 
part of itself using wsrp:fragment window state. There are a few other 
issues with using a window state. Secondly, window state on a URL forces 
the consumer to change the current state of the portlet, which means 
that such URLs can't be used to fetch/update data within the porotlet's 
markup.

I will update the slides with an analysis of the new window state, since 
it seems to be a common one in some portals.

Subbu

Ramaswamy, Satish wrote:
> Subbu,
> 
> I took a quick look at the proposal. 
> 
> It is not clear to me how the portlet render parameters will be updated
> in implementations that maintain render parameters as query parameters.
> I must be missing something. It is late on a Friday :)
> 
> It seems to me that the window state is a "hint" to the portlet to
> generate the "kind" of markup. Why not add a new window state
> (wsrp:fragment?) that gives the hint to the consumer that it is not
> generating an aggregated page and also serves as a hint to  the portlet
> to generate the "ajax" style fragments with the caveats you have
> outlined ?
> 
> Thanks
> Satish 
> 
> -----Original Message-----
> From: Subbu Allamaraju [mailto:subbu@bea.com] 
> Sent: Friday, April 28, 2006 3:33 PM
> To: wsrp
> Subject: Re: [wsrp] Ajax and WSRP
> 
> Just uploaded the following documents:
> 
> http://www.oasis-open.org/apps/org/workgroup/wsrp/download.php/17891/aja
> x_use_cases.ppt
> http://www.oasis-open.org/apps/org/workgroup/wsrp/download.php/17892/aja
> x_proposal.ppt
> 
> If you happen to review these before the F2F, please reply.
> 
> Regards,
> Subbu
> 
> Michael Freedman wrote:
>> Thanks.  Though the use cases are also important, if you are stressed 
>> for time you might want to pick the most severe use case to illustrate
> 
>> the worst case and provide a strawman to address it (assuming you
> think 
>> that simpler use cases would be covered by such a solution).
>>   -Mike-
>>
>> Subbu Allamaraju wrote:
>>
>>> I'm working on use cases, and current possibilities this week. I will
> 
>>> try to include a strawman for the F2F.
>>>
>>> Subbu
>>>
>>> Michael Freedman wrote:
>>>
>>>> As a (good) portion of next weeks F2F concerns discussing how we 
>>>> might augment WSRP 3.0 to better support Ajax style applications, is
> 
>>>> it possible if one or more of the proponents e-mail us a stawman 
>>>> proposal by the end of this week, so we don't have to start 
>>>> discussing from scratch?  I think this topic gets technically 
>>>> complicated quickly and therefore may be difficult to make 
>>>> focused/linear progress unless there is structure to our 
>>>> thinking/discussions.
>>>>    -Mike-
>>>>
>>>>
> ---------------------------------------------------------------------
>>>> To unsubscribe from this mail list, you must leave the OASIS TC that
>>>> generates this mail.  You may a link to this group and all your TCs 
>>>> in OASIS
>>>> at:
>>>>
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
>>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  You may a link to this group and all your TCs in
> OASIS
> at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  You may a link to this group and all your TCs in OASIS
> at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php 
> 





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]