Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to load a4j:outputPanel from DropDown(<h:selectOneMenu>) using ajax call in Richfaces?
    text
    copied!<p>This is related to richfaces 4.0</p> <p>I have two dropdown in my webpage. On selecting item on first DropDown, Second DropDown(Invisible previously) is easily rendered on webpage . </p> <p>On selecting the item in second drop down, I want to render a separate panel(Not able to do this). </p> <p>Problem is that I can render second DropDown on webpage successfully after selecting item from first dropdown, but no panel is rendered when I am selecting second dropDown item . </p> <p>My code is as follows :</p> <pre class="lang-html prettyprint-override"><code> &lt;rich:panel header="Select Operation" style="margin-top: 20px; height: 110px"&gt; &lt;h:panelGrid columns="1"&gt; &lt;h:form&gt; &lt;h:panelGrid columns="4"&gt; &lt;h:outputLabel value="Operation: " style="font-size: small; font-weight: 900"/&gt; &lt;h:selectOneMenu style="margin-left: 10px; width: 150px" value="#{adminBean.currentType}"&gt; &lt;f:selectItem itemValue="0" itemLabel="" /&gt; &lt;f:selectItem itemValue="1" itemLabel="Add New User" /&gt; &lt;f:selectItem itemValue="2" itemLabel="Manage Balance" /&gt; &lt;f:selectItem itemValue="3" itemLabel="Manage Account" /&gt; &lt;a4j:ajax event="valueChange" render="second" execute="@this" /&gt; &lt;/h:selectOneMenu&gt; &lt;h:form&gt; &lt;a4j:outputPanel id="second" layout="block"&gt; &lt;h:outputLabel value="Type : " style="margin-left: 130px; font-size: small; font-weight: bold;" rendered="#{not empty adminBean.currentType}"/&gt; &lt;h:selectOneMenu style="margin-left: 10px; width: 150px" value="#{adminBean.currentItem}" rendered="#{not empty adminBean.currentType}"&gt; &lt;f:selectItem itemValue="0" itemLabel="" /&gt; &lt;f:selectItem itemValue="1" itemLabel="Participant" /&gt; &lt;f:selectItem itemValue="2" itemLabel="Administrator" /&gt; &lt;a4j:ajax event="valueChange" render="rep" execute="@this" /&gt; &lt;/h:selectOneMenu&gt; &lt;/a4j:outputPanel&gt; &lt;/h:form&gt; &lt;/h:panelGrid&gt; &lt;/h:form&gt; &lt;/h:panelGrid&gt; &lt;/rich:panel&gt; &lt;rich:panel style="margin-top: 20px; min-height: 500px"&gt; &lt;a4j:outputPanel id="rep"&gt; &lt;rich:panel rendered="#{not empty adminBean.currentItem}" header="Add Customer"&gt; &lt;h:panelGrid columns="2"&gt; &lt;a4j:commandButton value="Add New" style="width: 70px"&gt;&lt;/a4j:commandButton&gt; &lt;a4j:commandButton value="Delete" style="margin-left: 10px; width: 70px"&gt;&lt;/a4j:commandButton&gt; &lt;/h:panelGrid&gt; &lt;/rich:panel&gt; &lt;/a4j:outputPanel&gt; &lt;/rich:panel&gt; </code></pre> <p>As explained above I want id="rep" to be rendered when selecting item from second . </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload