<%FormBean fb = (FormBean)session.getAttribute("FormBean");
AnotherBean p = fb.getAnotherBean();
Hashtable h = p.getAllPropSubtypes();
Enumeration e = h.keys();
for(; e.hasMoreElements(); ) {
String s = (String)e.nextElement();
out.println("a"+s+" = new Array(); a"+s+"Id = new Array();");
Object[] v = ( (Collection)h.get(s) ).toArray();
for(int i =0; i<v.length;i++) {
OptionBean o = (OptionBean)v[i];
out.println("a"+s+"["+i+"]=\""+o.getLabel()+"\"; a"+s+"Id["+i+"]=\""+o.getValue()+"\";");
}
}%
hth, .V
Heligon Sandra wrote:
Could you give me an example of a such tag ?
Because I don't know JavaScript very well.
-----Original Message-----
From: V. Cekvenich [mailto:vicc@;users.sourceforge.net]
Sent: 21 October 2002 16:31
To: [EMAIL PROTECTED]
Subject: Re: Struts and client side features
A good practices is to write a JSP tag that emits JavaScript.
The JavaScript can contain an array list that comes from a bean.
Commonly used on dependent options Collections tag.
.V
Heligon Sandra wrote:
In a Struts application, is it possible to modify a JSP page without
call the server.
My problem is the following I have a page with a list of employees
and the type of one of the column is a check box.
I have two buttons "select all" and "unselect all", that must check
all the employees or uncheck all.
For that no method is called on the server, the result is just a new
version
of a view.
How can I do that ? do I have to use JavaScript ?
On the page I would like to allow user to sort the list (rising or
ascending selection)
by column. It is the same problem, isn't it ?
Sandra-- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>
-- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

