struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Marco.Mistr...@nokia.com>
Subject logic:iterate question
Date Sun, 06 Jul 2003 19:15:11 GMT
hi all,
	i have a Map-backed action Form which contains an HashMap

the ActionForm is as follows

public MapActionForm extends ActionForm {
	HashMap table = new HashMap();


	public void setValue(String key, String value) {
          ...
      }

	public Object getValue(String key) {
	    ..
      }

      public HashMap getTable() {
		return table;
      }

}


in one of jsp i have to display a textfield for each key contained in the HashMap.

i have written following code (name of the bean is DisplayKeys)

<logic:iterate id="params" collection="<%= displayKeys.getTable() %>">
                      <tr>
                        <td><bean:write name="params"/></td>
                        <td><html:text property="value(<bean:write name="params"/>)"/></td>
                      </tr>
</logic:iterate>

but when i get into the page (after populating the bean) i got following exception:

org.apache.jasper.JasperException: /callservice.jsp(53,79) equal symbol expected

the hashmap contains parameter names.
in the jps i want to display the name of the parameter (done with bean:write name="params")
and i want to display close to teh name an input text with the name of the parameter..

Example:
in the map i have following values

param1, ""
param2, ""


and in the jsp i want to display

param1 : <input type="text" name="param1"/>


anyone can give me some help?

regards
	marco	



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


Mime
View raw message