Thanks for the reply,

Well, Looks like model and controller bined
together(with context to the MVC).

Any how whole idea of a ActionForm is not only for one
request or even not only for one Action Class (in
Struts 1.x),

We can have one ActionForm with session scope shared
across many action classes. (which I believe as a nice
feature). How can I achieve such a thing in S2, In
S2's way if we have this POJO as a Action attribute,
what is  it's scope?


At the same time I have heard about a interceptor
called ScopedModelDriven interface.

Like to know what is the best way to do.

Currently we have a application developed in struts
1.x where one Actions form (session scoped) shared
across many Action classes.

Thanks

--- Harring Figueiredo <[EMAIL PROTECTED]> wrote:

> Tom,
> 
> In S2, the ActionForm is the Atcion itself. In other
> words, whatever you
> achieved with Action form you now achieve with the
> Action itself (And
> potentially a POJO).
> Maybe an example will help.
> 
> class MyA extents ActionSupport{
>  private String foo;
>  private String bar;
> 
> ... execute ()...{
> 
> }
> 
> /** These methods will be called automagically
> (introspection) by the
> framework, _AS LONG_ as the param matches the
> names of your peroperties (foo will be set by
> calling setFoo(), the same for
> barr)
> **/
> public void setFoo(String paraFoo){
> ..
> }
> public void setBar(String paramBar)
> ..
> }
> 
> 
> Now, with the class above, you can have a HTML form
> with the "foo"and "bar"
> fields.
> 
> 
> 
> If you what to use a complete separate POJO (for
> re-usability or other
> purpose) you can:
> 
> clas myFooBar{
>    filed pars  (foo, bar)
>   setters and getters
> }
> 
> class MyA extents ActionSupport{
>   private myFooBar fooBar;
> 
>   public String execute(){}
> 
> }
> 
> 
> Now, in the HTML page, you have to say name the
> param myFooBar.foo and
> myFooBar.bar
> 
> Regards,
> Harring
> Hope this helps.
> 
> Harring
> On 4/3/07, tom tom <[EMAIL PROTECTED]> wrote:
> >
> > Hi All,
> >
> > What is the life cyle of S2 with regard to
> > ActionForms,Actions etc
> >
> > Because S1 got the life cycle where it executes
> > ActionForm validate method and if success only it
> goes
> > to the Action Class.
> >
> > How this life cycle is addressed in S2, Won't
> there
> > any Action form and also validate method's in S2.
> >
> > If someone wants to have attributes in a seperate
> bean
> > instead of the Action class, what is the
> mechanism.
> > (How S1 ActionForm is addressed in S2)
> >
> > in S1 we had the ability to keep forms in any
> scope
> > e.g request or session,
> >
> > In S2 how can this be achieved.?
> >
> > Is there any documentation written with regard to
> > this,
> >
> >
> > Thanks,
> >
> >
> >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Don't pick lemons.
> > See all the new 2007 cars at Yahoo! Autos.
> > http://autos.yahoo.com/new_cars.html
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Sincerely,
> 
> Harring Figueiredo
> Sr. Software Engineer
> Email: [EMAIL PROTECTED]
> Telephone: 941-256-0600
> 
> "We never become truly spiritual by sitting down and
> wishing to become so.
> You must undertake something so great that you
> cannot accomplish it
> unaided."
> 



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to