Hi 
   
         I would like to know how to make sure that when the user clicks
'Enter' on the Keyboard, the form does not
Get submitted. Does any one have any ideas.. Thanks.

Raghu

-----Original Message-----
From: Wes Kubo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 3:51 PM
To: Struts Users Mailing List
Subject: RE: Getting hashmap value based on bean value.


Thanks. Works fine and is much cleaner.

Wes

-----Original Message-----
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 11:56 AM
To: 'Struts Users Mailing List'
Subject: RE: Getting hashmap value based on bean value.




Will this work:

<logic:iterate name="myCollection" id="beanA">
  <bean:define id="beanBId" name="beanA" property="beanB.id"/>
  <bean:write name="myHashmap" property="<%=beanBId%>"/>
</logic:iterate>


-----Original Message-----
From: Wes Kubo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 2:38 PM
To: Struts Users Mailing List
Subject: Getting hashmap value based on bean value.

In my jsp I have a collection of beans and a hashmap. One of the things
that I need to display is the name, e.g.

<logic:iterate name="myCollection" id="beanA">
   <bean:write name="beanA" property="beanB.name"] </logic:iterate>

Note that the beanA contains a beanB. Now what I want to is get a value
out of my hashmap based on beanB.id. Theoretically, I want something
like:

<logic:iterate name="myCollection" id="beanA">
   <bean:write name="myHashmap" property="<bean:write name='beanA'
property='beanB.id'/>"/> </logic:iterate>

Which I know doesn't work. I had to resort to using bean:define to
define the id as a scripting variable and then using a scriplet to
display the hashmap, e.g.

<bean:define id="beanBId" name="beanA" property="beanB.id"/> <%=
myHashMap.get(beanBId)%>.

I want to avoid scriptlets but can't figure out how to do this.

Thanks.

Wes


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


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

Reply via email to