1 Reply Latest reply on May 29, 2013 9:32 PM by Brian Leathem

    Issue with Dynamic Toggle panel Item

    Bablu Kejriwal Newbie

      Hi,

       

      I am using RF 4.3.1 and JSF 2.1.17

       

      I have a toggle panel and i am generating the toggle panel item dynamically through a4j:repeat.

      The toggle panel item generates fine.

      Toggle panel item has a output text and input text box.

       

      I have a a4j command button outside the toggle panel.

      On click of the button, i am looking up the panel in viewroot.

      Then i am iterating over it's children to find the panel item and the input text inside the panel item.

      I am able to locate the input text but the value is coming as null.

       

      While iterating over the toggle panel i noticed that it has only the active toggle panel item and not all the panel item generated in repeat.

      Is this the correct behaviour?

       

      If i have static toggle item instead of dynamic panel, everything works fine.

      My project has a requirement for dynamic panel items.

       

      I need to get the value of text box,

      Can somebody help?

      TIA

       

      I am attaching the piece of code to generate panel item:

       

      <rich:panel styleClass="wizard" style="height:400px;">

                                                                                                <f:facet name="header">

                                                                                                          <h:outputText value="Registration" />

                                                                                                </f:facet>

                                                                                                <rich:togglePanel switchType="server" id="questionPanel"

                                                                                                          itemChangeListener="#{registrationBean.itemChangeListenerForWizard}">

                                                                                                          <a4j:repeat value="#{registrationBean.pageList}" var="item"

                                                                                                                    keepSaved="true" id="pagerepeat">

                                                                                                                    <rich:togglePanelItem name="#{item.pageName}" id="page">

                                                                                                                              <a4j:outputPanel id="outputPanel" >

                                                                                                                                        <h:outputText value="Only 1 outputText: " id="outputText" />

                                                                                                                                        <h:inputText id="inputText" />

                                                                                                                                        <div class="navPanel"

                                                                                                                                                  style="width: 100%; position: relative;">

                                                                                                                                                  <a4j:commandButton value="&lt;&lt;Previous"

                                                                                                                                                            style="float:left">

                                                                                                                                                            <rich:toggleControl targetItem="@prev" event="click" />

                                                                                                                                                  </a4j:commandButton>

                                                                                                                                                  <a4j:commandButton style="float:right"

                                                                                                                                                            value="Next &gt;&gt;">

                                                                                                                                                            <rich:toggleControl targetItem="@next" event="click" />

                                                                                                                                                  </a4j:commandButton>

                                                                                                                                                                        </div>

                                                                                                                              </a4j:outputPanel>

                                                                                                                    </rich:togglePanelItem>

                                                                                                          </a4j:repeat>

                                                                                                </rich:togglePanel>

                                                                                                <a4j:commandButton style="float:left"

                                                                                                          action="#{registrationBean.doSubmit()}"

                                                                                                          value="Submit &gt;&gt;">

                                                                                                </a4j:commandButton>

      </rich:panel>