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

    problem with a4j:actionparam

    Ahmet temiz Novice


      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}" />
      <h:outputText id="xcoord" value="#{imagePainter.xx}"></h:outputText>

      but it does not work

      I am wondering what the wrong is ?


        • 1. Re: problem with a4j:actionparam
          Tihomir Surdilovic Master

          This test worked for me:

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