-
1. Re: Re-rendering a component is executing the page load action.
healeyb Jan 6, 2013 9:41 AM (in response to fjkjava)I'm not a Seam user myself (maybe Brian Leathem could comment on this) however the JSF preRenderView event on which this
Seam action might be based, certainly does execute for an ajax request. I use an abstract class from which all my backing beans
inherit containing a function like this:
public boolean isAjaxRequest() {
return FacesContext.getCurrentInstance().getPartialViewContext().isAjaxRequest();
}
and then in my page load action method I check the condition and process accordingly, there is typically processing that you only
want to execute on a full page load. Whether this will work in your situation should be easily testable.
I was initially surprised that it works like this, but there it is. Presumably the change is caused by upgrading from JSF 1 - JSF 2,
and using the built in JSF 2 ajax functionality instead of a4j.
Regards,
Brendan.
-
2. Re: Re-rendering a component is executing the page load action.
omonaija Jan 9, 2013 6:48 PM (in response to fjkjava)This is similar to a Seam 2.3 bug addressed in https://issues.jboss.org/browse/JBSEAM-4976
One workaround is to pass the conversation id as a hidden value. Add this somewhere in your h:form: <input type="hidden" name="cid" value="#{conversation.id}" />
Another workaround is to disable partial state saving. Add this to your web.xml file:
<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>false</param-value>
</context-param>
-
3. Re: Re-rendering a component is executing the page load action.
fjkjava Jan 10, 2013 10:35 AM (in response to omonaija)Thanks Brendan and Omo, I will try your suggestions.