Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Setting up actions

Skip Hollowell

2007-03-13


Dave Newton-4 wrote:
> --- Skip Hollowell <skip@...
> <http://www.nabble.com/user/SendEmail.jtp?type=post&post=9458130&i=0>>
> wrote:
> > 1 action per functional part of the app, or 1 action
>
> > per data type, with many results corresponding to
> > each method that I call inside that partuclar
> action?
>
> I think this is mostly a matter of preference, isn't
> it? I find it more concise (overall) to use an Action
> per datatype (when appropriate).
>
> The Actions are still short because much of the work
> is done via injected services.
>
> > <!-- [...]
> >    have a result that goes to a page...I can't
> >    for some reason see the information in the
> >    Account object on the stack, only the account
> >    number from the Account object created at
> submit
> >    from the input page.
>
> Are you setting the Action's account property with the
> one you retrieved? If you aren't redirecting there
> shouldn't be any issues with things like this.
>
There is where I am finally making some headway. But in my
_submitPayment, inside my form, I have to send the hidden
account.acctNumber, so my prepare method can grab the account (again).
I shouldn't have to do this, should I? Since I was able to grab the
account off the stack, what means do I have to submit this
_submitPayment to my AccountAction, and have it still now which Account
I am working with. Am I running into issues because of the the
paramsPrepareParamsStack that is being used for my
AuthenticatcationInterceptor on each page?

I appreciate all of the help so far. For every time that the lightbulb
turns on for me on this, another dark door opens.

Skip Hollowell

    <interceptors>
       <!--
       This AuthenticationInterceptor checks to make sure the that
user is logged in
       before allowing a page/action to be displayed. If the user
is not logged in
       then the interceptor redirects all requests to the
Login_input action
        -->
       <interceptor name="authentication"
               
class="com.its.irmc.interceptor.AuthenticationInterceptor"/>
       <interceptor-stack name="loginuser" >
          <interceptor-ref name="authentication" />
          <interceptor-ref name="paramsPrepareParamsStack"/>
          <interceptor-ref name="defaultStack" />
       </interceptor-stack>
       <interceptor-stack name="guest" >
          <interceptor-ref name="defaultStack"/>
       </interceptor-stack>
    </interceptors>
    <!-- Default interceptor stack. -->
    <default-interceptor-ref name="loginuser" />

> d.
>
>
>
>
> ____________________________________________________________________________________
>
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> <http://www.nabble.com/user/SendEmail.jtp?type=post&post=9458130&i=1>
> For additional commands, e-mail: user-help@...
> <http://www.nabble.com/user/SendEmail.jtp?type=post&post=9458130&i=2>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.