velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany" <ddek...@freemail.hu>
Subject Re: put parameter values back into context?
Date Tue, 26 Mar 2002 01:11:07 GMT
----- Original Message -----
From: "Ken Anderson" <ka@pacific.net>
Sent: Tuesday, March 26, 2002 1:55 AM

Just would like to notice something offtopic:
Perhaps I have overlooked something but when I see this:
  value="!$request.Parameter.Name"
then I think that you forget to encode the value. I know I'm such a fussy
man. :)

> Yes, Thanks. The silent notation $!name works good with form data.
> Much better than this (which is what I did before looking at the users
> guide..)
> :-)
>
> #if ($name)
> <input type="text" name="username" value="$name">
> #else
> <input type="text" name="username" value="">
> #end
>
> Ken
>
>
> "Charles N. Harvey III" wrote:
> >
> > Use the silent notation in the form fields.
> >
> > Do this in your servlet:
> > > >> context.put( "request", request );
> > > >>
> > > >> $request.Parameter.Name
> > > >> $request.Parameter.Password
> > > >> $request.Parameter.FavoriteCheese
> >
> > Then, in your html page use the silent notation so that the first time
> > the page loads you will see blanks, but if the page loads again you will
> > see values filled in.
> >
> > <form>
> > <input type="text" name="username" value="!$request.Parameter.Name" />
> > <input type="submit" value="Submit" />
> > </form>
[snip]


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message