When we model a new EOModel is the recommendation to use jodaLocalDateTime??? or it depends?
-- Paul Yu Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, June 12, 2012 at 11:08 AM, Ramsey Gurley wrote: > The component I'm using isn't in wonder. Have a look at R2D2WEditDate. > > https://github.com/nullterminated/ponder/tree/master/ERR2d2w > > Ramsey > > On Jun 12, 2012, at 4:18 AM, Paul Hoadley wrote: > > > 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 > > (http://web.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 (http://web.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] > > (mailto:[email protected])) > > Help/Unsubscribe/Update your Subscription: > > https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com > > > > This email sent to [email protected] (mailto:[email protected]) > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected] > (mailto:[email protected])) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com > > This email sent to [email protected] (mailto:[email protected])
_______________________________________________ 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]
