-
1. Not rendering on actionListener if I generate a component dynamically
ilya_shaikovsky Apr 18, 2011 6:22 AM (in response to yesudas)whole page refreshed seems because you returning some outcome(pointed to the same page?).
and about first problem - add layout = block to the outputPanel. currently it rendered as span and you have table inside(rendered by panelGrid) - it's incorrect html
-
2. Re: Not rendering on actionListener if I generate a component dynamically
yesudas Apr 18, 2011 7:52 AM (in response to ilya_shaikovsky)ilya
i have added layout=block as you suggested.
Still the problem is existing.
<a4j:outputPanel id="dynamicDataTable" layout="block">
<h:form id="commonForm1">
<h:outputText id="out" value="#{dynamicManagedBean.currentXmlFileName}"/>
<h:panelGrid binding="#{dynamicManagedBean.dynaGrid}"
dir="#{msg.component_dir}" width="100%">
</h:panelGrid>
</h:form>
</a4j:outputPanel>
I added a outputText as highlighted in green.
It is rendering fine.
When the user clicks on region, it will display region.xml.
When the user clicks on country, it will display country.xml.
But, panelGrid is not rendering.
below is the commandlinks for your reference:
<a4j:commandLink value="Region" reRender="dynamicDataTable"
actionListener="#{dynamicManagedBean.loadMenuContent}" id="regioncl">
<f:setPropertyActionListener target="#{dynamicManagedBean.currentXmlFileName}" value="region.xml" />
</a4j:commandLink>
<br /><br />
<a4j:commandLink value="Country" reRender="dynamicDataTable"
actionListener="#{dynamicManagedBean.loadMenuContent}" id="countrycl">
<f:setPropertyActionListener target="#{dynamicManagedBean.currentXmlFileName}" value="country.xml" />
</a4j:commandLink>
-
3. Re: Not rendering on actionListener if I generate a component dynamically
yesudas Apr 28, 2011 2:32 AM (in response to ilya_shaikovsky)Hi ilya,
I have created a reproducable example with an xhtml page and backing bean and attached here.
It will help you to figure out the problem easily.
Please help me to solve this issue.
Let me know if you require any config files like web.xml, faces-config.xml.
-
renderDynamicComponent.xhtml.zip 776 bytes
-
TestingBean.java.zip 875 bytes
-