Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Custom tag and map-backed action

stanlick

2008-09-22

Replies: Find Java Web Hosting

Author LoginPost Reply

I encountered a very strange situation today. I had the following in a web
page:


<s:iterator value="employees">
  <s:textfield name="employees[%{key}].id .../>

where the get method in my action was:

public Map<String,Employee> getEmployees()

The employee id 7932F was being interpreted as 7932! The trailing "F" was
apparently being considered a literal for FLOAT and was being trimmed off
the String.

When I wrapped the variable in quotes is worked

<s:textfield name="employees[ '%{key' }].id .../>

Does this appear to be a bug?


--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.