Hello,

Back in December 2011, in this thread:

http://lists.apple.com/archives/webobjects-dev/2011/Dec/msg00440.html

Ramsey described a method for binding an ERXJodaLocalTimeFormatter to (I 
assume) an ERD2WEditString component with this rule:

> 10 : ((smartAttribute.valueFactoryMethod != null and 
> smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className = 
> 'org.joda.time.LocalTime') => formatObject = {"arguments" = ({"className" = 
> "java.lang.String"; "contextKey" = "formatter"; }, {"className" = 
> "java.util.Locale"; "contextKey" = "session.localizer.@locale"; }, 
> {"className" = "java.util.TimeZone"; "contextKey" = "session.timeZone"; }); 
> "className" = "er.extensions.formatters.ERXJodaLocalTimeFormatter"; } 
> [ERDDelayedObjectCreationAssignment]

Firstly, is that still the state of the art, or is there a better way to do it 
now?  Secondly, Ramsey, should that work just as well substituting 
'org.joda.time.LocalDate' and 
'er.extensions.formatters.ERXJodaLocalDateFormatter' above?  Both questions 
arise because that's what I've tried, and I cannot get it to work for the life 
of me.  Specifically, I have these rules:

100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') => 
componentName = "ERD2WEditString" [com.webobjects.directtoweb.Assignment]

50 : ((smartAttribute.valueFactoryMethod != null and 
smartAttribute.factoryMethodArgumentType = 3) and smartAttribute.className = 
'org.joda.time.LocalDate') => formatObject = {"arguments" = ({"className" = 
"java.lang.String"; "contextKey" = "formatter"; }, {"className" = 
"java.util.Locale"; "contextKey" = "session.localizer.@locale"; }, {"className" 
= "java.util.TimeZone"; "contextKey" = "session.timeZone"; }); "className" = 
"er.extensions.formatters.ERXJodaLocalDateFormatter"; } 
[ERDDelayedObjectCreationAssigment]

100 : (entity.name = 'Invoice' and propertyKey = 'invoiceDate') => formatter = 
"d2wContext.formatObject" [com.webobjects.directtoweb.Assignment]

Yet there's no 'formatter' binding when I hover over the invoiceDate field, and 
I continue to get an exception complaining about not having a formatter.


-- 
Paul Hoadley
http://logicsquad.net/




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to