-
1. Re: a:support onclick not working
niox.nikospara.yahoo.com May 2, 2009 10:01 PM (in response to reis.tiago)Hi,
The <a:support> should be nested in a visual component that can emit client-side (Javascript) events. You have nested it within a <a:repeat> (the <div> is NOT a component, it is plain markup for JSF).
If you want a graphic button that triggers a server-side action, use something like this instead:
<a:commandButton image="/img.jpg" action="#{bean.method}" />
Or, to support server interaction for a component that would normally not support it, use (from the RichFaces docs):
<h:inputText value="#{bean.text}"> <a4j:support event="onkeyup" reRender="repeater"/> </h:inputText>
But remember the <a:support> allways applies to components (<h:...>, <a:...>, <rich:...> thingies).
-
2. Re: a:support onclick not working
cash1981 May 3, 2009 8:11 PM (in response to reis.tiago)I think it is easier to to this instead of having a a:support with onclick. I believe this will work
<h:commandLink action="#{bean.myAction}"> <h:graphicImage value="/img.jpg"/> </h:commandLink>
If it is not important what is reRendered, I think the a4j or rich package has some commandLink where you can reRender.
-
3. Re: a:support onclick not working
reis.tiago May 4, 2009 5:06 PM (in response to reis.tiago)Just wanted to say thanks to both of you for the suggestions.
Problem solved.