Somewhere on my todo list.
I use an edit string component with a formatter bound to
d2wContext.formatObject. Then in a rule I do:
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]
This works great... as long as you don't have a format exception :-)
I need to update it to do the formatting in validateTakeValueForKeypath the way
ERD2WEditNumber works.
Ramsey
On Dec 29, 2011, at 12:12 PM, Henrique Gomes wrote:
>
>
> Hello,
>
> So what are people using on D2W edit pages for jodaLocalDate fields?
> For display, a simple ERD2WEditString will do it, although I don't think I
> can can apply a custom format then.
> But for editing all the (ER)D2EEditDate* that I find want a string for
> format. I wanted a formatter object to create the jodaLocalDate from the
> string and the other way around.
>
> Do I have to roll my own component, patch one of the existing components or
> is there a simpler solution?
>
> Many thanks.
>
> Henrique Gomes
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
>
> This email sent to [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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]