Re: Struts question <html:text>
- From: "Scott Phelps" <root@xxxxxxx>
- Date: Thu, 30 Jun 2005 18:57:48 GMT
"Wendy Smoak" <wsmoak@xxxxxxxxx> wrote in message
news:da1f6s$kcg$1@xxxxxxxxxxxxxxx
> "Scott Phelps" <root@xxxxxxx> wrote
>>
>> How can I make <html:text property="username" size="16"/> display the
> entry
>> a person put in on error, but another when the property is null or ""?
>>
>> I am tring to make the user login filled in by a cookie, but still keep
> the
>> input when the login is incorrect.
>
> When the request first comes in, it goes to an Action. In the Action,
> decide whether this is the "first time" you are displaying the form. If
> so,
> read the cookie, and populate the form property: form.setUsername(
> valueFromCookie );
>
> Then forward to the JSP, and the framework will render the text area with
> the value you specified. When the user submits the form, the framework
> will
> populate the form bean with that value, and so on.
>
> To decide whether this is the "first time" you can do a number of things.
> If the form itself will be POSTed, then you can check whether that's true.
> Or you can set a hidden form element that will only be present if the form
> was actually submitted.
>
> Also take a look at StrutsDialogs:
> http://struts.sourceforge.net/strutsdialogs/index.html
>
> --
> Wendy Smoak
>
>
Actually the first time the page is loaded it is not submited. Just the jsp
page is called. right?
.
- References:
- Struts question <html:text>
- From: Scott Phelps
- Re: Struts question <html:text>
- From: Wendy Smoak
- Struts question <html:text>
- Prev by Date: Re: Question about Struts <logic:iterate> tag
- Next by Date: Re: javaservice not starting service on reboot
- Previous by thread: Re: Struts question <html:text>
- Next by thread: JTable drag and drop rows
- Index(es):
Relevant Pages
|