Re: ERModernDirectToWeb Formatter Bug?
Re: ERModernDirectToWeb Formatter Bug?
- Subject: Re: ERModernDirectToWeb Formatter Bug?
- From: David LeBer <email@hidden>
- Date: Thu, 9 Sep 2010 08:08:36 -0400
On 2010-09-09, at 5:58 AM, David Avendasora wrote:
> Hi all, mostly David LeBer,
>
> I see that a little over a week ago David LB added the following rule:
>
> 40 : *true* => formatter = %Y-%m-%d [com.webobjects.directtoweb.Assignment],
>
> And now any number field that doesn't have a higher priority formatter rule on it fails with:
>
> IllegalArgumentException: The pattern string ("%Y-%m-%d") does not contain a numeric character or symbolic placeholder.
> at com.webobjects.foundation.NSNumberFormatter.validatePattern(NSNumberFormatter.java:1266)
> at com.webobjects.foundation.NSNumberFormatter.setPositivePattern(NSNumberFormatter.java:834)
> at er.extensions.formatters.ERXNumberFormatter.setPositivePattern(ERXNumberFormatter.java:50001)
> at com.webobjects.foundation.NSNumberFormatter.setPattern(NSNumberFormatter.java:890)
> at er.extensions.formatters.ERXNumberFormatter.setPattern(ERXNumberFormatter.java:160)
> at com.webobjects.foundation.NSNumberFormatter.<init>(NSNumberFormatter.java:419)
> at er.extensions.formatters.ERXNumberFormatter.<init>(ERXNumberFormatter.java:106)
> at er.extensions.formatters.ERXNumberFormatter.numberFormatterForPattern(ERXNumberFormatter.java:79)
> ... skipped 118 stack elements
> at er.extensions.appserver.ajax.ERXAjaxApplication.dispatchRequest(ERXAjaxApplication.java:50001)
> ... skipped 1 stack elements
> at com.k12.totalview.app.Application.dispatchRequestImmediately(Application.java:50001)
> ... skipped 1 stack elements
> at com.k12.totalview.app.Application.dispatchRequest(Application.java:42)
> ... skipped 3 stack elements
>
>
> I'm guessing that the rule above's LHS shouldn't just be "true", it should be "smartAttribute.className = 'com.webobjects.foundation.NSTimestamp'"
>
> If this is right, I'll create a patch and Jira ticket for it, but since I'm just feeling my way through D2W, I want to be sure this is right.
Erm, yeah. That's definitely a bug.
My bad. Too much code, not enough sleep.
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
twitter: http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden