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

    Why do i get this error on my SelectItem?

    I am trying to manually remove a possible choice from a SelectItem (the choices are originally defined in a ds.xml-file). (It should be removed under certain conditions.

    So, i thought i'd call "getClientPickListData", However, i get a strange error message in the log:

    Code: (TypeError) : self_0_g$.getClientPickListData is not a function
    According to the javadoc, the method exists. I have initialized the form with fields etc., and the field is found

    SelectItem select = (SelectItem) form.getField("itype");
    Object clientPickListDataxx = select.getClientPickListData();
    Anybody knows what i am doing wrong? Should i remove a choice in the selectitem another way?

    This is probably happening because you are attempting to access the items before the form has actually been created/drawn. But the approach could not have worked anyway because you wouldn't be allowed to modify the returned data. The right approach is simply setValueMap().


      Right. Well i was actually not going to modify it, i just wanted to get the titlevalues out so that i could get the ones to use for the setvaluemap. But i realized i should get those from the DataSource instead. Thanks.