2 Replies Latest reply on Jun 8, 2010 10:27 AM by Donald McLean

    commandButton doesn't do anything

    Donald McLean Newbie

      I'm working on a prototype as part of a technology evaluation. I started with some code from one of the LiveDemo pages as an initial point and I'm at the point where something should be happening (but isn't).


      login.xhtml looks like this:


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"


          <rich:panel id="panel">
              <f:facet name="header">
                      <h:outputText value="Enter DADS user name and password"/>


              <rich:message for="action"/>
              <h:outputText value="Server is: #{loginAction.serverType}"/>


              <h:panelGrid columns="3">
                  <h:outputText value="username"/>
                  <h:inputText id="name" required="true" value="#{loginDataBean.name}">
                  <rich:message for="name" showSummary="false"/>


                  <h:outputText value="password"/>
                  <h:inputSecret id="password" required="true"/>
                  <rich:message for="password"/>


              <a4j:commandButton actionListener="#{loginAction.actionListener}" action="#{loginAction.ok}" value="login" id="action" />


      I was looking at the HTML page that this produced and I saw the line for the commandButton:


      <input id="action" name="action" onclick="A4J.AJAX.Submit(null,event,{'similarityGroupingId':'action','parameters':{'action':'action'} ,'actionUrl':'/richDemo/faces/root.xhtml'} );return false;" value="login" type="button" />

      As near as I can tell, the first parameter is supposed to be the form, which I'm guessing shouldn't be null. Does any one have any suggestions on what I'm doing wrong here?

      Thank you,