You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steve Steinitz <st...@datatactics.com.au> on 2004/02/24 01:01:31 UTC

woody field select list null value

Hello,

The Cocoon Wiki's Woody Datatype Reference mentions a "nullable"
attribute which presumably controls whether or not a field's
selection list contains a null choice.  This would be exactly what
we want.  However, our initial investigation suggests that this
"nullable" is not (yet?) implemented.  Does that sound right?

Our selection list comes from our database.

Does woody currently have any facility to help us add a "null" or,
say, a 'No Selection" choice to our field's selection list?  If
not, can anyone suggest a sensible approach?

Thanks for your help,

Steve Steinitz


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


Re: woody field select list null value

Posted by Ugo Cei <u....@cbim.it>.
Steve Steinitz wrote:
> The Cocoon Wiki's Woody Datatype Reference mentions a "nullable"
> attribute which presumably controls whether or not a field's
> selection list contains a null choice.  This would be exactly what
> we want.  However, our initial investigation suggests that this
> "nullable" is not (yet?) implemented.  Does that sound right?

No. Having implemented it myself, I can attest that it works as 
advertised, or at least it did last time I used it.

> Our selection list comes from our database.

Maybe the Wiki page is not very clear on this (I just added a short 
notice to clarify it), but the "nullable" attribute applies only to 
selection lists with type="enum".

> Does woody currently have any facility to help us add a "null" or,
> say, a 'No Selection" choice to our field's selection list?  If
> not, can anyone suggest a sensible approach?

Assuming you're using flowscript and a type="flow-jxpath" selection 
list, just add a suitable item to it after you've retrieved the values 
from the database:

	items.add(0, new MyItemType());

HTH,

		Ugo


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