Action"

From Documentation
m
m
Line 1: Line 1:
 
{{ZESTEssentialsPageHeader}}
 
{{ZESTEssentialsPageHeader}}
  
An action is POJO. It does ''not'' have to implement any interface.
+
An action is POJO. It does ''not'' have to implement any interface. Of course, it has to implement the method specified in <tt>WEB-INF/zest</tt>. For example,
  
=Request Parameters=
+
<source lang="java" high="6">
 +
package foo;
 +
public class HelloAction {
 +
private String _message = "Welcome";
 +
 
 +
/** The execute method specified in WEB-INF/zest.xml. */
 +
public String execute() {
 +
return "success";
 +
}
 +
 
 +
/** Sets the message. */
 +
public void setMessage(String message) {
 +
_message = message;
 +
}
 +
/** Returns the message. */
 +
public String getMessage() {
 +
return _message;
 +
}
 +
}
 +
</source>
 +
 
 +
=Signature of the execute Method=
 +
 
 +
=Parameters of the Request=
  
 
=Version History=
 
=Version History=

Revision as of 04:16, 12 March 2011


An action is POJO. It does not have to implement any interface. Of course, it has to implement the method specified in WEB-INF/zest. For example,

package foo;
public class HelloAction {
	private String _message = "Welcome";

	/** The execute method specified in WEB-INF/zest.xml. */
	public String execute() {
		return "success";
	}

	/** Sets the message. */
	public void setMessage(String message) {
		_message = message;
	}
	/** Returns the message. */
	public String getMessage() {
		return _message;
	}
}

Signature of the execute Method

Parameters of the Request

Version History

Last Update : 2011/03/12


Version Date Content
     



Last Update : 2011/03/12

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.