You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Asaf Paris Mandoki <as...@gmail.com> on 2007/06/30 00:30:48 UTC
Bean population
On the tutorial says that the framework automatically populates the
action beans. How does the framework do this? Is there a way to tweak
the way it populates the the beans?
For example if a user sends a number and I, for a strange reason would
like to pupulate the bean with twice that number, how could I do it on
this level?
Thanks in andvance,
Asaf
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Bean population
Posted by Sean Conlon <sc...@credera.com>.
I'm not sure if I completely understand what exactly you are trying to do, but on the Bean, why not just have something like this:
public void setUserInput(Long num){
this.userInput = num * 2L;
}
If this does not help, please give more information.
- Sean
________________________________
From: Asaf Paris Mandoki [mailto:asafpm@gmail.com]
Sent: Fri 6/29/2007 5:30 PM
To: user@struts.apache.org
Subject: Bean population
On the tutorial says that the framework automatically populates the
action beans. How does the framework do this? Is there a way to tweak
the way it populates the the beans?
For example if a user sends a number and I, for a strange reason would
like to pupulate the bean with twice that number, how could I do it on
this level?
Thanks in andvance,
Asaf
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Bean population
Posted by Dave Newton <ne...@yahoo.com>.
You want to look in to creating your own type
converters.
http://struts.apache.org/2.x/docs/type-conversion.html
--- Asaf Paris Mandoki <as...@gmail.com> wrote:
> So what I should do is remove the
> ParametersInterceptor from my
> interceptors configuration and add my "extended"
> version ?
>
> I think this is what I was looking for. II'l have to
> do some experimenting.
>
> To answer Sean Conlon what I need is more
> complicated. The example
> wasn't good. The bottom is that I want the user to
> submit a set of
> data. Then process the data and send it to the
> Action Class without
> the Action class knowing what the original data was
> or what
> proccessing has been done.
>
> Thanks for your answers
> Asaf
>
> On 6/30/07, Zarar Siddiqi <za...@gmail.com> wrote:
> >
> > That magic starts happening in
> >
>
http://struts.apache.org/2.0.8/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ParametersInterceptor.html
> > ParametersInterceptor . Take a look at the
> javadocs and source to see how
> > its done. You could then extend the class or
> write a new interceptor which
> > does all the crazy stuff you need.
> >
> > Zarar
> >
> >
> >
> >
> >
> > Asaf Paris Mandoki wrote:
> > >
> > > On the tutorial says that the framework
> automatically populates the
> > > action beans. How does the framework do this? Is
> there a way to tweak
> > > the way it populates the the beans?
> > >
> > > For example if a user sends a number and I, for
> a strange reason would
> > > like to pupulate the bean with twice that
> number, how could I do it on
> > > this level?
> > >
> > > Thanks in andvance,
> > > Asaf
> > >
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> user-help@struts.apache.org
> > >
> > >
> > >
> >
> > --
> > View this message in context:
>
http://www.nabble.com/Bean-population-tf4002466.html#a11370925
> > Sent from the Struts - User mailing list archive
> at Nabble.com.
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Bean population
Posted by Asaf Paris Mandoki <as...@gmail.com>.
So what I should do is remove the ParametersInterceptor from my
interceptors configuration and add my "extended" version ?
I think this is what I was looking for. II'l have to do some experimenting.
To answer Sean Conlon what I need is more complicated. The example
wasn't good. The bottom is that I want the user to submit a set of
data. Then process the data and send it to the Action Class without
the Action class knowing what the original data was or what
proccessing has been done.
Thanks for your answers
Asaf
On 6/30/07, Zarar Siddiqi <za...@gmail.com> wrote:
>
> That magic starts happening in
> http://struts.apache.org/2.0.8/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ParametersInterceptor.html
> ParametersInterceptor . Take a look at the javadocs and source to see how
> its done. You could then extend the class or write a new interceptor which
> does all the crazy stuff you need.
>
> Zarar
>
>
>
>
>
> Asaf Paris Mandoki wrote:
> >
> > On the tutorial says that the framework automatically populates the
> > action beans. How does the framework do this? Is there a way to tweak
> > the way it populates the the beans?
> >
> > For example if a user sends a number and I, for a strange reason would
> > like to pupulate the bean with twice that number, how could I do it on
> > this level?
> >
> > Thanks in andvance,
> > Asaf
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Bean-population-tf4002466.html#a11370925
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Bean population
Posted by Zarar Siddiqi <za...@gmail.com>.
That magic starts happening in
http://struts.apache.org/2.0.8/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/ParametersInterceptor.html
ParametersInterceptor . Take a look at the javadocs and source to see how
its done. You could then extend the class or write a new interceptor which
does all the crazy stuff you need.
Zarar
Asaf Paris Mandoki wrote:
>
> On the tutorial says that the framework automatically populates the
> action beans. How does the framework do this? Is there a way to tweak
> the way it populates the the beans?
>
> For example if a user sends a number and I, for a strange reason would
> like to pupulate the bean with twice that number, how could I do it on
> this level?
>
> Thanks in andvance,
> Asaf
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Bean-population-tf4002466.html#a11370925
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org