Your first instinct might tell you to implement multiple actions for that one entity (one per CRUD operation, or maybe even stuff two inside one action).
However, you can add multiple prepare{METHOD}() like prepareDoDelete(),
prepareDoUpdate(). If you follow this convention, the appropriate prepare method will be called before your action method.
The following is a snippet from the Struts 2 Documentation at:
http://struts.apache.org/2.0.11/docs/prepare-interceptor.html
In PrepareInterceptor Applies only when action implements Preparable 1. if the action class have prepare{MethodName}(), it will be invoked 2. else if the action class have prepareDo(MethodName()}(), it will be invoked 3. no matter if 1] or 2] is performed, if alwaysinvokePrepare property of the interceptor is "true" (which is by default "true"), prepare() will be invoked.
Most helpful packers and mvoers website for home shifting:
ReplyDeleteNoida packers and movers
Delhi packers and movers
Gurgaon packers and movers
Faridabad packers and movers
Ghaziabad packers and movers
The outcome is an amazingly adaptable payback plan. On the off chance that you have an awful month, you may battle to influence the installment on your customary business to credit, online Check Cashing Chula vista
ReplyDelete