Target: Method of a POJO annotated with @StageDefinition.
Description: Marks the annotated method as the stage's "main" method. If no such method exists the stage is not executed and the user is redirected to the view.
Remarks: If this annotation is inexistent and no view is defined a "null stage" warning is issued and the execution halts. There are several signatures allowed for the annotated method. See the examples for a comprehensive description.
JavaDoc: Click here
Attributes: N/A
Examples:
@StageDefinition(ID="stage1" service="aServiceID" channel="http")
public class Stage1
{
// Void return, no arguments
@Execute
void executeMethod() {
...
}
...
}
@StageDefinition(ID="stage2" service="aServiceID" channel="http")
public class Stage2
{
// ViewObject return, no arguments
// If null return the default view will be used.
// If non null return, the controller will use the returned view to render the result
@Execute
ViewObject executeMethod() {
...
}
...
}
@StageDefinition(ID="stage3" service="aServiceID" channel="http")
public class Stage3
{
// ViewObject return, IDIFContext argument (the context is injected automatically)
@Execute
ViewObject executeMethod(IDIFContext ctx) {
...
}
...
}
@StageDefinition(ID="stage4" service="aServiceID" channel="http")
public class Stage4
{
// Void return, IDIFContext argument (the context is injected automatically)
@Execute
void executeMethod(IDIFContext ctx) {
...
}
...
}
See also: