Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
27. Mar 2008, 13:04 CET | Link

Hi every one

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


<h:form>
    <h:selectManyCheckbox value="#{home.value}">
    	<f:selectItems  value="#{brandItems}"/>    	    	
    </h:selectManyCheckbox>

    <h:commandButton action="#{home.display}" value="Submit" />

    <s:link value="view newxt page" action="#{temp.getAll}" view="/table.xhtml" />
</h:form>

2. This is my session bean code


@Stateful
@Name("home")
public class TempAction  implements Temp,Serializable
{
	private static final long serialVersionUID = 1L;
	
	String []value;
	
    @Out(required=false)
    List<SelectItem> brandItems;
	
	@Begin(join=true)
	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)
			System.out.println("________________"+a);
	}

	
    @End
    public void reset() {}

    @Destroy 
    @Remove
    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.

By Thiagu.m