cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uchenna Igwebuike" <>
Subject RE: Can a Woody selection-list relationship be not set?
Date Wed, 17 Mar 2004 14:43:10 GMT
I use the FlowJXPathSelectionList to populate my selection lists from
bean collections. You can use an extension of that model to insert a
prompt message into the selection lists. The prompt message should be
located in a message bundle that you refer to in the form definition.
You also have to insert an entry in the cocoon.xconf.

1.	Compile the two classes attached and drop them into your cocoon
2.	Insert the following entry into your cocoon.xconf - in the
<woody-selection-lists> element

ilder" name="flow-jxpath-wprompt"/>

3.  Refer to the list in your form eg
           <wd:selection-list type="flow-jxpath-wprompt"
list-path="stockMeasure" value-path="id"
                label-path="concat(name,' - ',description)"

4. Insert the msg-key in your default resource bundle for that sitemap
  <message key="selection.prompt">Please Select</message>

-----Original Message-----
From: Ulf Sahlin [] 
Sent: Tuesday, March 16, 2004 6:13 PM
To: Cocoon Users
Subject: Can a Woody selection-list relationship be not set?


Maybe this is a silly question but I couldn't find an answer in the
mail-list archives nor the Wiki.

I want to be able to have a [0..1] cardinality on the one-side of a
relationship (e.g. the relationship could either be set or not be set).

If I use a selection-list in the Woody model I get a nice <select>-style
output, however the relationship NEEDS to be set this way. Is there some
standard way I could allow the relationship to NOT be set? If I put an
<wd:item/> at the beginning of the selection-list I have the option of
selecting that empty option, somehow meaning the relationship isn't set.
However this does not translate very well when the form is to be saved
the object. The error I get is some BindingException - which is well
what I

I would very much like to solve this somwhere in the model rather than
the selection-list item list, since imho it's a near-model issue. Any

  Ulf Sahlin

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message