cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject odd little Woody things
Date Fri, 12 Sep 2003 22:27:12 GMT
I've found some odd little things about Woody that may be features or 
bugs.  Not sure which.

1) asserts only seem to work for equalities.  This works:
        <wd:assert test="Quantity1=Quantity2" />
but this doesn't:
        <wd:assert test="Quanty1 &lt; 3" />
(OT: I wonder what happens when you try to assert the equality of two 
widgets of different base types, e.g., long and string?)

2) setting model properties using from flowscript doesn't 
work for all datatypes.  This works:
        model.account=2 (datatype is long)
but this doesn't:
        model.account=2.03 (datatype is decimal)
Instead you have to use this:
which is at least inconsistent with how other model properties are set.

Looks like request strings get automatically converted to the correct 
datatypes when readFromRequest() in Field object calls convertFromString() 
in FieldDefinition object.  But setting model property programatically 
just calls setValue() in Field object, which does no conversion.  Maybe 
setValue() should call some kind of convert method that handles known 
javascript datatypes?  Sorry, I don't understand Woody well enough to 
offer a more concrete suggestion. 

3) wd:combine expression used in aggregate fields is executed even when 
there are no data values for the "groups" being aggregated.  So if you 
"blank out" (delete all characters) from the phone number in the form1 
example the field displays "+--".  Shouldn't aggregate field remain blank 
when the user blanks it out? 

4) apostrophes (single quote) used in fail messages cause javascript 
error.  This is because the alert statement uses a single quote:
and browsers javascript sees apostrophe as premature truncation of alert 
string.  I think it would be better to write alerts using double quotes
because using single quote as apostrophe is much more common than using 
double quotes in strings.  Most conjunctions on web pages (don't, can't, 
etc) use single quote.

Hope this is helpful.

View raw message