SmartClient Version: SNAPSHOT_v8.3d_2012-09-27/PowerEdition Deployment (built 2012-09-27)
-------------------------------
Dear Specialists, I have a problem with the SelectItem.
I create a SelectItem with an option datasource. And using manually everything is fine:
But in our application the user can hit a button that should automatically select another value in the picklist:
From the GUI point of view, this works fine. The correct value is selected in the display. But getSelectedRecords() will always return the value I set in code and the prevously selected value(s)! But the previusly selected values are not selected in the GUI. When I click the arrow of the SelectItem and open the picklist (but not necessarily change the selection), getSelectedRecords will return only the selected value from now on.
It is like getSelectedRecords is not updated by setValue(s), only by an GUI event. How can I solve this?
Thanks!
-------------------------------
Dear Specialists, I have a problem with the SelectItem.
I create a SelectItem with an option datasource. And using manually everything is fine:
Code:
tariffModel = new SelectItem("TariffModel", "Tariff Model"); tariffModel.setValueField("TariffModelID"); tariffModel.setDisplayField("TariffModelName"); tariffModel.setOptionDataSource(DataSource.getDataSource("tbTmdTariffModel")); tariffModel.setOptionCriteria(new Criteria("ContractVersionID", contractVersionID)); tariffModel.setOptionOperationId("tariffModelOfContractVersion"); tariffModel.setSortField("TariffModelName"); tariffModel.setMultiple(true); tariffModel.setMultipleAppearance(MultipleAppearance.PICKLIST); tariffModel.setDefaultToFirstOption(true);
Code:
tariffModel.setValues(tariffModelID.toString()); System.out.println(Arrays.toString(tariffModel.getSelectedRecords())); generateBusinessCaseOverview();
It is like getSelectedRecords is not updated by setValue(s), only by an GUI event. How can I solve this?
Thanks!
Comment