Re: Struts question <html:text>




"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?


.



Relevant Pages

  • Re: WinForms Performance issues
    ... "compile" it into a native image on my user's desktops. ... I'm rooting for the .NET framework to have performance hidden in it ... When I run my app through an obfuscator and it compiles in the .NET ... Is it slow the first time you run it and faster subsequestly? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ImpractiCello [was Re: scheme seems neater]
    ... I mentioned that the first time. ... isn't practicality almost by definition doing something ... portable layer (and getting stuck with a C framework) or... ... Google for the Lisp body count from those ...
    (comp.lang.lisp)
  • Re: Security Issue with .Net framework 1.1
    ... the framework from 1.0 to 1.1 recently. ... client, it fails at a point where it tries to load a file giving a security ... If i start the application from the server the first time, ...
    (microsoft.public.dotnet.framework)
  • Re: JSP/Servlet performance related question
    ... Aside from the delay the first time you access a JSP, ... major delay in running the JSP. ... with only one DB call (i.e very first time user requests results I make ...
    (comp.lang.java.programmer)
  • Re: Struts question
    ... prevent a user from ever navigating directly to a JSP. ... files under WEB-INF where the container is forbidden to serve them ... You are correct in that the first time the page loads, ...
    (comp.lang.java.programmer)