-
Sep 5th, 2008, 01:11 PM
#1
Newbie command object question/issue
I'm seeing something bizarre in a simple command object bind operation. When Spring sets the object's fields from the query string values, it is modifying the value as follows; if I pass in "maxpage=4", the "maxpage" field is set to "4,4". I'm not quite sure how to go about even debugging this, so any advice is much appreciated.
Also, I would prefer these fields to be ints rather than Strings, but when I code it this way the fields don't even get populated. Must I use a String datatype to get the query parameters to map to the command object fields, or is there a technique to map them to ints? Again, thanks for any help.
Here's the command object for reference:
public class InstallerCommand {
private String curpage;
private String maxpage;
public String getCurpage() {
return curpage;
}
public void setCurpage(String curpage) {
this.curpage = curpage;
}
public String getMaxpage() {
return maxpage;
}
public void setMaxpage(String maxpage) {
this.maxpage = maxpage;
}
}
-
Sep 5th, 2008, 02:19 PM
#2
never mind
This is not a Spring issue - another service is corrupting the query string data.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules