Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Type conversion with an array in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Type conversion with an array in Struts2" Watch "Type conversion with an array in Struts2" New topic
Author

Type conversion with an array in Struts2

Jim Ward
Greenhorn

Joined: Mar 13, 2012
Posts: 2
I'm having a problem with type conversion. I'm using hidden fields in displaytag defined as

<s:hidden name="selectId[%{#attr.row_rowNum}]" value="%{#attr.row.assessmentId}" />

In my action I have

List selectId = new ArrayList();

If I look at the parameterMap I can see that I have parameters that look correct, (eg: selectId[1], 11225; selectId[2], 13466; etc.)
but if I iterate my list, I have field descriptors. (eg: [Ljava.lang.String;@dedc00 etc.)

Any help? Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Type conversion with an array in Struts2