package org.ajax4jsf;

import java.io.Serializable;

import org.ajax4jsf.component.UIInclude;

public class NavigateBean implements Serializable {
	
	private String viewId="/pages/hello.jsp";
	
	transient private UIInclude include;
	
	public String navigateOne() {
		
		return "sucessOne";
	}
	
	public String navigateTwo() {
		
		return "sucessTwo";
	}
	
	public String navigateHello() {
		
		return "sucessHello";
	}

	/**
	 * @return the viewId
	 */
	public String getViewId() {
		return viewId;
	}

	/**
	 * @param viewId the viewId to set
	 */
	public void setViewId(String viewId) {
		this.viewId = viewId;
	}
	
	public String reset(){
		setViewId("/pages/hello.jsp");
		if(null != include){
			include.setViewId("/pages/hello.jsp");
		}
		return null;
	}

	/**
	 * @return the include
	 */
	public UIInclude getInclude() {
		return include;
	}

	/**
	 * @param include the include to set
	 */
	public void setInclude(UIInclude include) {
		this.include = include;
	}
	
}
