You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by JH...@rev.state.ne.us on 2003/03/06 00:28:16 UTC

directly from a HashMap?

By accident I discovered that I am able to display information directly
from a HashMap using <bean:write>:

<bean:write name="myHashMap" property="myKey"/>

Based on my reading of the Bean Tags API Reference I didn't think it was
possible to do this.

I have done something similar using Map-backed ActionForms with setValue()
and getValue methods that
access a private HashMap:

<bean:write name="myBean" property="value(myKey)"/>

Is there any reason why it would not be a good practice to display
information directly from a HashMap using  <bean:write>?

Thanks for any ideas on this.
Jack



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org