0 Replies Latest reply on Oct 8, 2007 5:06 PM by Hans Georg Frey

    a4j:commandButton and a4j:status

    Hans Georg Frey Newbie

      Hi,

      I'm trying to use use the combination of a4j:commandButton and a4j:status. But clicking on a button leeds to an empty page. See my coding beneath.

      Thank you for any help.

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       template="/pages/layout/common.xhtml">
      
       <f:loadBundle basename="resources" var="msg" />
      
       <ui:define name="pageBody">
       <h:form id="wizardForm" styleClass="pageBody"
       enctype="multipart/form-data" onsubmit="return wizardFormTarget()">
       <h:panelGroup id="DLG_CONFIG_PNL_ALL">
       <rich:tabPanel switchType="client" id="DLG_CONFIG_PNL_ALL_TP"
       style="height: 400px; width: 100%;">
       <rich:tab id="DLG_CONFIG_PNL_BASIC"
       label="#{msg.DLG_CONFIG_PNL_BASIC}">
       <ui:include src="/pages/basicInformation.xhtml" />
       </rich:tab>
       <rich:tab id="DLG_CONFIG_PNL_ADDRESS"
       label="#{msg.DLG_CONFIG_PNL_ADDRESS}">
       <ui:include src="/pages/adress.xhtml" />
       </rich:tab>
       <rich:tab label="#{msg.DLG_CONFIG_PNL_CPE}">
       <ui:include src="/pages/cpeInformation.xhtml" />
       </rich:tab>
       <rich:tab id="DLG_CONFIG_PNL_LOLO"
       label="#{msg.DLG_CONFIG_PNL_LOLO}"
       disabled="#{!configurationHandler.mapEnabled['DLG_CONFIG_PNL_LOLO']}">
       <ui:include src="/pages/localLoops.xhtml" />
       </rich:tab>
       <rich:tab id="DLG_CONFIG_PNL_DSL" label="#{msg.DLG_CONFIG_PNL_DSL}"
       disabled="#{!configurationHandler.mapEnabled['DLG_CONFIG_PNL_DSL']}">
       <ui:include src="/pages/dsl.xhtml" />
       </rich:tab>
       <rich:tab id="DLG_CONFIG_PNL_ISDN"
       label="#{msg.DLG_CONFIG_PNL_ISDN}"
       disabled="#{!configurationHandler.mapEnabled['DLG_CONFIG_PNL_ISDN']}">
       <ui:include src="/pages/isdn.xhtml" />
       </rich:tab>
       </rich:tabPanel>
       </h:panelGroup>
       <a4j:region id="DLG_CONFIG_PNL_CONTROL_REGION"
       renderRegionOnly="false">
       <h:panelGrid columns="1" width="100%" id="DLG_CONFIG_PNL_CONTROL"
       style="border: 1px solid #E20074; background-color: #D5D5D5; text-align: left; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;">
       <h:panelGrid columns="6">
       <h:panelGrid columns="2">
       <h:selectBooleanCheckbox id="DLG_CONFIG_CHK_LAB_MODE"
       value="#{configurationHandler.lab}"
       valueChangeListener="#{configurationHandler.changedValue}">
       <a4j:support event="onclick" ajaxSingle="true"
       focus="DLG_CONFIG_CHK_LAB_MODE"
       reRender="DLG_CONFIG_PNL_CONTROL,DLG_CONFIG_PNL_ALL"
       limitToList="true" />
       </h:selectBooleanCheckbox>
       <h:outputText value="Lab Mode" />
       </h:panelGrid>
       <h:panelGrid columns="1" style="border: 1px solid #005A5F;">
       <h:selectOneRadio id="DLG_CONFIG_RDB_REQUEST"
       value="#{configurationHandler.request}"
       valueChangeListener="#{configurationHandler.changedValue}"
       disabled="#{configurationHandler.lab}" layout="pageDirection">
       <f:selectItem itemValue="#rot" itemLabel="ROT" />
       <f:selectItem itemValue="#vpnd" itemLabel="VPND" />
       <a4j:support event="onclick" ajaxSingle="true"
       reRender="DLG_CONFIG_PNL_ALL,DLG_CONFIG_PNL_CONTROL"
       limitToList="true" />
       </h:selectOneRadio>
       </h:panelGrid>
       <h:panelGrid columns="1" style="border: 1px solid #005A5F;">
       <h:selectOneRadio id="DLG_CONFIG_RDB_WANTED_CONFIG"
       value="#{configurationHandler.wantedConfig}"
       disabled="#{!configurationHandler.lab}" layout="pageDirection">
       <f:selectItem itemValue="#PEFinal" itemLabel="PE" />
       <f:selectItem itemValue="#CEInitial" itemLabel="CEInitial" />
       <a4j:support event="onclick" ajaxSingle="true"
       reRender="DLG_CONFIG_PNL_CONTROL" limitToList="true" />
       </h:selectOneRadio>
       </h:panelGrid>
       <h:panelGrid columns="1" style="border: 1px solid #005A5F;">
       <h:selectOneRadio id="DLG_CONFIG_RDB_QOS"
       value="#{configurationHandler.qualityOfService}"
       disabled="#{!configurationHandler.PEFinal}"
       layout="pageDirection">
       <f:selectItem itemValue="#WithQoS" itemLabel="with QoS" />
       <f:selectItem itemValue="#NoQoS" itemLabel="no QoS" />
       </h:selectOneRadio>
       </h:panelGrid>
       <h:panelGrid columns="1" style="border: 1px solid #005A5F;">
       <a4j:commandButton action="#{configurationHandler.process}"
       disabled="#{!configurationHandler.enableProcess}"
       onclick="return buttonClick( 'generate' )" style="width: 100%;"
       value="generate" />
       <a4j:commandButton
       action="#{configurationHandler.newConfigAndInit}"
       onclick="return buttonClick( 'reset' )" style="width: 100%;"
       value=" reset " immediate="true" />
       </h:panelGrid>
       <h:panelGrid columns="1"
       style="border: 1px solid #005A5F; border-spacing: 1px;">
       <h:panelGrid columns="2"
       style="border-width: 0px; border: 0px; border-spacing: 1px;">
       <a4j:commandButton action="#{configurationHandler.save}"
       disabled="#{!configurationHandler.lab}" style="width: 100%;"
       value="save" immediate="false" />
       <a4j:commandButton action="#{configurationHandler.load}"
       disabled="#{!configurationHandler.lab}" style="width: 100%;"
       value="load" immediate="true" />
       </h:panelGrid>
       <t:inputFileUpload id="DLG_CONFIG_IFU_LOAD"
       disabled="#{!configurationHandler.lab}" storage="file"
       immediate="true"
       valueChangeListener="#{configurationHandler.changedValue}" />
       </h:panelGrid>
       </h:panelGrid>
       </h:panelGrid>
       </a4j:region>
       <h:panelGrid id="panelError" columns="2" styleClass="error_footer">
       <a4j:status for="DLG_CONFIG_PNL_CONTROL_REGION" startText="process"
       stopText="done" startStyle="color: #005A5F;"></a4j:status>
       <h:panelGrid columns="5" style="text-align: left;">
       <h:messages />
       </h:panelGrid>
       </h:panelGrid>
       </h:form>
       </ui:define>
      </ui:composition>