This content has been marked as final.
Show 3 replies
-
1. Re: Add a4j:include dynamically from java
mosheelisha Feb 26, 2009 4:52 AM (in response to yandav)Hey,
I am having the same problem. Did you find a solution? -
2. Re: Add a4j:include dynamically from java
yandav Mar 2, 2009 8:30 AM (in response to yandav)No sorry mate.
I got no more hair on my head from this.
I tried to do something else using YUI tabs
adding a tab from javascript and setting it's data src to a url
but there is a different problem with doing that; The viewstate id is causing problems since it's generating another view id and reseting it for all others. :(
If you have something please let me know.
Thanks. -
3. Re: Add a4j:include dynamically from java
mosheelisha Mar 3, 2009 4:40 AM (in response to yandav)In my case I needed dynamic tabs but all the tabs had the same content so I did it using c:forEach tag:
r="http://richfaces.org/rich" c="http://java.sun.com/jstl/core"
<r:tabPanel id="systemHealthTabPanel" switchType="ajax" selectedTab="#{healthMonitor.selectedSubSystemID}" > <c:forEach items="#{healthMonitor.subSystemTabs}" var="subSystemTab"> <r:tab name="#{subSystemTab.id}" label="#{subSystemTab.label}" action="#{healthMonitor.buildHealthData}"> <f:subview id="subSystemSubview#{subSystemTab.id}" rendered="#{healthMonitor.selectedSubSystemID == subSystemTab.id}"> <a4j:include id="subSystemTabInclude" viewId="/pages/systemHealth/systemHealthPerSubSystem.xhtml"/> </f:subview> </r:tab> </c:forEach> </r:tabPanel>
The subSystemTabs return an array of SubSystemTab which has two fields id and label.