9 Replies Latest reply on Aug 7, 2007 5:09 PM by Earl Baugh

    rich:panel and inputText

    Earl Baugh Newbie

      I'm new to rich faces (and fairly new to JSF as well), and have a question regarding using inputText inside a rich:panel.

      With the following:

      <!-- General Prefs Panel. -->
      <a4j:outputPanel ajaxRendered="true" keepTransient="true">
      <rich:panel rendered="#{mainController.generalPrefsEnabled}">
      <h:form id="generalPrefsForm">
      <h:panelGrid columns="2">
      <h:outputText value="Home Zip Code: " style="FONT-FAMILY: 'Arial'; FONT-SIZE: small;"/>
      <h:inputText id="homeZipCode" value="#{user.homeZipCode}" />
      <h:outputText value="Work Zip Code: " style="FONT-FAMILY: 'Arial'; FONT-SIZE: small;"/>
      <h:inputText id="workZipCode" value="#{user.workZipCode}" />
      <h:outputText value=" " />
      <h:outputText value=" " />
      <h:commandButton value="Save" action="#{user.saveZips}" />
      <h:messages fatalClass="error" errorClass="error" infoClass="info" showDetail="true" />

      I have a rich:panel that I turn on and off based on a menu selection. That all works just fine. But the input areas, they behave strangely. When I first render the rich:panel, I can type in the input areas, but clicking on the command button doesn't save, but a second click (and on, third, etc...until I render another panel and come back) saves.

      Can someone shed some light on what newbie or stupid thing I've not groked here regarding this?