You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sarath Chandra M <sa...@uaeexchange.com> on 2002/11/28 15:37:53 UTC

generate from javascript locally

Dear group,
I have a some jsp pages which have the same dropdown lists
(<html:option> tags)
like country lists, etc. Instead of generating them at serverside
everytime,
I would like to hav them stored in a javascript file and built
on-the-fly
whenever the page is served to the client. 
Can anybody suggest a better way to do this type of list generation.

tia
sarath


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: generate from javascript locally

Posted by Patrice <pp...@nerim.net>.
I think you should use the <html:options> to display your options: generate
the collection, and place it as request attribute in an action. So,
everywhere you want to
display the options:
<html:select property="myProperty">
  <html:options collection="myOptionsCollection" property="propertyForValue"
labelProperty="propertyForLabel"/>
</html:select>

Hope it helps
Patrice

----- Original Message -----
From: "Sarath Chandra M" <sa...@uaeexchange.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, November 28, 2002 3:37 PM
Subject: generate <html:option> from javascript locally


> Dear group,
> I have a some jsp pages which have the same dropdown lists
> (<html:option> tags)
> like country lists, etc. Instead of generating them at serverside
> everytime,
> I would like to hav them stored in a javascript file and built
> on-the-fly
> whenever the page is served to the client.
> Can anybody suggest a better way to do this type of list generation.
>
> tia
> sarath
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>