you probably not using the latest version of struts
i'm using struts1.1 rc
where the scope's default = session !

Tim


 --- Brandon Goodin <[EMAIL PROTECTED]> wrote: > "form is stored in the
session of the user"
> 
> Not so. By default it is in the request. It is only in the session if
> you
> specify it to be (i.e <action scope="...">).
> 
> Ex. (see scope attribute of action element)
> 
> <action path="/admin"
>     parameter="submit"
>     type="ws.phase.core.actions.GenericAction"
>     name="genericForm"
>     validate="false"
>     scope="request">
>   <forward name="auth"
>     path="admin.mainLayout"
>   redirect="false"/>
> </action>
> 
> vs.
> 
> <action path="/admin"
>     parameter="submit"
>     type="ws.phase.core.actions.GenericAction"
>     name="genericForm"
>     validate="false"
>     scope="session">
>   <forward name="auth"
>     path="admin.mainLayout"
>   redirect="false"/>
> </action>
> 
> Brandon Goodin
> 
> 
> -----Original Message-----
> From: Tim Torbeyns [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 02, 2003 12:55 PM
> To: Struts Users Mailing List
> Subject: RE: first time action
> 
> 
> Hi
> 
> you're probably missing something
> the default behaviour of an actionform is that the constructor is
> called only once (at the creation of the form) after it is created
> every form is stored in the session under the name you gave it in the
> form-bean tag of the struts-config file
> 
> so when you have a jsp page with html-form name="action1"
> and you call this page
> the actionform1 is created, constructor of form will be called and
> the
> form is stored in the session of the user
> 
> Tim
> 
>  --- "Alawadhi, Mona" <[EMAIL PROTECTED]> wrote: > Brandon,
> >
> > The values are standard for all.
> > I've tried including the call for setPageDefaults() in the
> > constructor of
> > the ActionForm class, but it didn't work. My guess is that the
> "form"
> > is not
> > created/passed yet since the 'execute' method comes after the
> > constructor. I
> > tried to create a FormBean object in the ActionForm constructor,
> but
> > it
> > didn't work. it doesn't recognize it.
> >
> > and, of course, I cannot include the setPageDefaults() in the
> > FormBean
> > constructor, since the FormBean object gets created every time the
> > Action is
> > called, so, it brings us back to the same problem.
> >
> > I'm thinking now to use a form.submit() method in javascript. I am
> > not sure
> > how to go about that, though, since I do not know javascript.
> >
> > Can you, or anyone from the group help me? I am to pass one hidden
> > filed
> > (which is the letter), and two other radio-button parameters from
> my
> > form to
> > the Action.
> >
> > Thank you :o)
> >
> > Mona <------ JavaScript illiterate.
> >
> > -----Original Message-----
> > From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 02, 2003 2:10 PM
> > To: Struts Users Mailing List
> > Subject: RE: first time action
> >
> >
> > I am a little confused. I am not sure where you are getting your
> > default
> > values from. Are they set as a result of client preferences or are
> > they
> > standard for everyone.
> >
> > If they are standard for all, it might be best to define the
> default
> > values
> > for your ActionForm within the constructor of the ActionForm. That
> > way upon
> > first entry to the page you have the default values set in the
> > ActionForm.
> > After that any form values submitted will be set using the get/set
> of
> > the
> > ActionForm and replace the defaults.
> >
> > If, on the other hand, the default values are set via a dynamic
> > process. You
> > might consider writting two Actions that use the same ActionForm to
> > accomplish this. Or you could do what I do and use the
> > LookupDispatchAction/DispatchAction's uspecified method upon entry
> > and
> > another method of your choosing when submitting the updated form
> > values.
> >
> > Brandon Goodin
> >
> >
> > -----Original Message-----
> > From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 02, 2003 11:52 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: first time action
> >
> >
> > Hello Brandon,
> >
> > I call "SetPageDefaults" the first time my page loads.
> > In my JSP, there are links for the Action :
> > <href="ActionClass.do?parameter="A"> so, the action gets called
> again
> > and
> > again. Also, I have different radio buttons along the page to be
> > selected
> > (the defaults are set for those buttons when the page loads first).
> >
> > The problem is that when I click on that link, it re-loads the
> page,
> > and
> > sets the defaults again. It does not take the new values for the
> > radio
> > buttons(I have three parms in my page). Therefore, I thought there
> > would be
> > some kind of indication whether the page is loading first, in order
> > to
> > include the call for "setPageDefaults" in an if statement and keep
> my
> > selections when I call the Action again.
> >
> > My Page looks something like this:
> >
>
____________________________________________________________________________
> > ___________________________
> >
> > Select display:   o By Contact  o By Taxpayer
> >
> > Type:  o All   o Billing   o Business   o Contact   o Delivery   o
> > Mailing
> >
> >
>
----------------------------------------------------------------------------
> > ----
> >
> >   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q
> > R   S
> > T   U   V   W   X   Y   Z
> >
> > results (when letter A is chosen):
> >
> > Anderson, K.
> > Arizona, B.
> > ... etc
> >
>
____________________________________________________________________________
> > ___________________________
> >
> > The user can select two values from the two radio buttons, and a
> > letter,
> > which is the param passed in <href>.
> >
> > How would I go about passing those three values to the Action
> class?
> >
> > Mona
> >
> > -----Original Message-----
> > From: Brandon Goodin [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 02, 2003 1:42 PM
> > To: Struts Users Mailing List
> > Subject: RE: first time action
> >
> >
> > It would be good to provide a more clear use case. Usually you
> don't
> > have
> > any methods in your ActionForm than the usual getter/setters,
> > validate and
> > reset. So, I'm not sure what you are asking. Please, be more
> specific
> > about
> > what you are trying to accomplish.
> >
> > Brandon Goodin
> >
> > -----Original Message-----
> > From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 02, 2003 11:19 AM
> > To: 'Struts Users Mailing List'
> > Subject: first time action
> >
> >
> > Hello Everyone,
> >
> > I have some methods in my FormBean that I would want to call only
> the
> > first
> > time I go through the Action class (load the page).
> >
> >
> > Any ideas?
> > Mona
> >
> >
> >
>
****************************************************************************
> > *
> > The information in this email is confidential and may be legally
> > privileged.
> > It is intended solely for the addressee. Access to this email by
> > anyone else
> > is unauthorized.
> >
> > If you are not the intended recipient, any disclosure, copying,
> > distribution
> > or any action taken or omitted to be taken in reliance on it, is
> > prohibited
> > and may be unlawful. When addressed to our clients any opinions or
> > advice
> > contained in this email are subject to the terms and conditions
> > expressed in
> > the governing KPMG client engagement letter.
> >
>
****************************************************************************
> > *
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
>
****************************************************************************
> > *
> > The information in this email is confidential and may be legally
> > privileged.
> > It is intended solely for the addressee. Access to this email by
> > anyone else
> > is unauthorized.
> >
> > If you are not the intended recipient, any disclosure, copying,
> > distribution
> > or any action taken or omitted to be taken in reliance on it, is
> > prohibited
> > and may be unlawful. When addressed to our clients any opinions or
> > advice
> > contained in this email are subject to the terms and conditions
> > expressed in
> > the governing KPMG client engagement letter.
> >
>
****************************************************************************
> > *
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
>
****************************************************************************
> *
> > The information in this email is confidential and may be legally
> > privileged.
> > It is intended solely for the addressee. Access to this email by
> > anyone else
> > is unauthorized.
> >
> > If you are not the intended recipient, any disclosure, copying,
> > distribution
> > or any action taken or omitted to be taken in reliance on it, is
> > prohibited
> > and may be unlawful. When addressed to our clients any opinions or
> > advice
> > contained in this email are subject to the terms and conditions
> > expressed in
> > the governing KPMG client engagement letter.
> >
>
****************************************************************************
> *
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
> __________________________________________________
> Yahoo! Plus - For a better Internet experience
> http://uk.promotions.yahoo.com/yplus/yoffer.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  

__________________________________________________
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html

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

Reply via email to