You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Purpose

The purpose of the model repository is to save off the model between the edit and save actions. Often times this is need when using detached objects

/**
 * The location in the session where the domain model is stored between an edit
 * and a save.
 */
public interface ModelRepo {
	/**
	 * The session key where domain model is stored.
	 */
	public static String DOMAIN_MODEL = "DOMAIN_MODEL";
}
public class SurveyAction extends ActionSupport {

	@In(scope = ScopeType.SESSION, value = ModelRepo.DOMAIN_MODEL)
	@Out(scope = ScopeType.SESSION, value = ModelRepo.DOMAIN_MODEL)
	private SurveyBean surveyBean;

	...
}
  • No labels