RE: Scripting variables outside iterate tag

2002-09-17 Thread Miguel Angel Mulero Martinez

Use the request.getParameter(element) or something similar.


-Mensaje original-
De: Luca Zago [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 17 de septiembre de 2002 12:55
Para: Struts Users Mailing List
Asunto: Scripting variables outside iterate tag

Hi,
probably it's a not so hard question, but really I cannot find a
solution to this simple problem.
This is the example of struts documentation:

| logic:iterate id=element name=myhashtable
Next element is bean:write name=element property=value/
/logic:iterate

everything works fine. But I want to use the bean |with the key
'element', inside a scriptlet to do something like this:

html:select property='userUri'
| logic:iterate id=element name=myhashtable|
  html:option value='%= |element|.getName()%'bean:write
name='|element|' property='name'//html:option
/|logic:iterate
/html:select|

but I got obviously an exception becaus java.lang.Object doesn't contain
getName(). The problem is that even the explicit conversion to my bean,
doesn't work..
Somebody has some ideas?

Thank you in advance.

Luca


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Scripting variables outside iterate tag

2002-09-17 Thread Gemes Tibor

2002. szeptember 17. 12:55 dátummal Luca Zago ezt írtad:
 | logic:iterate id=element name=myhashtable|

   html:option value='%= |element|.getName()%'bean:write
 name='|element|' property='name'//html:option
 /|logic:iterate
 /html:select|

Check the html:options tag. 

Tib

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Scripting variables outside iterate tag

2002-09-17 Thread Howard Miller

You can cast the id element by using the key= attribute of
logic:iterate. Use the fully qualified name of the actual object type.

HM

-Original Message-
From: Luca Zago [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 11:55
To: Struts Users Mailing List
Subject: Scripting variables outside iterate tag


Hi,
probably it's a not so hard question, but really I cannot find a 
solution to this simple problem.
This is the example of struts documentation:

| logic:iterate id=element name=myhashtable
Next element is bean:write name=element property=value/
/logic:iterate

everything works fine. But I want to use the bean |with the key 
'element', inside a scriptlet to do something like this:

html:select property='userUri'
| logic:iterate id=element name=myhashtable|
  html:option value='%= |element|.getName()%'bean:write 
name='|element|' property='name'//html:option
/|logic:iterate
/html:select|

but I got obviously an exception becaus java.lang.Object doesn't contain 
getName(). The problem is that even the explicit conversion to my bean, 
doesn't work..
Somebody has some ideas?

Thank you in advance.

Luca


--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]