Hi,

This how I have done it and seems to work for me.  I am checking for a flag in my reset method before I reset the fields and I have also specified that the scope of the action that is used by the action form set to session.  I hope this makes sense.

config file extract:

<action path="/selectLastMatch"

type="actions.SelectLastMatchAction"

name="lastMatchForm"

input="/lastMatch.jsp"

scope="session">

</action>

 

extract from the reset method in action form subclass:

if( action.equals( VideoLoungeConstants.RESET ) )

{

this.attackAction = Constants.NONE;    // String value

this.defenceAction = Constants.NONE;

this.incident = Constants.NONE;

}

 

extract from jsp page:

<html:form action="/selectLastMatch" focus="attackAction">

<html:select property="attackAction" >

<html:options property="value" collection="attackActionsList" />

</html:select>

</html:form>

 

Chiji

>Reply-To: [EMAIL PROTECTED]

>To: [EMAIL PROTECTED]
>Subject: Remember selection in selection list
>Date: Thu, 27 Sep 2001 11:32:06 +0100
>MIME-Version: 1.0
>Received: from [64.125.133.20] by hotmail.com (3.2) with ESMTP id MHotMailBD7C3D5600CA400438D2407D851407960; Thu, 27 Sep 2001 02:33:10 -0700
>Received: (qmail 70997 invoked by uid 500); 27 Sep 2001 09:32:28 -0000
>Received: (qmail 70990 invoked from network); 27 Sep 2001 09:32:27 -0000
>Received: from smtp3.lix.aon.at (195.3.86.156) by daedalus.apache.org with SMTP; 27 Sep 2001 09:32:27 -0000
>Received: from sts.at ([213.33.83.142])by smtp3.lix.aon.at (Build 98 8.9.3/NT-8.9.3) with ESMTP id LAA08782for <[EMAIL PROTECTED]>; Thu, 27 Sep 2001 11:34:12 +0200
>From struts-user-return-17856-cn081 Thu, 27 Sep 2001 02:34:44 -0700
>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>Precedence: bulk
>list-help:
>list-unsubscribe:
>list-post:
>Delivered-To: mailing list [EMAIL PROTECTED]
>Message-ID: <[EMAIL PROTECTED]>
>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
>X-Accept-Language: en-us
>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
>
>Could anyone please help me with the following problem.
>I have a formular with amoung other input fields the following two
>fields:
>A selection list (java:ComboBox) that looks like that:
>
> Yes
> No
>
>
>and a textarea like that:
> >wrap=physical>
>
>Problem: If an error is detected when validating the form, the page
>is
>forwarded to itsself showing the error messages on top using
> tag in the jsp page.
>Below the error messages is the form where all input fields are
>filled
>with the values entered without the textareas and the "comboboxes".
>These fields are reset.
>How can I manage it that the textarea is filled with the text
>previous
>entered and the "ComboBoxes" are pre-selected with the previous
>selected
>values.
>
>Thanks, Heinz.
>
>
>


Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to