1 Reply Latest reply on Jul 22, 2009 4:42 AM by Ilya Shaikovsky

    form submission in modalPanel - not getting the entered valu

    ganesh h d Newbie

      Hi all,

      I have a requirement where if i click on a link, a pop up will be opened. In pop up one input text box is there. user will enter some text and click on the button. based on the value entered i should fie a query and return a list. that list will be used to populate the data table in the same popup.

      Right now i have created the modal panel with text box(for searching purpose) and have a data table. i tried to enter a text in that text box and clicked the button. the control is going inside method but the backing bean property for that entered text is null. the property should contain the entered value.

      <!-- Modal Panel for adding the Field -->
      <rich:modalPanel height="330" width="580" id="addfieldpanel">

      <f:facet name="header">
      <h:outputText style="text-decoration:underline" value="Add New Field" />
      </f:facet>
      <f:facet name="controls">
      <h:outputLink value="#" onclick="#{rich:component('addfieldpanel')}.hide()">close</h:outputLink>
      </f:facet>

      <h:panelGrid id="addfield">

      <h:panelGrid id="searchfieldgrid" columns="2" cellspacing="10">
      <h:inputText id="searchfield" name="searchfield" value="#{customizeFiledsInfo.searchField}" />
      <h:commandLink action="#{customizeFiledsInfo.fieldSearch}" class="button">
      Search
      </h:commandLink>
      </h:panelGrid>

      <h:panelGrid columns="2" cellspacing="10">

      <rich:panel bodyClass="rich-laguna-panel-no-header" style="height : 162px; width : 445px;">

      <rich:dataTable id="searchList" columns="1" value="#{customizeFiledsInfo.searchList}" var="field" rows="15" width="60%" sortMode="single" >
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column width="50%" style="font-weight:bold;text-align: center"><h:outputText value="Optional Fields" /></rich:column>
      <rich:column width="50%" style="font-weight:bold;text-align: center"><h:outputText value="Check box to add" /></rich:column>
      </rich:columnGroup>
      </f:facet>

      <rich:column style="font-weight:bold;text-align: center"><h:outputText value="#{field.label}" /></rich:column>
      <rich:column>
      <h:selectBooleanCheckbox id="addcheckbox" value="#{field.addCheck}"/>
      <h:selectBooleanCheckbox id="requirecheckbox" value="#{field.requireCheck}"/>
      </rich:column>
      </rich:dataTable>
      </rich:panel>

      <h:commandLink action="#{customizeFiledsInfo.addFileds}" class="button" >
      Add Fields
      </h:commandLink>
      </h:panelGrid>

      </h:panelGrid>

      </rich:modalPanel>

      In the above code 'searchfield' is coming as null in the backing bean even though i had entered the value.

      please suggest me any solution fo this issue.

      regards,
      ganesh