2 Replies Latest reply on Nov 17, 2009 7:28 AM by Ilya Shaikovsky

    Commandlink question

    Chris Taylor Newbie

      I'm new to JSF and richfaces, and I'm having a hard time understanding getting values of inputText to my backing bean.

      This works:

      <rich:panel header="Details">
       <h:panelGrid id="pnl" columns="2" width="100%">
       <h:outputText value="Name" />
       <h:inputText value="#{testBean.name}" />
       <h:outputText value="Description" />
       <h:inputText value="#{testBean.description}" />
      
       <h:commandLink value="Insert"
       actionListener="#{testBean.insertAction}"
       rendered="#{not testBean.editable}" />
       </h:panelGrid>
       </rich:panel>
      


      the above in the java method for insertAction:
      this.getName and this.getDescription are whatever is typed into the inputText fields.


      However the following does not work:

      <rich:panel header="Details">
       <h:panelGrid id="pnl" columns="2" width="100%">
       <h:outputText value="Name" />
       <h:inputText value="#{testBean.name}" />
       <h:outputText value="Description" />
       <h:inputText value="#{testBean.description}" />
      
       <a4j:commandLink value="Insert" reRender="dataTable,pnl" ajaxSingle="true"
       actionListener="#{testBean.insertAction}"
       rendered="#{not testBean.editable}" />
       </h:panelGrid>
       </rich:panel>
      


      this.getName and this.getDescription are null always.


      Thanks in advance for the help, I'm probably missing one minor thing.