You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <ml...@comcast.net> on 2006/07/12 02:14:16 UTC

selection list w/ null default?

Hi,

I have a <selection-list type="flow-jxpath"> whose list is a Collection 
that's passed directly out of the model layer of my application.  
However, the field is optional and I need the user to be able to submit 
with a null value for this widget.  The label should be something like 
"-- none --".

I guess I could call addItem() from the flowscript, but it looks like 
that would append the new value to the end of the selection list.  I 
kind of want it to be at the beginning.

How do I do this?

Thanks,
—ml—


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


Re: selection list w/ null default?

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jul 11, 2006, at 7:11 PM, Antonio Gallardo wrote:

> Use the @null-text. In your case, something like:
>
> <fd:selection-list type="flow-jxpath" list-path="myList" 
> value-path="beanId" label-path="beanLabel" null-text="-- none --"/>

ah, ok... this project is still using 2.1.7, looks like that went in in 
2.1.8.

Thanks a lot,
—ml—


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


Re: selection list w/ null default?

Posted by Antonio Gallardo <an...@apache.org>.
Hi Mark,

Use the @null-text. In your case, something like:

<fd:selection-list type="flow-jxpath" list-path="myList" 
value-path="beanId" label-path="beanLabel" null-text="-- none --"/>

Best Regards,

Antonio Gallardo

Best Regards
Mark Lundquist escribió:
> Hi,
>
> I have a <selection-list type="flow-jxpath"> whose list is a 
> Collection that's passed directly out of the model layer of my 
> application. However, the field is optional and I need the user to be 
> able to submit with a null value for this widget. The label should be 
> something like "-- none --".
>
> I guess I could call addItem() from the flowscript, but it looks like 
> that would append the new value to the end of the selection list. I 
> kind of want it to be at the beginning.

>
> How do I do this?
>
> Thanks,
> —ml—
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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