integer - Form submission in JSF does not call setter of selected Item -


this jsf 1.1 form

    <h:form>         <h1>step 1 - choose channels</h1>                 <h:selectmanycheckbox value="#{globaltvregistration.selectedchannels}" layout="pagedirection">             <f:selectitems value="#{globaltvregistration.availablechannels}" />                         </h:selectmanycheckbox>         <h:commandbutton value="select channels" action="packages" />     </h:form> 

and here backing bean

public class globaltvregistration {  private int[] selectedchannels;  public int[] getselectedchannels() {     return selectedchannels; }  public void setselectedchannels(int[] selecteditems) {     this.selectedchannels = selecteditems; }  }     

when select 1 or more checkboxes , click command button, same page refreshed again. form submission not call 'setselectedchannels(int[] selecteditems)'.

can identify problem?

in case others face same problem, on line

private int[] selectedchannels; 

replace int data type integer.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -