WebWork Tip of the Day: Type Conversion when using ModelDriven
Googling for people’s experiences with WebWork rarely turns up any results other than the docs and the equivalent at Struts 2, so most of the time finding out how to do something involves looking at the showcase. However, I found something it doesn’t do today - type conversion in a model driven action.
The trick is to specify your conversion properties on the model itself, not the action as you usually would. Makes plenty of sense now, but I wished I’d figured that out much earlier
Technorati Tags: webwork java
- BROWSE / IN TIMELINE
- « OGNL Maps in WebWork using JSP 2.1
- » Moving to Mac OS X: from Thunderbird to Apple Mail
COMMENTS / 2 COMMENTS
Dave added these pithy words on Aug 12 06 at 1:21 pmI am struggling with precisely this today. After your hint I was able to get it going by putting the converter on the Model. However, I can’t seem to get the model populated in my save action. The page displays fine, with the iterator showing all the properties of my list. However, when this form is submitted, I can’t get those values in my action bean. Any tips would be appreciated.
Brett Porter added these pithy words on Aug 12 06 at 2:02 pmGlad I was some help. I’m not sure how to solve your problem, but the code I was working on is open source so you can see that to see if you can line yours up, since it is working.
http://svn.apache.org/repos/asf/maven/repository-manager/trunkwith Maven 2:
mvn install; mvn -f maven-repository-webapp/pom.xml jetty:run
SPEAK / ADD YOUR COMMENT
Comments are moderated.


Recent Comments