You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2008/02/28 15:00:22 UTC

Setting a form field value as an empty string?

(Using Cocoon 2.1.8)
 
I'd like to be able to set the initial, default value of a form to be an empty string;
at the moment, if the user does not fill in a value, then it gets treated as a NULL
value when passed to the database.
 
I have tried:
<fd:initial-value></fd:initial-value>
and
<fd:initial-value> </fd:initial-value>
 
but am still getting a NULL result.
 
Any help is appreciated.
 
Thanks
Derek

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Re: Setting a form field value as an empty string?

Posted by Derek Hohls <DH...@csir.co.za>.
No, I mean that when it comes back from the form it is NULL.

>>> On 2008/02/29 at 03:09, in message <lo...@post.gmane.org>, Joerg Heinicke <jo...@gmx.de> wrote:
Derek Hohls <DHohls <at> csir.co.za> writes:

> I'd like to be able to set the initial, default value of a form to be an empty 
> string; at the moment, if the user does not fill in a value, then it gets
> treated as a NULL value when passed to the database.
>  
> I have tried:
> <fd:initial-value></fd:initial-value>
> and
> <fd:initial-value> </fd:initial-value>
>  
> but am still getting a NULL result.

You mean it's correct in the form, you don't see null on the screen, but in the
database it is NULL? Then I guess you have to fix your binding.

Joerg



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



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: Setting a form field value as an empty string?

Posted by Joerg Heinicke <jo...@gmx.de>.
Derek Hohls <DHohls <at> csir.co.za> writes:

> I'd like to be able to set the initial, default value of a form to be an empty 
> string; at the moment, if the user does not fill in a value, then it gets
> treated as a NULL value when passed to the database.
>  
> I have tried:
> <fd:initial-value></fd:initial-value>
> and
> <fd:initial-value> </fd:initial-value>
>  
> but am still getting a NULL result.

You mean it's correct in the form, you don't see null on the screen, but in the
database it is NULL? Then I guess you have to fix your binding.

Joerg



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


Re: Setting a form field value as an empty string?

Posted by Derek Hohls <DH...@csir.co.za>.
Antonio
 
Does this mean that the patch is available in the version 2.1.10?
 
I have also come to the conclusion that this still does not help me.
What I need is some way to tell Cocoon to pass an empty string
(not "whitespace" per se) and not a NULL from an empty field:
that might require another patch e.g.
 
<fd:initial-value null="true"/> - default (current) behaviour
<fd:initial-value null="false"/> - overrides a null value from an
empty field with an empty string instead when processing values
returned from the form.
 
This option will (obviously) only be applicable to string-type fields.
 
Derek


>>> On 2008/02/28 at 07:19, in message <47...@agssa.net>,
Antonio Gallardo <ag...@agssa.net> wrote:
Hi Derek,

Hope this helps:

https://issues.apache.org/jira/browse/COCOON-1879 

Best Regards,

Antonio Gallardo.

Derek Hohls escribió:
> (Using Cocoon 2.1.8)
>  
> I'd like to be able to set the initial, default value of a form to be

> an empty string;
> at the moment, if the user does not fill in a value, then it gets 
> treated as a NULL
> value when passed to the database.
>  
> I have tried:
> <fd:initial-value></fd:initial-value>
> and
> <fd:initial-value> </fd:initial-value>
>  
> but am still getting a NULL result.
>  
> Any help is appreciated.
>  
> Thanks
> Derek

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


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Re: Setting a form field value as an empty string?

Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Derek,

Hope this helps:

https://issues.apache.org/jira/browse/COCOON-1879

Best Regards,

Antonio Gallardo.

Derek Hohls escribió:
> (Using Cocoon 2.1.8)
>  
> I'd like to be able to set the initial, default value of a form to be 
> an empty string;
> at the moment, if the user does not fill in a value, then it gets 
> treated as a NULL
> value when passed to the database.
>  
> I have tried:
> <fd:initial-value></fd:initial-value>
> and
> <fd:initial-value> </fd:initial-value>
>  
> but am still getting a NULL result.
>  
> Any help is appreciated.
>  
> Thanks
> Derek

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