cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: AW: Accessing AJAX forms field values
Date Tue, 01 Aug 2006 12:39:22 GMT
Grzegorz Kossakowski napisał(a):
> Christofer Dutz napisał(a):
>
> I have to think about it for a while, maybe come with better solution.


I think better solution is to use even more "push" method. In event 
handler of country widget you create new selectionList[1] basing on 
value of selected country and set this list as a suggestion list of zip 
widget.

<fd:field id="country">
<fd:on-value-changed>
<fd:javascript>
var country = event.sourceWidget.value;
//create selectionList
//[...]
event.sourceWidget.lookup("../zip").suggestionList = yourSelectionList;
<fd:javascript>
</fd:on-value-changed>
</fd:field>

*BUT* this won't work as there is now set method for suggestionList 
property (only get). It seems that clean solution demands little 
patching. Can you undertake of doing it?

[1] 
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/forms/datatype/SelectionList.html

-- 
Grzegorz Kossakowski

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


Mime
View raw message