Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Set ComponentID on ComboBoxItem Request

    SmartClient Version: SNAPSHOT_v9.0d_2013-04-25/PowerEdition Deployment (built 2013-04-25)

    I'm trying to specifically set the componentId on requests from a ComboBoxItem.

    The request is generating:

    Code:
    {
        dataSource:"MainNavigationTree", 
        operationType:"fetch", 
        operationId:"ImportAll", 
        componentId:"isc_PickListMenu_1", 
        data:{
            foobar:1963, 
            barName:"enet", 
            PK_FOO:296
        }, 
        startRow:0, 
        endRow:75, 
        sortBy:{
            "0":"RTL_to_synthesis", 
            Class:"Array", 
            localeStringFormatter:"toString"
        }, 
        textMatchStyle:"startsWith", 
        resultSet:[ResultSet ID:isc_ResultSet_6 (created by: isc_PickListMenu_1)], 
        callback:{
            caller:[ResultSet ID:isc_ResultSet_6 (created by: isc_PickListMenu_1)], 
            methodName:"fetchRemoteDataReply"
        }, 
        willHandleError:true, 
        showPrompt:false, 
        prompt:"Finding Records that match your criteria...", 
        oldValues:{
            foobar:1963, 
            barName:"enet", 
            PK_FOO:296
        }, 
        requestId:"MainNavigationTree_request54", 
        clientContext:{
            requestIndex:{
                Class:"Number"
            }
        }, 
        fallbackToEval:false, 
        bypassCache:true
    }
    I have tried these options (not at the same time) and both failed to set componentId in the request.

    Code:
    myCombo.setPickListProperties(new ListGrid() {{ setID("name_i_want"); }}); 
    
    myCombo.setOptionFilterContext(new DSRequest(){{setComponentId("name_i_want");}});
    How do I solve this problem?

    #2
    You don't - you're not intended to be able to "spoof" the componentId to be something false, and PickLists are reused so you can't set unique IDs on them.

    You should use two different operationIds instead if you are trying to create a distinct behavior for this component, or log it's requests differently, or whatever you had in mind.

    Comment


      #3
      Okay thanks.

      Will work around issue using the OperationId of the request.

      Comment

      Working...
      X