aspose file tools*
The moose likes JSF and the fly likes Problem with double INVOKE APPLICATION in JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with double INVOKE APPLICATION in JSF 2.0" Watch "Problem with double INVOKE APPLICATION in JSF 2.0" New topic
Author

Problem with double INVOKE APPLICATION in JSF 2.0

Dawid Zdan
Greenhorn

Joined: Dec 23, 2010
Posts: 2
Hey. I have a problem with JavaScript code in h:commandButton.
. When I use this onclick event first the event returns false and the popup with confirmation occurs. When user click ok button function try to reinvoke onclick event and then function doesnt return false (because of special flag) and POST request is sent. The problem is that (when I use this onclick event) INVOKE APPLICATION and RENDER RESPONSE phases are invoked 2 times. Firstly everything is ok - the id parameter is set, and the second time parameter id is null. Can anybody help me to solve this problem ?
Dawid Zdan
Greenhorn

Joined: Dec 23, 2010
Posts: 2
The problem was in jquery's trigger function. I have seen in firebug that there was 2 POST requests , one aborted. When I change the function to simple _button.click() instead of $(_button).trigger('click') everything works fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with double INVOKE APPLICATION in JSF 2.0
 
Similar Threads
Problem inside a richModalPanel
Take input from <h:inputText> in rich <modalPanel>
Javascript in JSF
How to Call the Backing Bean Method from javascript in JSF
jsf radio button and javascript