Re: html:select default value in Struts

From: LDM (ldemendi_at_webtiss.com)
Date: 10/14/03


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?



Relevant Pages

  • Re: Workflow application
    ... Infopath forms, and better reporting.. ... workflow engine based on Infopath and Sharepoint. ... Microsoft now makes available a toolkit for creating sharepoint ... > database that stores the workflow steps)? ...
    (microsoft.public.sharepoint.portalserver.development)
  • RE: Checking workflow usage.
    ... \par I found that the Web Interface where you see how may places a workflow is associated is using the SPWorkflowManager.CountWorkflowAssociations method to count the WorkflowAssociation amount. ... \par The stored procedure is query the table dbo.WorkflowAssociation to get the information. ... Please check the dbo.WorkflowAssociation table in the content database. ...
    (microsoft.public.sharepoint.portalserver.development)
  • how to develop workflow based applications in asp.net 2.0
    ... I want to develop a workflow based application in asp.net 2.0. ... It includes sequential & parallel activities, notifications, database ...
    (microsoft.public.dotnet.framework.aspnet)