3 Replies Latest reply on Jul 19, 2012 6:01 AM by fluna

    <a4j:param>

    morphie

      Hi,

       

      I use RichFaces 4.0.0 on the jBoss 6.0.0.Final.

       

      I'm just a beginner and try to deliver values from JSF to a Bean with the <a4j:param />, but that doesn't work.

       

      The example from the RichFaces Showcase (http://richfaces-showcase.appspot.com/richfaces/component-sample.jsf?demo=param&sample=clientParam&skin=blueSky) doesn't work either. There is no Error, but the values in the Bean don't change.

       

      Can somebody help?

       

      Thanks!

        • 1. Re: <a4j:param>
          georgebpa

          hi morphie,

                TRY THIS....

          its the same code with little modification and the one thing you should do is make sure you have downloaded and added all jars for richfaces to act accordingly...

          Dont forget to add this particularl external jar to your project... http://www.java2s.com/Code/Jar/b/Downloadbatikext161jar.htm  . download dis jar and work on your project.. it might help...

              

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

          <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"

              xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"

              xmlns:rich="http://richfaces.org/rich">

              <h:head>

              </h:head>

              <h:form>

                  <rich:panel>

                      <h:panelGrid columns="2">

                          <a4j:commandButton value="Set Name to Alex" render="rep">

                              <a4j:param value="Alex" assignTo="#{userBean.name}" />

                          </a4j:commandButton>

           

                          <a4j:commandButton value="Set Name to John" render="rep">

                              <a4j:param value="John" assignTo="#{userBean.name}" />

                          </a4j:commandButton>

                      </h:panelGrid>

                  </rich:panel>

                  <br />

                  <rich:panel>

                      <h:outputText id="rep" value="Selected Name:#{userBean.name}" />

                  </rich:panel>

              </h:form>

          </ui:composition>

          • 2. Re: <a4j:param>
            ppitonak

            Hi morphie,

             

            I suggest you to use most recent version of RichFaces, i.e. 4.2.2.Final and also newer JBoss AS, e.g. 7.1.1.Final.

             

            Regards,

            Palo

            • 3. Re: <a4j:param>
              fluna

              For me it´s working ok using Richfaces 3.3.3.Final and JBoss 6.0.0, but if you want try using:

               

              <f:setPropertyActionListener value="John" target="#{userBean.name}" />