Your welcome! I will try to publish this snippet somewhere in the guide.
Thanks Andrea,
I was trying what you sent in your previous message and I was having
trouble figuring out how to get the value set on the target property model.
Your code here, especially this line:
Here is some code of a possible solution:
public class DropDownChoiceForStringT extends DropDownChoiceT {
private IModelString targetModel;
public DropDownChoiceForString(String id, IModelT model, IModelString
targetModel, List? extends T choices,
IChoiceRenderer? super T
Thanks Andrea,
I was trying what you sent in your previous message and I was having
trouble figuring out how to get the value set on the target property model.
Your code here, especially this line:
targetModel.setObject(getChoiceRenderer().getIdValue(newSelection,
choiceIndex));
was
To make this easier to understand, let's say that I have a list of state
abbreviations for example AL, AK, AZ, AR etcetera (the actual example has
two letter abbreviations also, but much longer names). I need a
DropDownChoice that shows the abbreviations for selection (e.g., AK) but
will show the
Hi,
I needed something similar in a couple of projects. One solution is to
create a custom DropDownChoice which takes also the string model to
update. Then you can override onModelChanged to update the string model
with the new value that can be extracted with the ChoiceRenderer.
To make