Javascript calling JSF handler method
        Posted  
        
            by msharma
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by msharma
        
        
        
        Published on 2010-03-23T17:51:08Z
        Indexed on 
            2010/03/23
            17:53 UTC
        
        
        Read the original article
        Hit count: 491
        
JavaScript
|handler
Hi All,
I am reading an xml file using javascript and then I need to submit my form so that it calls a particular method in my JSF handler. Usually this can be done on a jsp when user clicks a button by having an actionlistener like so:
<h:commandLink styleClass="button" action="#{myHandler.outcome}" actionListener="#{myHandler.doNext}">
    <span><h:outputText value="#{text.button_submit}" /></span> </h:commandLink>
I am not sure how to call a method like 'doNext' above in the handler from javascript. I cannot do a simple:
document.form.submit();
as it then repeats the processing i have already done. I want to read values from an xml file and then call a particular method in handler. Any ideas much appreciated.
© Stack Overflow or respective owner