Results 1 to 7 of 7
  1.    #1  
    Hey all,
    I can't figure how to update a list selector based on the choice on a first list selector within the same scene.
    Any help would be appreciated.

    Thanks.
  2. #2  
    Make sure you're listening for the Mojo.Event.propertyChange event on the first list selector. When that event fires, update the model object that's bound to the second list selector (you can't replace it completely, just change its properties) and call this.controller.modelChanged on the model object for the second list selector. That should do it.
  3.    #3  
    Thanks, Iwill try that.
    What do you mean by "you can't replace the model completly, just its properties"? Does that mean I can't regenerate the entire second list each time the first one is changed?
    For example, the first one has choices like: State, Country
    If I choose Country, the second list load a list of countries, or if I choose State, the second list loads a list of states.
    Would this work?
    Thanks again.
  4. #4  
    Ahh, I see what you mean now. I was talking about how to change which item is selected in the second list when the selection is changed in the first. I don't know how to change the choices offered in the first, though it certainly seems like it should be possible. Sorry.
  5.    #5  
    No problem.
    I have not been able yet to figure it completly. So far my second list populates (the labels) but the values are missing and stay the same than they were when the selctor loaded the first time.
    I decided to use a different technique since, and load the second list in another scene which hands up being better on a usability perspective.
    However, if someone can show us a sample code of what I was asking first, I would love to see the solution as I am sure I and many other will face the issue.

    Thanks again.
  6. #6  
    What you could do, what the list widget documentation suggests, is use these function:
    Code:
    itemsCallback (listWidget, offset, limit)
    listWidget.mojo.noticeUpdatedItems(offset, items)
    it's found here: Lists €“ webOSdev €“ Palm
  7. #7  
    Has anyone figured out updating the List Selectors choices dynamically? I looked up the itemsCallback attribute SirataXero mentioned, but that is only for Lists and not List Selectors AFAIKAFAIKAFAIK.

Posting Permissions