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

    commandButton doesn't do anything

      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"
                      xmlns:ui="http://java.sun.com/jsf/facelets"
                      xmlns:h="http://java.sun.com/jsf/html"
                      xmlns:f="http://java.sun.com/jsf/core"
                      xmlns:a4j="http://richfaces.org/a4j"
                      xmlns:rich="http://richfaces.org/rich">

       

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

       

              <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}">
                  </h:inputText>
                  <rich:message for="name" showSummary="false"/>

       

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

       

              </h:panelGrid>
              <a4j:commandButton actionListener="#{loginAction.actionListener}" action="#{loginAction.ok}" value="login" id="action" />
          </rich:panel>
      </ui:composition>

       

      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,

      Donald