ERModernDirectToWeb -> ERMD2WQueryDateRange

--
David LeBer
Codeferous Software

On 2013-03-22, at 10:13 AM, Theodore Petrosky <[email protected]> wrote:

> 
> I am trying to figure out how 'they' got:
> 
> public class ERD2WQueryDateRange extends D2WQueryDateRange
> 
> to attach the CCDatePicker? I don't get it. Where is the magic happening. I 
> assume I can hack something together if I can understand what was done before.
> 
> If you know, pass it on, I will keep digging through the source to find it.
> 
> Ted
> 
> 
> --- On Thu, 3/21/13, Ramsey Gurley <[email protected]> wrote:
> 
>> From: Ramsey Gurley <[email protected]>
>> Subject: Re: joda dates in D2W
>> To: "Theodore Petrosky" <[email protected]>
>> Cc: "WebObjects Development" <[email protected]>
>> Date: Thursday, March 21, 2013, 12:07 PM
>> 
>> On Mar 21, 2013, at 7:49 AM, Theodore Petrosky wrote:
>> 
>>> I am playing with it and it starts me on the path to
>> learn how things work. Do you have any rules that you have
>> used with this component. Obviously the formatters are
>> different for Joda. 
>> 
>> Just rules for formatObject I think. You'll notice the last
>> one has a timestamp formatter that is only in integration at
>> the moment. I've added a copy of it to my framework until
>> that lands on wonder master.
>> 
>> 10 : ((smartAttribute.valueFactoryMethod != null and
>> smartAttribute.factoryMethodArgumentType = 3) and
>> smartAttribute.className = 'org.joda.time.DateTime') =>
>> 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.ERXJodaDateTimeFormatter"; }
>> [ERDDelayedObjectCreationAssignment]
>> 
>> 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]
>> 
>> 10 : ((smartAttribute.valueFactoryMethod != null and
>> smartAttribute.factoryMethodArgumentType = 3) and
>> smartAttribute.className = 'org.joda.time.LocalDateTime')
>> => 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.ERXJodaLocalDateTimeFormatter"; }
>> [ERDDelayedObjectCreationAssignment]
>> 
>> 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]
>> 
>> 10 : smartAttribute.className =
>> 'com.webobjects.foundation.NSTimestamp' => 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.ERXNSTimestampFormatter"; }
>> [ERDDelayedObjectCreationAssignment]
>> 
>> 
>>> also did you get the CCDatePicker to work with these
>> text fields?
>> 
>> 
>> Ewwww... Javascript ;-) 
>> 
>> I'd prefer to put together a component based on html5 date
>> and time inputs. Still waiting on chrome support for
>> datetime and firefox support for anything tho :-/
>> 
>> http://miketaylr.com/code/html5-forms-ui-support.html
>> 
>> 
>>> I can not figure out how the date picker get wired into
>> the 'Normal' ER version.
>>> 
>>> oh how I love d2w
>> 
>> It isn't written so that you just assign a class to your
>> input and it automatically attaches itself to it? Maybe with
>> a data- attribute for format and such? Oh, just looked. No,
>> it doesn't do that. You are supposed to enjoy how supar
>> awesome fun it is to write your own javascripts to get it
>> going :-) Looks like most of that work is done for you in
>> the CCDatePicker java tho.
>> 
>> Ramsey
>> 
>>> 
>>> Ted
>>> 
>>> --- On Wed, 3/20/13, Ramsey Gurley <[email protected]>
>> wrote:
>>> 
>>>> From: Ramsey Gurley <[email protected]>
>>>> Subject: Re: joda dates in D2W
>>>> To: "Theodore Petrosky" <[email protected]>
>>>> Cc: "WebObjects Development" <[email protected]>
>>>> Date: Wednesday, March 20, 2013, 4:14 PM
>>>> You need a property level component
>>>> that can handle joda stuff. I have one in r2 you
>> are welcome
>>>> to copy.
>>>> 
>>>> https://github.com/nullterminated/ponder/tree/master/ERR2d2w/Components/Nonlocalized.lproj/R2D2WQueryDateRange.wo
>>>> 
>>>> https://github.com/nullterminated/ponder/blob/master/ERR2d2w/Sources/er/r2d2w/components/R2D2WQueryDateRange.java
>>>> 
>>>> It's basically just text fields and formatters.
>> Nothing to
>>>> it really.
>>>> 
>>>> Ramsey
>>>> 
>>>> On Mar 20, 2013, at 9:48 AM, Theodore Petrosky
>> wrote:
>>>> 
>>>>> I hope I am not too hosed.
>>>>> 
>>>>> I have a framework that I am using in a Wonder
>>>> Application. I am creating a D2W app to access it
>> for
>>>> another purpose. I need to create a query page that
>> will
>>>> query a date range and the data was modeled using
>> joda dates
>>>> (org.joda.time.LocalDate).
>>>>> 
>>>>> Is there a query page at can use the joda dates
>> out of
>>>> the box? If I add the property to the list of
>> displayed
>>>> keys, i get "- cannot be used in a query -" for the
>> key.
>>>>> 
>>>>> Ted
>>>>> 
>>>>> 
>> _______________________________________________
>>>>> 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/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:
>>> https://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.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:
> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to