cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Rauscher <...@blue-elephant-systems.com>
Subject Re: Field widget selection lists
Date Mon, 16 Apr 2007 20:14:16 GMT


Grzegorz Kossakowski wrote:
> Ralph Rauscher napisaƂ(a):
>   
>> Hi!
>>
>> I'm trying to achieve the following:
>>
>> I'm having 2 widgets. The first widget, A, should determine whether the
>> second widget B is displayed either as
>>
>> - a drop down where a user can choose one of several predefined values
>> - or: as an input box where a user can enter data freely
>>
>> Now if I start out with widget B as a nomal input field, then use the
>> on-value-changed of widget A to add a selection list to B via flowscript
>> this works perfect. The problem starts if I now try to unset or reset
>> that selection list so the widget becomes a standard input field again.
>>
>> From what I can see in the cocoon source resetting or removing a
>> selection list once it is set does not seem to be possible. Using
>> setSelectionList(null) will just be discarded and I can't find another
>> method that would accomplish this. Is there something I oversaw?
>>
>>     
>
> I'm not sure about deleting selection list but what about using union widget[1]? Is there
anything that stops you using it? Use of Union
> widget should lead to cleaner form definition, also.
>
> [1] http://cocoon.zones.apache.org/daisy/cdocs-forms/g1/forms/widgets/741.html
>
>   
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.

Anyone knows if removing a selection list from a widget is possible or 
maybe if it's intentional that there's no such possibility?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message