-
1. Re: <h:commandButton> onComplete
bleathem Nov 6, 2013 3:52 PM (in response to manuel.moroni)h:commandButton doesn't do ajax itself. You have to embed an f:ajax tag to get it to do so. f:ajax then has the onevent attribute [1] to which you can attach a listener. Check the "status" attribute of the onevent handler's parameter; it will be "complete" for the event you are looking for. See John Yeary's blog for more details [2].
[1] https://javaserverfaces.java.net/nonav/docs/2.1/vdldocs/facelets/f/ajax.html
[2] http://javaevangelist.blogspot.ca/2013/08/jsf-2x-tip-of-day-jsfjs-ajax-onevent.html
-
2. Re: <h:commandButton> onComplete
manuel.moroni Nov 7, 2013 4:12 AM (in response to bleathem)thanks for the reply.
unfortunately the application it's based on jsf 1.2.
here what i'd like to accomplish:
<h:commandButton value="Submit" action="#{sessionContainer.findSession.marcature.processMyFile}" oncomplete="window.open(-------);"/>
since the button loads a file i cannot use <a4j:commandbutton>
i tried this but it seems wrong:
<h:commandButton value="Submit" action="#{sessionContainer.findSession.marcature.processMyFile}" >
<a4j:support event="oncomplete" oncomplete="window.open(.........)" />
</h:commandButton>
-
3. Re: <h:commandButton> onComplete
bleathem Nov 7, 2013 6:44 PM (in response to manuel.moroni)What version of RichFaces are you using?
-
4. Re: <h:commandButton> onComplete
manuel.moroni Nov 8, 2013 12:27 AM (in response to bleathem)version 3.3.3
-
5. Re: <h:commandButton> onComplete
bleathem Nov 8, 2013 9:19 AM (in response to manuel.moroni)Nest the a4j:support tag in your commandButton:
http://showcase3-richfaces.rhcloud.com/richfaces/support.jsf?c=support
-
6. Re: <h:commandButton> onComplete
manuel.moroni Nov 8, 2013 10:00 AM (in response to bleathem)<h:commandButton value="Submit" action="#{s..........}" image="../../static/images/import-templ.jpg" >
<a4j:support event="oncomplete" oncomplete="window.open('#{---}---------)" />
</h:commandButton>
but unfortunately it seems that the window.open never fire. the button should open a popup once the action of the <h:commandoButton> it's completed.
-
7. Re: <h:commandButton> onComplete
manuel.moroni Nov 12, 2013 6:09 AM (in response to manuel.moroni)any suggestion?