cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Standard field binding not implemented for selection lists?
Date Mon, 12 Jul 2004 10:46:25 GMT
On 12.07.2004 04:14, Scott Yeadon wrote:
> Hi,
> 
> Based on the CForms documentation, it looks as though the same 
> facilities to bind other fields (namely the XPath notation) is not able 
> to be used for selection lists. For example, if I have an XML file 
> containing a list of elements that I want to display in a list, I either 
> have to put in into the Cocoon-specific markup (i.e use the fd:selector 
> markup) or need to use Javascript (JXPath) (yuck!) to populate the list. 
> Doing the former means I have to essentially hardcode Cocoon-specific 
> markup around data that may be useful in several different contexts, not 
> just Cocoon, just for the sake of being able to bind into a selection list.
> 
> I'm likely to use Java and fudge via an enum type just so I'm not tying 
> the data into Cocoon, but I wanted to check that there is no way the 
> "standard" binding notation wors for selection lists (i.e. using 
> fb:value and path attribute) before I did this.

No, there is not. The problem is simply that the selection list (i.e. 
the options) is not the value of the field, but only the selected value. 
The docu of the binding framework has at least a sample on the 
javascript binding code for binding selection lists:
http://cocoon.apache.org/2.1/userdocs/forms/binding.html#fb%3Ajavascript
Enhancing the binding framework with a special fb:selection-list that 
does the same as the javascript code above might helpful though.

Joerg

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


Mime
View raw message