Re: D2W Rules for Joda.LocalDate Edit
Re: D2W Rules for Joda.LocalDate Edit
- Subject: Re: D2W Rules for Joda.LocalDate Edit
- From: Ramsey Gurley <email@hidden>
- Date: Mon, 30 Jul 2012 09:49:49 -0700
On Jul 30, 2012, at 5:52 AM, Paul Yu wrote:
> Ramsey
>
> So I'm trying to use you R2 stuff. There are lots of errors in the project, even after I switched to the integration branch.
I think there's some stuff I haven't checked in that's in progress. Or I just forgot. I'll have to look again.
I just got my first android and it has been taking up most of my free geek time lately :-)
>
> How do I specify the formatObject in the rule?
Just go into ERR2D2W/Resources/d2w.d2wmodel and search it for formatObject. Here's the one for joda LocalDate
10 : ((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"; } [ERDDelayedObjectCreationAssignment]
It uses the delayed object creation assignment to dynamically create them when needed. If you need to change the format string, it still uses the formatter RHS key that all the looks use.
Ramsey
>
> Paul
> On Jul 27, 2012, at 7:47 PM, Ramsey Gurley wrote:
>
>>
>> On Jul 27, 2012, at 4:23 PM, Paul Hoadley wrote:
>>
>>> Hi Paul,
>>>
>>> On 28/07/2012, at 6:25 AM, Paul Yu wrote:
>>>
>>>> What are the rules for editing/picking a property of Joda.LocalDate?
>>>
>>> If Ramsey's component is suitable for you, that's great, but when I checked it out a couple of months ago, R2D2W was dependent on Wonder's integration branch. (Is it still, Ramsey?)
>>
>> Who has time to wait for master? :-) I commit fixes to integration. By the time those get merged to master, I've already got other fixes committed to integration. The only way master is going to catch up to me is if I stop working on ponder for a month or two. That's a different discussion though.
>>
>>> If that's a bit too bleeding edge for your purposes, it's fairly straightforward to put together a rudimentary property-level component to allow for manual LocalDate entry into a text field.
>>
>> The date components and relevant rules can be copy pasted into another project and they'll work. I've done that on a project recently :-) However, if you're using any other look, you'll need to remove the accessibility features from the original html (proper form labels) or you'll get double labeling. R2 is decidedly different in this respect.
>>
>>> Let me know if you want me to post some code.
>>
>> The more the merrier :-)
>>
>> Ramsey
>>
>
_______________________________________________
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