cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: Woody convertors: date formatting & decimal formatting
Date Tue, 27 Jul 2004 07:42:06 GMT
Gunter 

I am also struggling with this - and also get the 
"," in the output that I want stripped out...

Derek

>>> gunter.dhondt@sofico.be 2004/07/27 09:16:33 AM >>>
Indeed, my mistake; but still got some decimal formatting that doesn't

work properly:

1) 
input=""
output should be "0"
pattern= "#0"
        -> result is ""

2) 
input="0.0"
output should be "0.00"
pattern= "#0.00"
        -> result is "0"

3) 
input="30000.0"
output should be "30000"
pattern= "#0"
        -> result is "30,000" ( I assume this has to be with the
regional 
settings of my machine)

Regards,
Gunter








Bruno Dumon <bruno@outerthought.org> 
26/07/2004 20:25
Please respond to
users@cocoon.apache.org 


To
users@cocoon.apache.org 
cc

Subject
Re: Woody convertors: date formatting & decimal formatting






On Mon, 2004-07-26 at 17:20, Gunter D'Hondt wrote:
> I've changed the binding into:
> 
> 
>     <bnd:value id="mydecimal" path="mydecimal/value">
>             <bnd:convertor datatype="decimal" type="formatting">
>               <bnd:patterns>
>                 <bnd:pattern>#0</bnd:pattern>
>               </bnd:patterns>
>             </bnd:convertor>
>     </bnd:value>

The convertor needs to be in the form definition namespace (fd, or wd
for woody)

> 
> But still the same output; still I don't understand how the form
> definition convertor for my date field does work without a convertor
> in the binding for it (the only difference is that it's an output
> widget and the decimal is a regular field widget.

The explanation is likely that it isn't working at all. It's simply
impossible to set a string value for a date field or output widget.
Maybe the error is silently logged in the log files.

-- 
Bruno Dumon                             http://outerthought.org/ 
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org 


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



-- 
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


Mime
View raw message