Hi Isomorphic,
this has been asked a lot in the forum, but there never was an answer, apart from "use fetchData()". But the question is when and how to execute this.
So my question is: How does one create a SelectItem that always reloads its data when the picklist is shown. In my language that would be a "SelectItem without cache".
SelectItem.setCachePickListResults() - which seems to be right from the docs - does not do the trick.
This here:
works, but only on click on the tiny arrow. But the pickList is also shown on click in the left "text area" of the SelectItem, and this much more common click does not trigger the reload.
I know that you could use ResultSet-cacheUpdates, but this is not always the right thing and requires code. A "dumb" SelectItem would be better here.
Perhaps a "showPickListHandler" would be useful? Or is there another way?
Thank you & Best regards
Blama
this has been asked a lot in the forum, but there never was an answer, apart from "use fetchData()". But the question is when and how to execute this.
So my question is: How does one create a SelectItem that always reloads its data when the picklist is shown. In my language that would be a "SelectItem without cache".
SelectItem.setCachePickListResults() - which seems to be right from the docs - does not do the trick.
This here:
Code:
addPickerIconClickHandler(new PickerIconClickHandler() { @Override public void onPickerIconClick(PickerIconClickEvent event) { ((SelectItem) event.getFiringItem()).fetchData(); } });
I know that you could use ResultSet-cacheUpdates, but this is not always the right thing and requires code. A "dumb" SelectItem would be better here.
Perhaps a "showPickListHandler" would be useful? Or is there another way?
Thank you & Best regards
Blama
Comment