-
1. Re: How to load partial page content dynamically.
lightguard Apr 10, 2012 11:06 AM (in response to hantsy)Probably something wrong in Mojarra.
-
2. Re: How to load partial page content dynamically.
hantsy Apr 10, 2012 9:46 PM (in response to lightguard)Richfaces 3.3 provided a4j:include which can load the content dynamically but it is not ported in Richfaces4.x...
I searched this topic by Google,and got that MyFaces fixed the problem, but in Mojarra, there is still an open issue about this.
-
3. Re: How to load partial page content dynamically.
lightguard Apr 10, 2012 10:07 PM (in response to hantsy)Sorry Hansty, you'll either need to swap out Mojarra in AS7 or take it up with the Mojarra team (or see if a newer version fixed the problem)
-
4. Re: How to load partial page content dynamically.
hantsy Apr 10, 2012 10:37 PM (in response to lightguard)Thanks for your suggestions.
-
5. Re: How to load partial page content dynamically.
fastroller Apr 16, 2012 10:03 PM (in response to hantsy)I haven't tried your exact case, but I've had better success with ajax rendering using Richfaces (and a4j). Try either converting your command button to a <a4j:commandButton> or using <a4j:ajax> instead of <f:ajax>. Also, a4j better resolves ids when doing re-rendering such that you don't need a full path. E.g. :form:contentPane becomes contentPane. This in my opinion is much more robust as you can change your page structure without having to revisit all you ajax calls.
Also, you can't do that with partial state saving if you are using a ViewScoped bean. You'll have to turn it off:
<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>false</param-value>
</context-param>
This is because tag handlers run in the restore view phase and will re-create any view scoped bean. This is going to be changed in JSF 2.2.
-
6. Re: How to load partial page content dynamically.
hantsy Apr 23, 2012 10:26 AM (in response to fastroller)I have not any @ViewScoped at all, I alswasy used CDI annoations instead of the JSF scopes...
there are much discussions about the jsf code was generated at build time or render time...