struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Almeida <mig...@almeida.at>
Subject Type conversion on a Map
Date Thu, 20 Sep 2012 16:45:14 GMT
Dear all,

Considering:
1) the action property Map<CodeProperty, String> complexMap;
2) CodeProperty has an int id property

How would you configure type conversion and refer to it on the JSP to
populate it?

I am currently trying the following -conversion configuration:
KeyProperty_complexMap=id
Element_complexMap=java.lang.String
Key_complexMap=persist.model.CodeProperty
CreateIfNull_complexMap=true


However, a simple jUnit test where I populate the request with
getRequest().setParameter("complexMap[" + String.valueOf(33) +
"]","test") doesn't populate the map as expected.

Is the -conversion file wrong, the parameter set in the unit test, or
both?

Cheers,

Miguel Almeida

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message