3 Replies Latest reply on Jan 13, 2011 4:45 AM by Ilya Shaikovsky

    rich:contextMenu and a4j:actionparam

    Roman Budukh Newbie

      Hi, im using JBoss 6.0 final with RichFaces 3.3.3 final and impl-jsf2-3.3.3.Final. I try to send value to testBean.

      Why i can not do this with  a4j:actionparam.?, with f:setPropertyActionListener all works fine.

       

      <h:form>

           <rich:panel>

               <h:graphicImage id="pic" value="/img/error.gif"/>

               <rich:contextMenu event="oncontextmenu" attachTo="pic" submitMode="ajax">

                  

                     <rich:menuItem value="String 1"  id="zin">

                        <a4j:support event="onclick" reRender="outTest" limitToList="true">

                           <a4j:actionparam  value="String 1" assignTo="#{testBean.testString}"/>

                       </a4j:support>

                     </rich:menuItem>

       

                      <rich:menuItem value="String 2" id="zout">

                       <a4j:support event="onclick" reRender="outTest" limitToList="true">

                           <f:setPropertyActionListener target="#{testBean.testString}" value="String 2"/>

                      </a4j:support>

                       </rich:menuItem>


               </rich:contextMenu>   

               <rich:spacer width="10"/>

               <h:outputText id="outTest"  value="#{testBean.testString}" />

          </rich:panel>

      </h:form>