2 Replies Latest reply on Jul 6, 2007 5:39 PM by diet ice

    a4j:support issue

    diet ice Newbie

      Hi guys, can some help me out here - I cant seem to get a simple <a4j:support> to work.

      The following code works as i need it to :

      <a4j:region selfRendered="true">
      <a4j:form jsfc="h:form" id="helloForm">
      <h:panelGrid columns="2">


      <t:outputLabel for="exVAT" value="#{text['products.exVAT']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" required="true" size="4" id="exVAT" value = "#{productsForm.product.wholesaleExVAT}">
      <a4j:support event="onkeyup" reRender="vat"></a4j:support>
      <v:commonsValidator type="required" arg="#{text['products.exVAT']}"/>
      </t:inputText>
      <t:message for="exVAT" styleClass="fieldError"/>


      <t:outputText value="gff" styleClass="desc"/>
      <t:outputText styleClass="" id="vat" value = "#{productsForm.product.wholesaleVAT}" style="color: blue;">
      </t:outputText>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>



      </h:panelGrid>
      </a4j:form>
      </a4j:region>


      but when i introduce this into the page i need it in (code posted below) it doesnt work. Can some one point in the right direction.

      Thanks for your time

      <a4j:region selfRendered="true">
      <a4j:form jsfc="h:form" id="productsForm" >

      <t:panelGrid columns="3" styleClass="" headerClass=""
      columnClasses="" width="" cellpadding="2" cellspacing="0">


      <f:facet name="header" >
      <t:panelGroup >
      <h:outputText value="#{text['productDetail.heading']}" styleClass="info" style="font-weight:normal"/>

      </t:panelGroup>
      </f:facet>

      <t:outputLabel for="code" value="#{text['products.code']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" required="true" id="code" value = "#{productsForm.product.productCode}" style="width:250px">
      <v:commonsValidator type="required" arg="#{text['products.code']}"/>
      </t:inputText>
      <t:message for="code" styleClass="fieldError"/>

      <t:outputLabel for="name" value="#{text['products.name']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" required="true" id="name" value = "#{productsForm.product.name}">
      <v:commonsValidator type="required" arg="#{text['products.name']}"/>
      </t:inputText>
      <t:message for="name" styleClass="fieldError"/>

      <h:column >
      <h:outputText /><h:outputText styleClass="info"/>
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>

      <t:outputLabel for="ldesc" value="#{text['products.longDesc']}" styleClass="desc"/>
      <t:inputTextarea rows="10" styleClass="txtboxes" id="ldesc" value = "#{productsForm.product.longDescription}" style="width:250px">
      <v:commonsValidator type="required" arg="#{text['products.longDesc']}"/>
      </t:inputTextarea>
      <t:message for="ldesc" styleClass="fieldError"/>

      <t:outputLabel for="sdesc" value="#{text['products.shortDesc']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" required="true" id="sdesc" value = "#{productsForm.product.shortDescription}">
      <v:commonsValidator type="required" arg="#{text['products.shortDesc']}"/>
      </t:inputText>
      <t:message for="sdesc" styleClass="fieldError"/>

      <t:outputLabel for="weight" value="#{text['products.weight']}" styleClass="desc" />
      <t:inputText styleClass="txtboxes" size="3" required="true" id="weight" value = "#{productsForm.product.weight}">
      <v:commonsValidator type="required" arg="#{text['products.weight']}"/>
      </t:inputText>
      <t:message for="weight" styleClass="fieldError"/>

      <h:column >
      <h:outputText /><h:outputText styleClass="info"/>
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>

      <t:outputLabel for="exVAT" value="#{text['products.exVAT']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" required="true" size="4" id="exVAT" value = "#{productsForm.product.wholesaleExVAT}">
      <a4j:support event="onkeyup" reRender="vat"></a4j:support>
      <v:commonsValidator type="required" arg="#{text['products.exVAT']}"/>
      </t:inputText>
      <t:message for="exVAT" styleClass="fieldError"/>

      <t:outputText value="#{text['products.markup']}" styleClass="desc"/>
      <t:outputText styleClass="" id="vat" value = "#{productsForm.product.wholesaleVAT}" style="color: blue;">
      </t:outputText>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>


      <t:outputLabel for="markup" value="#{text['products.markup']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" size="4" required="true" id="markup" value = "#{productsForm.product.markupFactor}">
      <v:commonsValidator type="required" arg="#{text['products.markup']}"/>
      </t:inputText>
      <t:message for="markup" styleClass="fieldError"/>

      <t:outputLabel for="sale" value="#{text['products.sale']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" size="4" required="true" id="sale" value = "#{productsForm.product.salePercent}">
      <v:commonsValidator type="required" arg="#{text['products.sale']}"/>
      </t:inputText>
      <t:message for="sale" styleClass="fieldError"/>

      <h:column >
      <h:outputText /><h:outputText styleClass="info"/>
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>

      <t:outputLabel for="quant" value="#{text['products.quant']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" size="4" required="true" id="quant" value = "#{productsForm.product.quantity}">
      <v:commonsValidator type="required" arg="#{text['products.quant']}"/>
      </t:inputText>
      <t:message for="quant" styleClass="fieldError"/>

      <t:outputLabel for="minQuant" value="#{text['products.minQuant']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" size="4" required="true" id="minQuant" value = "#{productsForm.product.minQuantity}">
      <v:commonsValidator type="required" arg="#{text['products.minQuant']}"/>
      </t:inputText>
      <t:message for="minQuant" styleClass="fieldError"/>

      <t:outputLabel for="samplesTotal" value="#{text['products.samplesTotal']}" styleClass="desc"/>
      <t:inputText styleClass="txtboxes" size="4" required="true" id="samplesTotal" value = "#{productsForm.product.samplesTotal}">
      <v:commonsValidator type="required" arg="#{text['products.samplesTotal']}"/>
      </t:inputText>
      <t:message for="samplesTotal" styleClass="fieldError"/>

      <h:column >
      <h:outputText /><h:outputText styleClass="info"/>
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>
      <h:column>
      <h:outputText /><h:outputText />
      </h:column>

      <h:column >
      <t:outputLabel for="supplierid" value="#{text['productSupplier.page']}" styleClass="desc"/>
      </h:column>
      <h:column>
      <h:selectOneMenu value="#{productsForm.supplierID}" id="supplierid" required="true" styleClass="select">
      <f:selectItems value="#{productSupplierList.suppliers2}"/>
      </h:selectOneMenu>
      </h:column>
      <h:column>
      <t:message for="supplierid" styleClass="fieldError"/>
      </h:column>

      <h:column >
      <t:outputLabel for="categoryid" value="#{text['category.page']}" styleClass="desc"/>
      </h:column>
      <h:column>
      <h:selectOneMenu value="#{productsForm.categoryID}" id="categoryid" required="true" styleClass="select">
      <f:selectItems value="#{categoryList.parentCategories2}"/>
      </h:selectOneMenu>
      </h:column>
      <h:column>
      <t:message for="categoryid" styleClass="fieldError"/>
      </h:column>

      </t:panelGrid>

      <t:panelGroup styleClass="buttonBar bottom" style="text-align:center;">

      <h:commandButton value="#{text['button.save']}" action="#{productsForm.save}" id="savep" styleClass="buttonss"/>
      <h:commandButton value="#{text['button.cancel']}" action="cancel" immediate="true" id="cancelpf" styleClass="buttonss" onclick="bCancel=true"/>
      </t:panelGroup>
      <h:outputText/><h:outputText/>
      </a4j:form>
      </a4j:region>