Re: html:select default value in Struts
From: LDM (ldemendi_at_webtiss.com)
Date: 10/14/03
- Next message: Frank Lorenz: "Trigger Downloaddialog"
- Previous message: René Smolin: "language in jcolorchooser"
- In reply to: Wendy S: "Re: html:select default value in Struts"
- Next in thread: Wendy S: "Re: html:select default value in Struts"
- Reply: Wendy S: "Re: html:select default value in Struts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Oct 2003 05:00:26 -0700
The workflow looks like this:
BuildList.do
page1.jsp ---------------> page2.jsp
BuildListAction is called, and builds a selection list in page2.jsp
with data retrieved from a database, as you guessed.
GetData.do
page2.jsp ---------------> page2.jsp (updated)
page2.jsp contains GetDataForm with the <html:select> valued to
"Choose one". When this form is submitted, page2.jsp is updated by
GetDataAction with other data retrieved from the database.
And I'd like the <html:select> staying with the value I've just
selected.
When I go back to page1.jsp and then return to page2.jsp,
<html:select> must be valued to "Choose one".
"Wendy S" <wendywds@hotmail.com> wrote in message news:<bmee76$h88$1@news.asu.edu>...
> "LDM" <ldemendi@webtiss.com> wrote in message
> news:72ee74ca.0310130023.1c5ee2d1@posting.google.com...
> > I use an Action to do this.
> > So, how to do what you said?
> > If we consider that I have a 'BuildListAction' action which builds my
> > selection list, and in my JSP a 'GetDataForm' form associated with a
> > 'GetDataAction', I just can't see how I should refer to my
> > 'GetDataForm' form in my 'BuildListAction' action...
> > Thanks for your help.
>
> Obviously I haven't seen your code, but I don't think 'BuildListAction'
> needs to be its own separate Action. It sounds like it belongs in
> supporting code, perhaps part of the data access layer if this data is
> coming from a database.
>
> Then in the 'GetDataAction', you call this other code, perhaps
> ListDAO.getList("something"); and place that in request or session scope.
> To figure out if this is the "first" time, you can do something like look
> for the presence of a hidden form field, or check whether the request has
> been POSTed to you, rather than a GET.
>
> Can you post the workflow as it stands now? What URL is visited first,
> which JSP does it go to, where does the form on that JSP go?
- Next message: Frank Lorenz: "Trigger Downloaddialog"
- Previous message: René Smolin: "language in jcolorchooser"
- In reply to: Wendy S: "Re: html:select default value in Struts"
- Next in thread: Wendy S: "Re: html:select default value in Struts"
- Reply: Wendy S: "Re: html:select default value in Struts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|