Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGridField with setMultiple(true) sending value as Long instead of List

$
0
0
SmartClient Version: v9.1p_2014-08-29/Pro Deployment (built 2014-08-29)

Hi, I have a Listgrid with a ListGridField as follows:

Code:

ListGridField teams = new ListGridField("teamId", "Teams");
teams.setOptionDataSource(teamDS);
teams.setValueField("companyTeamId");
teams.setDisplayField("name");
teams.setMultiple(true);

My problem is that there is a difference in the data being sent by the ListGrid depending on whether or not I used my mouse to select the value in the ListGridField.

If I use my mouse to open the dropdown and select a single item from the list, then the value is a List<Long> with one element which is what I would expect.
Code:

    data:{
        getActive:1,
        sessionId:"78e73263-2e5b-4946-b298-97edcc2c3dee",
        loggedInUserID:19,
        initials:"test",
        email:"test@gmail.com",
        teamId:[
            7
        ],

        groupId:27,
        firstName:"njk",
        lastName:"njk",
        externalId:"123"
    }

But if I instead just TAB to the field and select a value by pressing the down arrow key on my keyboard, the value of the field is a Long and not a List.

Code:

    data:{
        getActive:1,
        sessionId:"78e73263-2e5b-4946-b298-97edcc2c3dee",
        loggedInUserID:19,
        initials:"test",
        email:"test@gmail.com",
        teamId:7,
        groupId:27,
        firstName:"njk",
        lastName:"njk",
        externalId:"123"
    }

Is this intended behavior?

Viewing all articles
Browse latest Browse all 4756

Trending Articles