<br>Actually I can only talk from the javascript side here.<br>The main issue is that a PPR response does not include<br>a ViewState element, instead the viewState is delivered<br>by the separate viewState xml element.<br>
<br>Here is how I bypassed the problem for now for MyFaces, <br>I simply check all elements which are processed (issuer, and updated ones)<br>for embedded forms, after the entire updating is done, and check if the viewstate is set, if not<br>
we have to attach the viewstate.<br><br>The limitation of this approach however is that if a user explicitely issues<br>a cross portlet render directive, there is no way this will work, but however<br>if that is issued the entire lifecycle fails, because it simply is not part of the viewRoot<br>
which is processed. So this is a non issue for me.<br><br>So far this approach works really well, and I am finally able to do stuff like this:<br><br><meta http-equiv="content-type" content="text/html; charset=utf-8"><a class="moz-txt-link-freetext" href="http://pastebin.com/TmFGtQyv">http://pastebin.com/TmFGtQyv</a>
<br><br>This is more or less the usecase the user had who pointed me towards this.<br>Not sure if this approach is valid within the spec (the TCK probably will tell), <br>but it is a valid usecase which has to be covered.<br>
<br>In my opinion the spec here is at fault, and to my testing Mojarra also has a similar bypass code<br>but it only works on direct form elements being rendered, instead of checking for embedded forms also.<br><br><br>Werner<br>
<br>
<br><br><br><div class="gmail_quote">On Tue, May 11, 2010 at 11:18 PM, Martin Marinschek <span dir="ltr">&lt;<a href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 5/6/10, Alexander Smirnov &lt;<a href="mailto:asmirnov@exadel.com">asmirnov@exadel.com</a>&gt; wrote:<br>
&gt; Let me point out that Mojarra already takes care for state in AJAX<br>
&gt; requests in the server-side saving. In the case of partial request,<br>
&gt; ServerSideStateHelper ( see line 196 ) reuses view state and doesn&#39;t<br>
&gt; change content of the javax.faces.ViewState parameter, so any request<br>
&gt; from page should restore proper state because it has the same id as it<br>
&gt; was rendered in AJAX request.<br>
&gt; Therefore, that bug applicable for client-side state only, but updating<br>
&gt; state parameter for ALL forms on the page could cause problem for portal<br>
&gt; environment there each portlet keeps its own state that should not be<br>
&gt; updated by requests from others...<br>
<br>
</div>Interesting problem.<br>
<br>
So we are rendering multiple forms, and in one case, the forms belong<br>
to one application, and in another case, they are from different<br>
applications. How can we find out which forms belong to our<br>
application? Portal environments will namespace their content, but<br>
there is no way for us to find out - right? Would we need to keep<br>
track of our forms during rendering?<br>
<br>
best regards,<br>
<font color="#888888"><br>
Martin<br>
</font></blockquote></div><br>