1 Reply Latest reply on Feb 7, 2009 2:36 PM by tsurdilovic

    problem with a4j:actionparam

    orkun

      hello

      when I click on an image I want to pass a value (88) to a variable(imagePainter.xx).

      I tried this:

      <a4j:mediaOutput id="telephone" element="img" mimeType="image/jpeg"
      createContent="#{imagePainter.drawImage}" coords="10,10,60,60">
      <a4j:support event="onClick" reRender="xcoord">
      <a4j:actionparam name="param1" value="88" assignTo="#{imagePainter.xx}" />
      </a4j:support>
      </a4j:mediaOutput>
      <h:outputText id="xcoord" value="#{imagePainter.xx}"></h:outputText>


      but it does not work

      I am wondering what the wrong is ?

      regards

        • 1. Re: problem with a4j:actionparam
          tsurdilovic

          This test worked for me:

          <h:form>
           <a4j:jsFunction name="setXCoord" reRender="xcoord">
           <a4j:actionparam name="param1" value="88"
           assignTo="#{mediaBean.xx}" />
           </a4j:jsFunction>
           </h:form>
          
           <h:form id="mediaBeanForm">
          
           <a4j:mediaOutput element="img" cacheable="false"
           createContent="#{mediaBean.paint}" value="myimage.png"
           mimeType="image/jpeg" onclick="setXCoord();">
           </a4j:mediaOutput>
           <h:outputText id="xcoord" value="#{mediaBean.xx}"/>
          
          
          
           </h:form>