struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lynn Guy <lgu...@yahoo.com>
Subject RE: first time action
Date Mon, 02 Jun 2003 20:17:26 GMT
I'm a newbie at this so if Im off base ignore me and
go on, but....

the ORIGINAL problem was:
"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)"

If I understand correctly he has links on the page
that call his action.  He IS NOT SUBMITTING THE FORM. 
I've not tried this but when he does not submit the
form he does not send the values from his page back he
just goes to the action and gets a new form with the
defaults again. So if somebody has changed the values
from the defaults those changes get lost.

I think he has to submit the form or he is just doing
navigation.


--- "Alawadhi, Mona" <malawadhi@kpmg.com> wrote:
> Thank you very much, Brandon.
> 
> -----Original Message-----
> From: Brandon Goodin [mailto:mail@phase.ws]
> Sent: Monday, June 02, 2003 3:14 PM
> To: Struts Users Mailing List
> Subject: RE: first time action
> 
> 
> I can already see what your problem is. You are not
> using the constructor.
> Instead of using the setPageDefaults from within
> your Action class you
> should be using the Constructof of your ActionForm.
> Give me a few minutes
> and I will send you the code with the adjustments.
> 
> Brandon Goodin
> 
> -----Original Message-----
> From: Alawadhi, Mona [mailto:malawadhi@kpmg.com]
> Sent: Monday, June 02, 2003 1:06 PM
> To: 'Struts Users Mailing List'
> Subject: RE: first time action
> 
> 
> This is what I am using as well.
> 
> and I have this in my Action: HttpSession session =
> request.getSession(true);
> 
> -----Original Message-----
> From: Tim Torbeyns [mailto:torbeynt@yahoo.ie]
> Sent: Monday, June 02, 2003 3:02 PM
> To: Struts Users Mailing List
> Subject: RE: first time action
> 
> 
> you probably not using the latest version of struts
> i'm using struts1.1 rc
> where the scope's default = session !
> 
> Tim
> 
> 
>  --- Brandon Goodin <mail@phase.ws> 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:torbeynt@yahoo.ie]
> > 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" <malawadhi@kpmg.com> 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:mail@phase.ws]
> > > 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:malawadhi@kpmg.com]
> > > 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:mail@phase.ws]
> > > 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:malawadhi@kpmg.com]
> > > 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:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
>
****************************************************************************
> > > *
> > > 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:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
>
****************************************************************************
> > *
> > > 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:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> >
> > __________________________________________________
> > Yahoo! Plus - For a better Internet experience
> > http://uk.promotions.yahoo.com/yplus/yoffer.html
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> 
> __________________________________________________
> Yahoo! Plus - For a better Internet experience
> http://uk.promotions.yahoo.com/yplus/yoffer.html
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
>
****************************************************************************
> *
> 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:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
>
*****************************************************************************
> 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:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message