0 Replies Latest reply on Mar 27, 2008 1:04 PM by Thiagu Mariappan

    browser back button not maintain selections on previous page?

    Thiagu Mariappan Novice

      Hi every one

      1. The following is my code for a home page.

          <h:selectManyCheckbox value="#{home.value}">
               <f:selectItems  value="#{brandItems}"/>                  
          <h:commandButton action="#{home.display}" value="Submit" />
          <s:link value="view newxt page" action="#{temp.getAll}" view="/table.xhtml" />

      2. This is my session bean code

      public class TempAction  implements Temp,Serializable
           private static final long serialVersionUID = 1L;
           String []value;
          List<SelectItem> brandItems;
           public void getAll() {
                brandItems=new ArrayList<SelectItem>();
                brandItems.add(new SelectItem("First","First"));
                brandItems.add(new SelectItem("Second","Second"));
           public String[] getValue() {
                return value;
           public void setValue(String[] value) {
                this.value = value;
           public void display() {
                for(String a:value)
          public void reset() {}
          public void destroy() {}

      3. I invoke getAll method by using following code in my pages.xml

      After visiting the second page by clicking the s:link , I go back to the first page by using browser BACK button . Then when I hit the SUBMIT button, I get the following error message in my jboss console and also the check boxs are deselected.

      16:29:05,843 INFO  [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=j_id16:j_id17[severity=(ERROR 2), summary=(value is not valid), detail=(value is not valid)]

      Kindly assist to resolve this problem. Many thanks in anticipation.