资 源 简 介
Struts 2 Value Stack Outjection
Struts 2 plugin to push multiple objects on the value stack using annotations.
Introduction
-ref name="vsoutject"/>
```
NOTE: If you override an interceptor stack (such as defaultStack) or have defined your own interceptor stack, make sure the vsoutject interceptor reference comes BEFORE the params-interceptor.
Step 3
Annotate which properties you want pushed onto the value stack:
```
public class EmployeeAction extends ActionSupport {
private JsonTable jsonTable;
private Employee employee;
//VSOutject annotations must be on getter methods only.
@VSOutject(isTopLevel=false,newInstance=true)
public JsonTable getJsonTable() {
return jsonTable;
}
//Since we have set the instance attribute to true,
//we must define a setter method that will be use