This content has been marked as final.
Show 5 replies
-
1. Re: a4j:commandLink actionListener not working
nbelaevski Sep 14, 2007 10:47 AM (in response to vdhanda)Vidur,
could you please provide full page code? -
2. Re: a4j:commandLink actionListener not working
rpa_rio Sep 14, 2007 12:04 PM (in response to vdhanda)In my case a simple action isn't called.
-
3. Re: a4j:commandLink actionListener not working
fabmars Sep 18, 2007 5:37 AM (in response to vdhanda)Same for me.
-
4. Re: a4j:commandLink actionListener not working
fabmars Sep 18, 2007 9:31 AM (in response to vdhanda)More details for my case: I tested that with JSF 1.1 & 1.2.
1) Use some basic action binding. This one is used in my app to hide some parts of the page.<a4j:commandButton id="boxFoldUp" image="/images/box-close.png" rendered="#{!layout.foldedAll}" actionListener="#{layout.hideAllPanes}" ajaxSingle="true" reRender="topPane, topFoldUp, topFoldDown, leftPane, leftFoldLeft, leftFoldRight, rightPane, rightFoldRight, rightFoldleft, taskPane, tasksFoldUp, tasksFoldDown" />
This worked in RF 3.0.2, but to make it to work on 3.1.0 you have to useactionListener="#{layout[hideAllPanes]}"
which would have failed in 3.0.2, as hideAllPanes is actually bound to nothing, it's a String !!! It would have worked with quotes, likeactionListener="#{layout['hideAllPanes']}"
2) Use some composition/templating. I defined a custom tag for some menu link called "xx:treeLinkAction".<ui:composition> <a4j:commandLink ajaxSingle="true" action="#{backingBean[action]}" styleClass="text-decoration: none;" rendered="#{rendered and action != null}"> <h:panelGrid columns="2" columnClasses="alignMiddle"> <h:graphicImage value="#{image}" style="border: 0px;"/> <h:outputText value="#{label}" style="color: black;"/> </h:panelGrid> </a4j:commandLink> </ui:composition>
If I use it in my page:
<xx:treeLinkAction backingBean="#{mainHandler}" action="startNewThing" label="New Thing" image="/images/newthing.gif" rendered="true"/>
Then I get an error stacktrace whose cause is
WARN: Error Rendering View[/pages/newThing.xhtml]
javax.el.ELException: /WEB-INF/facelet/treeLinkAction.xhtml: Property 'startNewThing' is not found on type: com.company.pack.subpack.MainHandler
Clearly the method binding fails again here and there is no workaround I can find. -
5. Re: a4j:commandLink actionListener not working
fabmars Sep 18, 2007 11:56 AM (in response to vdhanda)And all of a sudden it works now...go figure.