I found some people are discussing this problem.
When the data type of the attribute is Integer, the value can't be too
large.
We can use toString() to make pre-selecting work.
So I changed my <s:select/> tag to:

       <s:select name="adminGroupMapData.adminRid"
                     headerKey="" headerValue="------"
                     list="adminList" listKey="adminRid"
                     listValue="adminRid"
                     value="%{adminGroupMapData.adminRid.toString()}" />

And it works now.
Is this a bug of struts 2.0.6???

On 7/25/07, Vincent Lin <[EMAIL PROTECTED]> wrote:

Hi!

I am using struts 2.0.6 and I encountered a problem in <s:select/> tag
today.

In my JSP:

<s:select name="adminGroupMapData.adminGroupRid"
                             headerKey="" headerValue="------"
                             list="adminGroupList" listKey="adminGroupRid"
                             listValue="adminGroupRid"/>

In my Action, I have a method:
    public List<AdminGroupEbo> getAdminGroupList() {
       return this.adminGroupList;
    }

The data bean of the list has a get method:
    public Integer getAdminGroupRid() {
        return this.adminGroupRid;
    }

But in my web page the value of the drop-down list generate by <s:select/>
sometimes can't jump to the value
of adminGroupRid in the data bean (adminGroupMapData.adminGroupRid).
I found a rule of thumb that when the value of
adminGroupMapData.adminGroupRid is less than 1000, it works.
But when the value is greater than 1000, it doesn't work.

Why? Is there any way to solve this problem?

Thanks,
Vincent Lin

Reply via email to