Ralph Rauscher napisaĆ(a):
>
>
> Thanks Grzegorz! Actually I was thinking about using Unions. In my case
> however this would make things more complicated. One of several reasons
> being that the selection list for my A widget gets filled dynamically.
> Now the set of possible values for my A widget is pretty much unlimited.
> That way I cannot setup union cases in my model as I do not know all
> possible values up-front.
I see.
> Anyone knows if removing a selection list from a widget is possible or
> maybe if it's intentional that there's no such possibility?
I've peeked at Field's code and do not see any obvious place where setting
empty selection list could be blocked somehow. Look at this:
/**
* Set this field's selection list.
* @param selectionList The new selection list.
*/
public void setSelectionList(SelectionList selectionList) {
if (selectionList != null &&
selectionList.getDatatype() != null &&
selectionList.getDatatype() != getDatatype()) {
throw new RuntimeException("Tried to assign a SelectionList that is
not associated with this widget's datatype.");
}
this.selectionList = selectionList;
getForm().addWidgetUpdate(this);
}
I think that setting null selection list is completely valid. Are you sure you
do everything correctly?
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]