jsf 2.2 - No navigation/refresh after submitting a form -


here simple jsf page:

<html xmlns="http://www.w3.org/1999/xhtml"   xmlns:h="http://xmlns.jcp.org/jsf/html"   xmlns:f="http://xmlns.jcp.org/jsf/core"> <h:head>     <title>facelet title</title> </h:head> <h:body>     <h:form enctype="multipart/form-data">         hello<br/>         <h:outputtext  value="#{backingbean.currenttime}" />         <br/>         <h:outputtext id="contatoreid" value="#{backingbean.counter}" />         <br/>             <h:commandbutton value="add" action="#{backingbean.add}">                 <f:ajax render="contatoreid"/>             </h:commandbutton>             <br/>             <hr/>             <h:commandbutton value="reset counter" action="#{backingbean.resetcounter}" />     </h:form>  </h:body> </html> 

the backing bean implementation trivial.

it has form multipart/form-data , 2 buttons, 1 ajax behavior refresh 1 component in page , 'standard' submit button. if add button pressed reset counter doesn't cause browser refresh or navigate new page.

after lots of searches on internet found related bug report:the combination of enctype="multipart/form-data" , ajax stops navigation in scenarios not clear me if recognized real bug or misconfiguration issue. i'm using latest available mojarra release 2.2.5. cannot seen progress on bug report. can suggest workaround ?

besides moved web application glassfish 3.1.2 glassfish 4.0. worked before while i'm struggling lots of problems seem bug related, such this on <ui:repeat>.

i'm conscious cannot ask opinion related questions here, i'm wondering if i'm person having bad experience jsf 2.2 release. maybe using jsf 2.0 in wrong/unsafe manner...

update

i add backing bean code

@managedbean @sessionscoped public class backingbean {  /**  * creates new instance of backingbean  */ public backingbean() { }  int counter = 0;  public int getcounter() {     return counter; }  public void setcounter(int counter) {     this.counter = counter; }  public void add()  {     counter++;     system.out.println("add called " + counter); }  public void azzera() {     counter =0;     system.out.println("azzera "); }  public string getora() { return new date().tostring();} } 


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -