Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have two problems:</p> <ul> <li>You have nested forms which result in invalid HTML.</li> <li>You should give ID's to your components.</li> </ul> <p>This should be the code fixed (note that I removed all the unnecessary attributes in order to make the page work as styles):</p> <pre class="lang-html prettyprint-override"><code>&lt;rich:panel id="pnlContainer"&gt; &lt;h:panelGrid columns="1" id="grdSingleCol"&gt; &lt;h:form id="frmData"&gt; &lt;h:panelGrid columns="4" id="grdData"&gt; &lt;h:selectOneMenu 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 render="second" execute="@this" /&gt; &lt;/h:selectOneMenu&gt; &lt;a4j:outputPanel id="second" layout="block"&gt; &lt;h:selectOneMenu value="#{adminBean.currentItem}"&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;!-- check how to render components outside the form --&gt; &lt;a4j:ajax render=":pnlRepContainer:rep" execute="@this" /&gt; &lt;/h:selectOneMenu&gt; &lt;/a4j:outputPanel&gt; &lt;/h:panelGrid&gt; &lt;/h:form&gt; &lt;/h:panelGrid&gt; &lt;/rich:panel&gt; &lt;rich:panel id="pnlRepContainer"&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" /&gt; &lt;a4j:commandButton value="Delete" /&gt; &lt;/h:panelGrid&gt; &lt;/rich:panel&gt; &lt;/a4j:outputPanel&gt; &lt;/rich:panel&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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