Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Stephen Nutbrown
Hi,

Fantastic - thank you. I've updated my AppModule with this change.

I appreciate all your help,
Thanks,
Steve

On 4 May 2015 at 18:04, Dimitris Zenios  wrote:
> HI
>
> Your contribution to ModuleManager is correct.It will be better though to
> inject the resource
>
> Like this
> @Contribute(ModuleManager.class)
> public static void overrideCoreModules(
> MappedConfigurationconfiguration,
> @Path("META-INF/modules/ajaxformloop.js") Resource ajaxFormLoop
> ) {
> configuration.add("t5/core/ajaxformloop",new
> JavaScriptModuleConfiguration(ajaxFormLoop));
> }
>
> Also your change to "this" was correct.It was supposed to be
> "this".Something went wrong on copy paste.I am reattaching the fixed
> ajaxformloop
>
>
>
> On Mon, May 4, 2015 at 7:31 PM, Stephen Nutbrown 
> wrote:
>>
>> Hi,
>>
>> Thanks again Dimitris. I really really appreciate your help, it's now
>> fixed - I got there in the end, and it's looking very good too.
>>
>> Just a few things which may help anyone else who comes across this issue:
>>
>> I've spent a fair bit of time looking up exactly how to override that
>> js (I found several links to threads like this, but not much in the
>> documentation:
>> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/5-4-beta-2-Two-JavaScript-Errors-Quick-Fixes-td5725545.html).
>> The documentation seems to just say that it is possible, but not
>> really how to do it (perhaps an improvement for another day).
>>
>> I think I have done this correctly now (for anyone else who comes
>> across this thread, this is in my AppModule):
>>
>> @Contribute(ModuleManager.class)
>> public static void overrideCoreModules(AssetSource assetSource,
>> MappedConfiguration
>> configuration) {
>> Resource ajaxFormLoop =
>> assetSource.resourceForPath("/META-INF/modules/ajaxformloop.js");
>> configuration.add("t5/core/ajaxformloop",new
>> JavaScriptModuleConfiguration(ajaxFormLoop));
>> }
>>
>> I can see the file updated (I can see it by viewing the sources from
>> the browser), however I now get this in my console (And nothing
>> appears to happen when I click "add row")
>>
>> :8080/webapp/modules.gz/t5/core/ajaxformloop.js:52 Uncaught
>> ReferenceError: eeventthis is not defined
>>
>> In ajaxformloop.js I changed line 52: "eeventthis" to "this" (I'm not
>> good with js with js is just based on looking at other modules - so I
>> am guessing this is a typo).
>>
>> This seems to fix it!
>>
>> Thank you for all of the help Dimitris, I have certainly learned a few
>> things. Hopefully this thread will be useful to anyone else with the
>> same issues too.
>> I'm going to spend a bit of time looking through the datetimefield
>> code to understand it, it all looks sensible so I don't think it'll
>> take me long.
>>
>> Thank you again, all your help has been fantastic.
>>
>> Thanks,
>> Steve
>>
>>
>> On 4 May 2015 at 13:54, Dimitris Zenios  wrote:
>> > The problem lies within tapestry ajaxformloop javascript file
>> >
>> > The events.zone.didUpdate is not triggered on the new element but on the
>> > addRowButton (insertionPoint) resulting on the scanner to not be
>> > executed.Until this gets fixed you can override tapestry core
>> > ajaxformloop
>> > file with the one I have attached
>> >
>> > Thanks
>> > Dimitris Zenios
>> >
>> >
>> > On Mon, May 4, 2015 at 2:16 PM, Stephen Nutbrown 
>> > wrote:
>> >>
>> >> When I remove, the console says:
>> >>
>> >> Executing 0 inits
>> >> console.js:104 All inits executed
>> >>
>> >> Thanks,
>> >> Steve
>> >>
>> >> On 4 May 2015 at 12:04, Stephen Nutbrown  wrote:
>> >> > Hi,
>> >> >
>> >> > Just to add to that - when I press remove row, this function also is
>> >> > not called (at least, the alert doesn't show). Only when the page
>> >> > loads.
>> >> >
>> >> > Thanks,
>> >> > Steve
>> >> >
>> >> > On 4 May 2015 at 11:56, Stephen Nutbrown  wrote:
>> >> >> Hi,
>> >> >>
>> >> >> Thank you Akshay & Dimitris.
>> >> >>
>> >> >> Just a quick note on the things I have now tried, and the outcome.
>> >> >> I tried Ashkay's example but seemed to run into some problems,
>> >> >> mainly
>> >> >> that I don't know exactly where to put this code as it is using a js
>> >> >> module, the function is also anonymous so I was a bit
>> >> >> stuck/confused.
>> >> >>
>> >> >> I then put an alert inside the function passed to the scanner:
>> >> >>  dom.scanner("[data-component-type='DateTimeField']",
>> >> >> function(container) {
>> >> >> alert('running function');
>> >> >>   
>> >> >>
>> >> >> }
>> >> >>
>> >> >> I see this runs once for each row on the form to begin with, but
>> >> >> does
>> >> >> no run again when adding a new row. E.g, if I have 2 rows, it runs
>> >> >> twice, I press add row, it does not run again (but I now have 3
>> >> >> rows).
>> >> >> The new row is the one which contains the field which doesn't seem
>> >> >> show the picker on click.
>> >> >>
>> >> >> I then updated from 5.4-beta-28 to 5.4-beta-31, this didn't seem to
>> >> >> work.
>> >> >>

Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Stephen Nutbrown
Hi,

Thanks again Dimitris. I really really appreciate your help, it's now
fixed - I got there in the end, and it's looking very good too.

Just a few things which may help anyone else who comes across this issue:

I've spent a fair bit of time looking up exactly how to override that
js (I found several links to threads like this, but not much in the
documentation: 
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/5-4-beta-2-Two-JavaScript-Errors-Quick-Fixes-td5725545.html).
The documentation seems to just say that it is possible, but not
really how to do it (perhaps an improvement for another day).

I think I have done this correctly now (for anyone else who comes
across this thread, this is in my AppModule):

@Contribute(ModuleManager.class)
public static void overrideCoreModules(AssetSource assetSource,
MappedConfiguration
configuration) {
Resource ajaxFormLoop =
assetSource.resourceForPath("/META-INF/modules/ajaxformloop.js");
configuration.add("t5/core/ajaxformloop",new
JavaScriptModuleConfiguration(ajaxFormLoop));
}

I can see the file updated (I can see it by viewing the sources from
the browser), however I now get this in my console (And nothing
appears to happen when I click "add row")

:8080/webapp/modules.gz/t5/core/ajaxformloop.js:52 Uncaught
ReferenceError: eeventthis is not defined

In ajaxformloop.js I changed line 52: "eeventthis" to "this" (I'm not
good with js with js is just based on looking at other modules - so I
am guessing this is a typo).

This seems to fix it!

Thank you for all of the help Dimitris, I have certainly learned a few
things. Hopefully this thread will be useful to anyone else with the
same issues too.
I'm going to spend a bit of time looking through the datetimefield
code to understand it, it all looks sensible so I don't think it'll
take me long.

Thank you again, all your help has been fantastic.

Thanks,
Steve


On 4 May 2015 at 13:54, Dimitris Zenios  wrote:
> The problem lies within tapestry ajaxformloop javascript file
>
> The events.zone.didUpdate is not triggered on the new element but on the
> addRowButton (insertionPoint) resulting on the scanner to not be
> executed.Until this gets fixed you can override tapestry core ajaxformloop
> file with the one I have attached
>
> Thanks
> Dimitris Zenios
>
>
> On Mon, May 4, 2015 at 2:16 PM, Stephen Nutbrown 
> wrote:
>>
>> When I remove, the console says:
>>
>> Executing 0 inits
>> console.js:104 All inits executed
>>
>> Thanks,
>> Steve
>>
>> On 4 May 2015 at 12:04, Stephen Nutbrown  wrote:
>> > Hi,
>> >
>> > Just to add to that - when I press remove row, this function also is
>> > not called (at least, the alert doesn't show). Only when the page
>> > loads.
>> >
>> > Thanks,
>> > Steve
>> >
>> > On 4 May 2015 at 11:56, Stephen Nutbrown  wrote:
>> >> Hi,
>> >>
>> >> Thank you Akshay & Dimitris.
>> >>
>> >> Just a quick note on the things I have now tried, and the outcome.
>> >> I tried Ashkay's example but seemed to run into some problems, mainly
>> >> that I don't know exactly where to put this code as it is using a js
>> >> module, the function is also anonymous so I was a bit stuck/confused.
>> >>
>> >> I then put an alert inside the function passed to the scanner:
>> >>  dom.scanner("[data-component-type='DateTimeField']",
>> >> function(container) {
>> >> alert('running function');
>> >>   
>> >>
>> >> }
>> >>
>> >> I see this runs once for each row on the form to begin with, but does
>> >> no run again when adding a new row. E.g, if I have 2 rows, it runs
>> >> twice, I press add row, it does not run again (but I now have 3 rows).
>> >> The new row is the one which contains the field which doesn't seem
>> >> show the picker on click.
>> >>
>> >> I then updated from 5.4-beta-28 to 5.4-beta-31, this didn't seem to
>> >> work.
>> >>
>> >> This is what I get in the console of Google Chrome developer tools:
>> >>
>> >>
>> >> = When the page loads =
>> >> Loading 0 libraries
>> >> console.js:104 Executing 7 inits
>> >> console.js:104 Invoking t5/core/pageinit:focus("price")
>> >> console.js:104 Loaded module t5/core/forms
>> >> console.js:104 Loaded module t5/core/form-fragment
>> >> console.js:104 Loaded module t5/core/validation
>> >> console.js:104 Loaded module t5/core/ajaxformloop
>> >> console.js:104 Loaded module bootstrap/alert
>> >> console.js:104 Loaded module datetimefield
>> >> console.js:104 All inits executed
>> >>
>> >>  When I then click "Add Row ==
>> >> console.js:104 Executing 3 inits
>> >> console.js:104 Loaded module datetimefield
>> >> console.js:104 Loaded module t5/core/validation
>> >> console.js:104 Loaded module t5/core/ajaxformloop
>> >> console.js:104 All inits executed
>> >> 
>> >>
>> >> Looking in the events listeners part of Google chrome developer tools,
>> >> I can see the original one has two additional event listeners which
>> >> the new one doesn't. These are called "dp" and "mousedown"

Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Stephen Nutbrown
When I remove, the console says:

Executing 0 inits
console.js:104 All inits executed

Thanks,
Steve

On 4 May 2015 at 12:04, Stephen Nutbrown  wrote:
> Hi,
>
> Just to add to that - when I press remove row, this function also is
> not called (at least, the alert doesn't show). Only when the page
> loads.
>
> Thanks,
> Steve
>
> On 4 May 2015 at 11:56, Stephen Nutbrown  wrote:
>> Hi,
>>
>> Thank you Akshay & Dimitris.
>>
>> Just a quick note on the things I have now tried, and the outcome.
>> I tried Ashkay's example but seemed to run into some problems, mainly
>> that I don't know exactly where to put this code as it is using a js
>> module, the function is also anonymous so I was a bit stuck/confused.
>>
>> I then put an alert inside the function passed to the scanner:
>>  dom.scanner("[data-component-type='DateTimeField']", function(container) {
>> alert('running function');
>>   
>>
>> }
>>
>> I see this runs once for each row on the form to begin with, but does
>> no run again when adding a new row. E.g, if I have 2 rows, it runs
>> twice, I press add row, it does not run again (but I now have 3 rows).
>> The new row is the one which contains the field which doesn't seem
>> show the picker on click.
>>
>> I then updated from 5.4-beta-28 to 5.4-beta-31, this didn't seem to work.
>>
>> This is what I get in the console of Google Chrome developer tools:
>>
>>
>> = When the page loads =
>> Loading 0 libraries
>> console.js:104 Executing 7 inits
>> console.js:104 Invoking t5/core/pageinit:focus("price")
>> console.js:104 Loaded module t5/core/forms
>> console.js:104 Loaded module t5/core/form-fragment
>> console.js:104 Loaded module t5/core/validation
>> console.js:104 Loaded module t5/core/ajaxformloop
>> console.js:104 Loaded module bootstrap/alert
>> console.js:104 Loaded module datetimefield
>> console.js:104 All inits executed
>>
>>  When I then click "Add Row ==
>> console.js:104 Executing 3 inits
>> console.js:104 Loaded module datetimefield
>> console.js:104 Loaded module t5/core/validation
>> console.js:104 Loaded module t5/core/ajaxformloop
>> console.js:104 All inits executed
>> 
>>
>> Looking in the events listeners part of Google chrome developer tools,
>> I can see the original one has two additional event listeners which
>> the new one doesn't. These are called "dp" and "mousedown".
>>
>> Perhaps the order in which these are initialised matter here, should
>> the datetimefield be after the validation/ajaxformloop?
>>
>> Thanks,
>> Steve
>>
>> On 4 May 2015 at 11:08, Dimitris Zenios  wrote:
>>> Also can you please update to latest tapestry 5.4-beta-31
>>>
>>> I think there was a bug that looks like that and got fixed.
>>>
>>> On Mon, May 4, 2015 at 1:04 PM, Dimitris Zenios 
>>> wrote:
>>>
 Javascript is using dom.scanner function which should execute on every
 zone change.Just like the DateField

 Can you please check whether the function passed to dom.scanner is
 executed when you add or remove rows?

 On Mon, May 4, 2015 at 2:42 AM, akshay  wrote:

> Hi Stephen,
>
> You can try something like this:-
>   @Inject
>   private AjaxResponseRenderer ajaxResponseRenderer;
>
>
>  ajaxResponseRenderer.addRender("YOUR ZONE");
> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>
>   @Override
>   public void run(JavaScriptSupport javascriptSupport) {
>
> javascriptSupport.require("YOUR JS FILE").invoke("function to be
> invoked");
>
>
>   }
> });
>
> Best Regards
> Akshay
>
> On Mon, May 4, 2015 at 1:38 AM, Stephen Nutbrown 
> wrote:
>
> > I tried adding this to the DateTimeField without much luck:
> >
> > @AfterRender
> > void afterRender(){
> > javascriptSupport.require("datetimefield");
> > }
> >
> > I don't think this has any effect since the js is already loaded once,
> > and i'm not 100% certain that this is the problem either.
> >
> > On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
> > > Hi,
> > >
> > > I have a quick question (and this isn't anything to do with your code,
> > > which is fantastic) - it's more to do with how Tapestry handles an
> > > AjaxFormLoop.
> > >
> > > I have this component inside an ajax form loop. When I add a new row,
> > > it will add in a new component (of type DateTimeField).
> > >
> > > However, although the DateTimeField from the previous rows works fine,
> > > the new one doesn't. I get the feeling this is because the javascript
> > > wants to be re-initialised - we want to run DateTimeField.js again?
> > >
> > > I'm struggling a little bit to find out exactly why this is. There are
> > > no console errors (either to the java output or JS console), so I
> > > assume the event handler isn't added to the newly adde

Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Stephen Nutbrown
Hi,

Just to add to that - when I press remove row, this function also is
not called (at least, the alert doesn't show). Only when the page
loads.

Thanks,
Steve

On 4 May 2015 at 11:56, Stephen Nutbrown  wrote:
> Hi,
>
> Thank you Akshay & Dimitris.
>
> Just a quick note on the things I have now tried, and the outcome.
> I tried Ashkay's example but seemed to run into some problems, mainly
> that I don't know exactly where to put this code as it is using a js
> module, the function is also anonymous so I was a bit stuck/confused.
>
> I then put an alert inside the function passed to the scanner:
>  dom.scanner("[data-component-type='DateTimeField']", function(container) {
> alert('running function');
>   
>
> }
>
> I see this runs once for each row on the form to begin with, but does
> no run again when adding a new row. E.g, if I have 2 rows, it runs
> twice, I press add row, it does not run again (but I now have 3 rows).
> The new row is the one which contains the field which doesn't seem
> show the picker on click.
>
> I then updated from 5.4-beta-28 to 5.4-beta-31, this didn't seem to work.
>
> This is what I get in the console of Google Chrome developer tools:
>
>
> = When the page loads =
> Loading 0 libraries
> console.js:104 Executing 7 inits
> console.js:104 Invoking t5/core/pageinit:focus("price")
> console.js:104 Loaded module t5/core/forms
> console.js:104 Loaded module t5/core/form-fragment
> console.js:104 Loaded module t5/core/validation
> console.js:104 Loaded module t5/core/ajaxformloop
> console.js:104 Loaded module bootstrap/alert
> console.js:104 Loaded module datetimefield
> console.js:104 All inits executed
>
>  When I then click "Add Row ==
> console.js:104 Executing 3 inits
> console.js:104 Loaded module datetimefield
> console.js:104 Loaded module t5/core/validation
> console.js:104 Loaded module t5/core/ajaxformloop
> console.js:104 All inits executed
> 
>
> Looking in the events listeners part of Google chrome developer tools,
> I can see the original one has two additional event listeners which
> the new one doesn't. These are called "dp" and "mousedown".
>
> Perhaps the order in which these are initialised matter here, should
> the datetimefield be after the validation/ajaxformloop?
>
> Thanks,
> Steve
>
> On 4 May 2015 at 11:08, Dimitris Zenios  wrote:
>> Also can you please update to latest tapestry 5.4-beta-31
>>
>> I think there was a bug that looks like that and got fixed.
>>
>> On Mon, May 4, 2015 at 1:04 PM, Dimitris Zenios 
>> wrote:
>>
>>> Javascript is using dom.scanner function which should execute on every
>>> zone change.Just like the DateField
>>>
>>> Can you please check whether the function passed to dom.scanner is
>>> executed when you add or remove rows?
>>>
>>> On Mon, May 4, 2015 at 2:42 AM, akshay  wrote:
>>>
 Hi Stephen,

 You can try something like this:-
   @Inject
   private AjaxResponseRenderer ajaxResponseRenderer;


  ajaxResponseRenderer.addRender("YOUR ZONE");
 ajaxResponseRenderer.addCallback(new JavaScriptCallback() {

   @Override
   public void run(JavaScriptSupport javascriptSupport) {

 javascriptSupport.require("YOUR JS FILE").invoke("function to be
 invoked");


   }
 });

 Best Regards
 Akshay

 On Mon, May 4, 2015 at 1:38 AM, Stephen Nutbrown 
 wrote:

 > I tried adding this to the DateTimeField without much luck:
 >
 > @AfterRender
 > void afterRender(){
 > javascriptSupport.require("datetimefield");
 > }
 >
 > I don't think this has any effect since the js is already loaded once,
 > and i'm not 100% certain that this is the problem either.
 >
 > On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
 > > Hi,
 > >
 > > I have a quick question (and this isn't anything to do with your code,
 > > which is fantastic) - it's more to do with how Tapestry handles an
 > > AjaxFormLoop.
 > >
 > > I have this component inside an ajax form loop. When I add a new row,
 > > it will add in a new component (of type DateTimeField).
 > >
 > > However, although the DateTimeField from the previous rows works fine,
 > > the new one doesn't. I get the feeling this is because the javascript
 > > wants to be re-initialised - we want to run DateTimeField.js again?
 > >
 > > I'm struggling a little bit to find out exactly why this is. There are
 > > no console errors (either to the java output or JS console), so I
 > > assume the event handler isn't added to the newly added row.
 > >
 > > Any ideas on how I would go about doing that?
 > >
 > > I noticed something similar going on with Tapestry's DateField, so i'm
 > > sure this isn't to do with the component. If I refresh the page, the
 > > newly added row works fine.
 > >
 > > T

Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Stephen Nutbrown
Hi,

Thank you Akshay & Dimitris.

Just a quick note on the things I have now tried, and the outcome.
I tried Ashkay's example but seemed to run into some problems, mainly
that I don't know exactly where to put this code as it is using a js
module, the function is also anonymous so I was a bit stuck/confused.

I then put an alert inside the function passed to the scanner:
 dom.scanner("[data-component-type='DateTimeField']", function(container) {
alert('running function');
  
   
}

I see this runs once for each row on the form to begin with, but does
no run again when adding a new row. E.g, if I have 2 rows, it runs
twice, I press add row, it does not run again (but I now have 3 rows).
The new row is the one which contains the field which doesn't seem
show the picker on click.

I then updated from 5.4-beta-28 to 5.4-beta-31, this didn't seem to work.

This is what I get in the console of Google Chrome developer tools:


= When the page loads =
Loading 0 libraries
console.js:104 Executing 7 inits
console.js:104 Invoking t5/core/pageinit:focus("price")
console.js:104 Loaded module t5/core/forms
console.js:104 Loaded module t5/core/form-fragment
console.js:104 Loaded module t5/core/validation
console.js:104 Loaded module t5/core/ajaxformloop
console.js:104 Loaded module bootstrap/alert
console.js:104 Loaded module datetimefield
console.js:104 All inits executed

 When I then click "Add Row ==
console.js:104 Executing 3 inits
console.js:104 Loaded module datetimefield
console.js:104 Loaded module t5/core/validation
console.js:104 Loaded module t5/core/ajaxformloop
console.js:104 All inits executed


Looking in the events listeners part of Google chrome developer tools,
I can see the original one has two additional event listeners which
the new one doesn't. These are called "dp" and "mousedown".

Perhaps the order in which these are initialised matter here, should
the datetimefield be after the validation/ajaxformloop?

Thanks,
Steve

On 4 May 2015 at 11:08, Dimitris Zenios  wrote:
> Also can you please update to latest tapestry 5.4-beta-31
>
> I think there was a bug that looks like that and got fixed.
>
> On Mon, May 4, 2015 at 1:04 PM, Dimitris Zenios 
> wrote:
>
>> Javascript is using dom.scanner function which should execute on every
>> zone change.Just like the DateField
>>
>> Can you please check whether the function passed to dom.scanner is
>> executed when you add or remove rows?
>>
>> On Mon, May 4, 2015 at 2:42 AM, akshay  wrote:
>>
>>> Hi Stephen,
>>>
>>> You can try something like this:-
>>>   @Inject
>>>   private AjaxResponseRenderer ajaxResponseRenderer;
>>>
>>>
>>>  ajaxResponseRenderer.addRender("YOUR ZONE");
>>> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>>>
>>>   @Override
>>>   public void run(JavaScriptSupport javascriptSupport) {
>>>
>>> javascriptSupport.require("YOUR JS FILE").invoke("function to be
>>> invoked");
>>>
>>>
>>>   }
>>> });
>>>
>>> Best Regards
>>> Akshay
>>>
>>> On Mon, May 4, 2015 at 1:38 AM, Stephen Nutbrown 
>>> wrote:
>>>
>>> > I tried adding this to the DateTimeField without much luck:
>>> >
>>> > @AfterRender
>>> > void afterRender(){
>>> > javascriptSupport.require("datetimefield");
>>> > }
>>> >
>>> > I don't think this has any effect since the js is already loaded once,
>>> > and i'm not 100% certain that this is the problem either.
>>> >
>>> > On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
>>> > > Hi,
>>> > >
>>> > > I have a quick question (and this isn't anything to do with your code,
>>> > > which is fantastic) - it's more to do with how Tapestry handles an
>>> > > AjaxFormLoop.
>>> > >
>>> > > I have this component inside an ajax form loop. When I add a new row,
>>> > > it will add in a new component (of type DateTimeField).
>>> > >
>>> > > However, although the DateTimeField from the previous rows works fine,
>>> > > the new one doesn't. I get the feeling this is because the javascript
>>> > > wants to be re-initialised - we want to run DateTimeField.js again?
>>> > >
>>> > > I'm struggling a little bit to find out exactly why this is. There are
>>> > > no console errors (either to the java output or JS console), so I
>>> > > assume the event handler isn't added to the newly added row.
>>> > >
>>> > > Any ideas on how I would go about doing that?
>>> > >
>>> > > I noticed something similar going on with Tapestry's DateField, so i'm
>>> > > sure this isn't to do with the component. If I refresh the page, the
>>> > > newly added row works fine.
>>> > >
>>> > > Thanks,
>>> > > Steve
>>> > >
>>> > > On 3 May 2015 at 15:59, Stephen Nutbrown  wrote:
>>> > >> Hi Dimitris,
>>> > >>
>>> > >> That's extremely kind and generous of you, thank you! I owe you a few
>>> > >> beers, if you happen to have a paypal address hooked up to your email
>>> > >> account I can send you a little something (Not much as I'm currently
>>> a
>>> > >> student myself, but jus

Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Dimitris Zenios
Also can you please update to latest tapestry 5.4-beta-31

I think there was a bug that looks like that and got fixed.

On Mon, May 4, 2015 at 1:04 PM, Dimitris Zenios 
wrote:

> Javascript is using dom.scanner function which should execute on every
> zone change.Just like the DateField
>
> Can you please check whether the function passed to dom.scanner is
> executed when you add or remove rows?
>
> On Mon, May 4, 2015 at 2:42 AM, akshay  wrote:
>
>> Hi Stephen,
>>
>> You can try something like this:-
>>   @Inject
>>   private AjaxResponseRenderer ajaxResponseRenderer;
>>
>>
>>  ajaxResponseRenderer.addRender("YOUR ZONE");
>> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>>
>>   @Override
>>   public void run(JavaScriptSupport javascriptSupport) {
>>
>> javascriptSupport.require("YOUR JS FILE").invoke("function to be
>> invoked");
>>
>>
>>   }
>> });
>>
>> Best Regards
>> Akshay
>>
>> On Mon, May 4, 2015 at 1:38 AM, Stephen Nutbrown 
>> wrote:
>>
>> > I tried adding this to the DateTimeField without much luck:
>> >
>> > @AfterRender
>> > void afterRender(){
>> > javascriptSupport.require("datetimefield");
>> > }
>> >
>> > I don't think this has any effect since the js is already loaded once,
>> > and i'm not 100% certain that this is the problem either.
>> >
>> > On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
>> > > Hi,
>> > >
>> > > I have a quick question (and this isn't anything to do with your code,
>> > > which is fantastic) - it's more to do with how Tapestry handles an
>> > > AjaxFormLoop.
>> > >
>> > > I have this component inside an ajax form loop. When I add a new row,
>> > > it will add in a new component (of type DateTimeField).
>> > >
>> > > However, although the DateTimeField from the previous rows works fine,
>> > > the new one doesn't. I get the feeling this is because the javascript
>> > > wants to be re-initialised - we want to run DateTimeField.js again?
>> > >
>> > > I'm struggling a little bit to find out exactly why this is. There are
>> > > no console errors (either to the java output or JS console), so I
>> > > assume the event handler isn't added to the newly added row.
>> > >
>> > > Any ideas on how I would go about doing that?
>> > >
>> > > I noticed something similar going on with Tapestry's DateField, so i'm
>> > > sure this isn't to do with the component. If I refresh the page, the
>> > > newly added row works fine.
>> > >
>> > > Thanks,
>> > > Steve
>> > >
>> > > On 3 May 2015 at 15:59, Stephen Nutbrown  wrote:
>> > >> Hi Dimitris,
>> > >>
>> > >> That's extremely kind and generous of you, thank you! I owe you a few
>> > >> beers, if you happen to have a paypal address hooked up to your email
>> > >> account I can send you a little something (Not much as I'm currently
>> a
>> > >> student myself, but just to buy yourself a few beers on me).
>> > >>
>> > >> Cheers,
>> > >> Steve
>> > >>
>> > >> C
>> > >>
>> > >> On 3 May 2015 at 11:28, Dimitris Zenios 
>> > wrote:
>> > >>> Sure I will put them here as an attachment so everybody can see it
>> > >>>
>> > >>> You will also need to
>> > >>> 1.Put the datetimepicker library inside META-INF/modules/datetime/.
>> > >>> 2.Put the datetimepicker css inside  META-INF/assets/other/css/.
>> > >>>
>> > >>> The example I have attached is using Java 8 LocalDateTime but it
>> can be
>> > >>> adopted in order to use java.util.Date
>> > >>>
>> > >>> Thanks
>> > >>> Dimitris Zenios
>> > >>>
>> > >>> On Fri, May 1, 2015 at 9:41 PM, Stephen Nutbrown <
>> steves...@gmail.com>
>> > >>> wrote:
>> > 
>> >  Hi Dimitris,
>> > 
>> >  Wow, as it happens that's the exact same one I was having problems
>> >  implementing!
>> > 
>> >  It would be awesome to have some kind of tapestry5 component
>> >  marketplace. Perhaps another thing for another day.
>> >  I feel very cheeky asking, but would you be up for (able to) send
>> me
>> >  the code, i'd be more than happy to pay for a few drinks for you?
>> > 
>> >  Thanks,
>> >  Steve
>> > 
>> >  On 1 May 2015 at 11:24, Dimitris Zenios > >
>> > wrote:
>> >  > For tapestry 5.4 i have been using this javascript library
>> >  > https://eonasdan.github.io/bootstrap-datetimepicker/
>> >  >
>> >  > and a custom component extending AbstractField
>> >  >
>> >  >
>> >  >
>> >  >
>> >  > On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown <
>> > steves...@gmail.com>
>> >  > wrote:
>> >  >
>> >  >> Hi,
>> >  >>
>> >  >> I have been looking for a date + time picker for Tapestry. I'd
>> > like a
>> >  >> form component which will bind to a java.util.Date object, and
>> asks
>> >  >> for a time as well as a date.
>> >  >>
>> >  >> I haven't had much luck, i've found bits of code here and there
>> for
>> >  >> older versions of tapestry. I would have thought this component
>> > would
>> >  >> be one which comes with Tapestry out of the box, as I 

Re: [T5.4 beta 28] Date and time picker

2015-05-04 Thread Dimitris Zenios
Javascript is using dom.scanner function which should execute on every zone
change.Just like the DateField

Can you please check whether the function passed to dom.scanner is executed
when you add or remove rows?

On Mon, May 4, 2015 at 2:42 AM, akshay  wrote:

> Hi Stephen,
>
> You can try something like this:-
>   @Inject
>   private AjaxResponseRenderer ajaxResponseRenderer;
>
>
>  ajaxResponseRenderer.addRender("YOUR ZONE");
> ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
>
>   @Override
>   public void run(JavaScriptSupport javascriptSupport) {
>
> javascriptSupport.require("YOUR JS FILE").invoke("function to be
> invoked");
>
>
>   }
> });
>
> Best Regards
> Akshay
>
> On Mon, May 4, 2015 at 1:38 AM, Stephen Nutbrown 
> wrote:
>
> > I tried adding this to the DateTimeField without much luck:
> >
> > @AfterRender
> > void afterRender(){
> > javascriptSupport.require("datetimefield");
> > }
> >
> > I don't think this has any effect since the js is already loaded once,
> > and i'm not 100% certain that this is the problem either.
> >
> > On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
> > > Hi,
> > >
> > > I have a quick question (and this isn't anything to do with your code,
> > > which is fantastic) - it's more to do with how Tapestry handles an
> > > AjaxFormLoop.
> > >
> > > I have this component inside an ajax form loop. When I add a new row,
> > > it will add in a new component (of type DateTimeField).
> > >
> > > However, although the DateTimeField from the previous rows works fine,
> > > the new one doesn't. I get the feeling this is because the javascript
> > > wants to be re-initialised - we want to run DateTimeField.js again?
> > >
> > > I'm struggling a little bit to find out exactly why this is. There are
> > > no console errors (either to the java output or JS console), so I
> > > assume the event handler isn't added to the newly added row.
> > >
> > > Any ideas on how I would go about doing that?
> > >
> > > I noticed something similar going on with Tapestry's DateField, so i'm
> > > sure this isn't to do with the component. If I refresh the page, the
> > > newly added row works fine.
> > >
> > > Thanks,
> > > Steve
> > >
> > > On 3 May 2015 at 15:59, Stephen Nutbrown  wrote:
> > >> Hi Dimitris,
> > >>
> > >> That's extremely kind and generous of you, thank you! I owe you a few
> > >> beers, if you happen to have a paypal address hooked up to your email
> > >> account I can send you a little something (Not much as I'm currently a
> > >> student myself, but just to buy yourself a few beers on me).
> > >>
> > >> Cheers,
> > >> Steve
> > >>
> > >> C
> > >>
> > >> On 3 May 2015 at 11:28, Dimitris Zenios 
> > wrote:
> > >>> Sure I will put them here as an attachment so everybody can see it
> > >>>
> > >>> You will also need to
> > >>> 1.Put the datetimepicker library inside META-INF/modules/datetime/.
> > >>> 2.Put the datetimepicker css inside  META-INF/assets/other/css/.
> > >>>
> > >>> The example I have attached is using Java 8 LocalDateTime but it can
> be
> > >>> adopted in order to use java.util.Date
> > >>>
> > >>> Thanks
> > >>> Dimitris Zenios
> > >>>
> > >>> On Fri, May 1, 2015 at 9:41 PM, Stephen Nutbrown <
> steves...@gmail.com>
> > >>> wrote:
> > 
> >  Hi Dimitris,
> > 
> >  Wow, as it happens that's the exact same one I was having problems
> >  implementing!
> > 
> >  It would be awesome to have some kind of tapestry5 component
> >  marketplace. Perhaps another thing for another day.
> >  I feel very cheeky asking, but would you be up for (able to) send me
> >  the code, i'd be more than happy to pay for a few drinks for you?
> > 
> >  Thanks,
> >  Steve
> > 
> >  On 1 May 2015 at 11:24, Dimitris Zenios 
> > wrote:
> >  > For tapestry 5.4 i have been using this javascript library
> >  > https://eonasdan.github.io/bootstrap-datetimepicker/
> >  >
> >  > and a custom component extending AbstractField
> >  >
> >  >
> >  >
> >  >
> >  > On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown <
> > steves...@gmail.com>
> >  > wrote:
> >  >
> >  >> Hi,
> >  >>
> >  >> I have been looking for a date + time picker for Tapestry. I'd
> > like a
> >  >> form component which will bind to a java.util.Date object, and
> asks
> >  >> for a time as well as a date.
> >  >>
> >  >> I haven't had much luck, i've found bits of code here and there
> for
> >  >> older versions of tapestry. I would have thought this component
> > would
> >  >> be one which comes with Tapestry out of the box, as I would think
> > it's
> >  >> a common requirement.
> >  >>
> >  >> I tried to create my own component which extends AbstractField,
> > based
> >  >> on the source code I can see for the
> >  >>
> >  >>
> >  >>
> >
> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/Da

Re: [T5.4 beta 28] Date and time picker

2015-05-03 Thread akshay
Hi Stephen,

You can try something like this:-
  @Inject
  private AjaxResponseRenderer ajaxResponseRenderer;


 ajaxResponseRenderer.addRender("YOUR ZONE");
ajaxResponseRenderer.addCallback(new JavaScriptCallback() {

  @Override
  public void run(JavaScriptSupport javascriptSupport) {

javascriptSupport.require("YOUR JS FILE").invoke("function to be
invoked");


  }
});

Best Regards
Akshay

On Mon, May 4, 2015 at 1:38 AM, Stephen Nutbrown 
wrote:

> I tried adding this to the DateTimeField without much luck:
>
> @AfterRender
> void afterRender(){
> javascriptSupport.require("datetimefield");
> }
>
> I don't think this has any effect since the js is already loaded once,
> and i'm not 100% certain that this is the problem either.
>
> On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
> > Hi,
> >
> > I have a quick question (and this isn't anything to do with your code,
> > which is fantastic) - it's more to do with how Tapestry handles an
> > AjaxFormLoop.
> >
> > I have this component inside an ajax form loop. When I add a new row,
> > it will add in a new component (of type DateTimeField).
> >
> > However, although the DateTimeField from the previous rows works fine,
> > the new one doesn't. I get the feeling this is because the javascript
> > wants to be re-initialised - we want to run DateTimeField.js again?
> >
> > I'm struggling a little bit to find out exactly why this is. There are
> > no console errors (either to the java output or JS console), so I
> > assume the event handler isn't added to the newly added row.
> >
> > Any ideas on how I would go about doing that?
> >
> > I noticed something similar going on with Tapestry's DateField, so i'm
> > sure this isn't to do with the component. If I refresh the page, the
> > newly added row works fine.
> >
> > Thanks,
> > Steve
> >
> > On 3 May 2015 at 15:59, Stephen Nutbrown  wrote:
> >> Hi Dimitris,
> >>
> >> That's extremely kind and generous of you, thank you! I owe you a few
> >> beers, if you happen to have a paypal address hooked up to your email
> >> account I can send you a little something (Not much as I'm currently a
> >> student myself, but just to buy yourself a few beers on me).
> >>
> >> Cheers,
> >> Steve
> >>
> >> C
> >>
> >> On 3 May 2015 at 11:28, Dimitris Zenios 
> wrote:
> >>> Sure I will put them here as an attachment so everybody can see it
> >>>
> >>> You will also need to
> >>> 1.Put the datetimepicker library inside META-INF/modules/datetime/.
> >>> 2.Put the datetimepicker css inside  META-INF/assets/other/css/.
> >>>
> >>> The example I have attached is using Java 8 LocalDateTime but it can be
> >>> adopted in order to use java.util.Date
> >>>
> >>> Thanks
> >>> Dimitris Zenios
> >>>
> >>> On Fri, May 1, 2015 at 9:41 PM, Stephen Nutbrown 
> >>> wrote:
> 
>  Hi Dimitris,
> 
>  Wow, as it happens that's the exact same one I was having problems
>  implementing!
> 
>  It would be awesome to have some kind of tapestry5 component
>  marketplace. Perhaps another thing for another day.
>  I feel very cheeky asking, but would you be up for (able to) send me
>  the code, i'd be more than happy to pay for a few drinks for you?
> 
>  Thanks,
>  Steve
> 
>  On 1 May 2015 at 11:24, Dimitris Zenios 
> wrote:
>  > For tapestry 5.4 i have been using this javascript library
>  > https://eonasdan.github.io/bootstrap-datetimepicker/
>  >
>  > and a custom component extending AbstractField
>  >
>  >
>  >
>  >
>  > On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown <
> steves...@gmail.com>
>  > wrote:
>  >
>  >> Hi,
>  >>
>  >> I have been looking for a date + time picker for Tapestry. I'd
> like a
>  >> form component which will bind to a java.util.Date object, and asks
>  >> for a time as well as a date.
>  >>
>  >> I haven't had much luck, i've found bits of code here and there for
>  >> older versions of tapestry. I would have thought this component
> would
>  >> be one which comes with Tapestry out of the box, as I would think
> it's
>  >> a common requirement.
>  >>
>  >> I tried to create my own component which extends AbstractField,
> based
>  >> on the source code I can see for the
>  >>
>  >>
>  >>
> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
>  >> but I ran in to some issues (I think perhaps I just didn't have
> enough
>  >> patience, I will need to revisit it if I am to try again - it's a
> bit
>  >> of a learning curve for me).
>  >>
>  >> Is there a simpler way to do this? Am I going in the right
> direction
>  >> trying to create a new component which extends AbstractField? If
> there
>  >> was one that is known to work on the latest versions of tapestry
> and
>  >> with jQuery as the js provider (or not requiring
> jQuery/Prototype), I
> >>

Re: [T5.4 beta 28] Date and time picker

2015-05-03 Thread Stephen Nutbrown
I tried adding this to the DateTimeField without much luck:

@AfterRender
void afterRender(){
javascriptSupport.require("datetimefield");
}

I don't think this has any effect since the js is already loaded once,
and i'm not 100% certain that this is the problem either.

On 4 May 2015 at 00:35, Stephen Nutbrown  wrote:
> Hi,
>
> I have a quick question (and this isn't anything to do with your code,
> which is fantastic) - it's more to do with how Tapestry handles an
> AjaxFormLoop.
>
> I have this component inside an ajax form loop. When I add a new row,
> it will add in a new component (of type DateTimeField).
>
> However, although the DateTimeField from the previous rows works fine,
> the new one doesn't. I get the feeling this is because the javascript
> wants to be re-initialised - we want to run DateTimeField.js again?
>
> I'm struggling a little bit to find out exactly why this is. There are
> no console errors (either to the java output or JS console), so I
> assume the event handler isn't added to the newly added row.
>
> Any ideas on how I would go about doing that?
>
> I noticed something similar going on with Tapestry's DateField, so i'm
> sure this isn't to do with the component. If I refresh the page, the
> newly added row works fine.
>
> Thanks,
> Steve
>
> On 3 May 2015 at 15:59, Stephen Nutbrown  wrote:
>> Hi Dimitris,
>>
>> That's extremely kind and generous of you, thank you! I owe you a few
>> beers, if you happen to have a paypal address hooked up to your email
>> account I can send you a little something (Not much as I'm currently a
>> student myself, but just to buy yourself a few beers on me).
>>
>> Cheers,
>> Steve
>>
>> C
>>
>> On 3 May 2015 at 11:28, Dimitris Zenios  wrote:
>>> Sure I will put them here as an attachment so everybody can see it
>>>
>>> You will also need to
>>> 1.Put the datetimepicker library inside META-INF/modules/datetime/.
>>> 2.Put the datetimepicker css inside  META-INF/assets/other/css/.
>>>
>>> The example I have attached is using Java 8 LocalDateTime but it can be
>>> adopted in order to use java.util.Date
>>>
>>> Thanks
>>> Dimitris Zenios
>>>
>>> On Fri, May 1, 2015 at 9:41 PM, Stephen Nutbrown 
>>> wrote:

 Hi Dimitris,

 Wow, as it happens that's the exact same one I was having problems
 implementing!

 It would be awesome to have some kind of tapestry5 component
 marketplace. Perhaps another thing for another day.
 I feel very cheeky asking, but would you be up for (able to) send me
 the code, i'd be more than happy to pay for a few drinks for you?

 Thanks,
 Steve

 On 1 May 2015 at 11:24, Dimitris Zenios  wrote:
 > For tapestry 5.4 i have been using this javascript library
 > https://eonasdan.github.io/bootstrap-datetimepicker/
 >
 > and a custom component extending AbstractField
 >
 >
 >
 >
 > On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown 
 > wrote:
 >
 >> Hi,
 >>
 >> I have been looking for a date + time picker for Tapestry. I'd like a
 >> form component which will bind to a java.util.Date object, and asks
 >> for a time as well as a date.
 >>
 >> I haven't had much luck, i've found bits of code here and there for
 >> older versions of tapestry. I would have thought this component would
 >> be one which comes with Tapestry out of the box, as I would think it's
 >> a common requirement.
 >>
 >> I tried to create my own component which extends AbstractField, based
 >> on the source code I can see for the
 >>
 >>
 >> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
 >> but I ran in to some issues (I think perhaps I just didn't have enough
 >> patience, I will need to revisit it if I am to try again - it's a bit
 >> of a learning curve for me).
 >>
 >> Is there a simpler way to do this? Am I going in the right direction
 >> trying to create a new component which extends AbstractField? If there
 >> was one that is known to work on the latest versions of tapestry and
 >> with jQuery as the js provider (or not requiring jQuery/Prototype), I
 >> would really appreciate a link. If not, any guidance on if my approach
 >> is sensible, if it is.. i'll just try again this evening.
 >>
 >>
 >> Any help is really appreciated.
 >> Thanks,
 >>
 >> -
 >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 >> For additional commands, e-mail: users-h...@tapestry.apache.org
 >>
 >>

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org

>>>
>>>
>>>
>>> --

Re: [T5.4 beta 28] Date and time picker

2015-05-03 Thread Stephen Nutbrown
Hi,

I have a quick question (and this isn't anything to do with your code,
which is fantastic) - it's more to do with how Tapestry handles an
AjaxFormLoop.

I have this component inside an ajax form loop. When I add a new row,
it will add in a new component (of type DateTimeField).

However, although the DateTimeField from the previous rows works fine,
the new one doesn't. I get the feeling this is because the javascript
wants to be re-initialised - we want to run DateTimeField.js again?

I'm struggling a little bit to find out exactly why this is. There are
no console errors (either to the java output or JS console), so I
assume the event handler isn't added to the newly added row.

Any ideas on how I would go about doing that?

I noticed something similar going on with Tapestry's DateField, so i'm
sure this isn't to do with the component. If I refresh the page, the
newly added row works fine.

Thanks,
Steve

On 3 May 2015 at 15:59, Stephen Nutbrown  wrote:
> Hi Dimitris,
>
> That's extremely kind and generous of you, thank you! I owe you a few
> beers, if you happen to have a paypal address hooked up to your email
> account I can send you a little something (Not much as I'm currently a
> student myself, but just to buy yourself a few beers on me).
>
> Cheers,
> Steve
>
> C
>
> On 3 May 2015 at 11:28, Dimitris Zenios  wrote:
>> Sure I will put them here as an attachment so everybody can see it
>>
>> You will also need to
>> 1.Put the datetimepicker library inside META-INF/modules/datetime/.
>> 2.Put the datetimepicker css inside  META-INF/assets/other/css/.
>>
>> The example I have attached is using Java 8 LocalDateTime but it can be
>> adopted in order to use java.util.Date
>>
>> Thanks
>> Dimitris Zenios
>>
>> On Fri, May 1, 2015 at 9:41 PM, Stephen Nutbrown 
>> wrote:
>>>
>>> Hi Dimitris,
>>>
>>> Wow, as it happens that's the exact same one I was having problems
>>> implementing!
>>>
>>> It would be awesome to have some kind of tapestry5 component
>>> marketplace. Perhaps another thing for another day.
>>> I feel very cheeky asking, but would you be up for (able to) send me
>>> the code, i'd be more than happy to pay for a few drinks for you?
>>>
>>> Thanks,
>>> Steve
>>>
>>> On 1 May 2015 at 11:24, Dimitris Zenios  wrote:
>>> > For tapestry 5.4 i have been using this javascript library
>>> > https://eonasdan.github.io/bootstrap-datetimepicker/
>>> >
>>> > and a custom component extending AbstractField
>>> >
>>> >
>>> >
>>> >
>>> > On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown 
>>> > wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> I have been looking for a date + time picker for Tapestry. I'd like a
>>> >> form component which will bind to a java.util.Date object, and asks
>>> >> for a time as well as a date.
>>> >>
>>> >> I haven't had much luck, i've found bits of code here and there for
>>> >> older versions of tapestry. I would have thought this component would
>>> >> be one which comes with Tapestry out of the box, as I would think it's
>>> >> a common requirement.
>>> >>
>>> >> I tried to create my own component which extends AbstractField, based
>>> >> on the source code I can see for the
>>> >>
>>> >>
>>> >> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
>>> >> but I ran in to some issues (I think perhaps I just didn't have enough
>>> >> patience, I will need to revisit it if I am to try again - it's a bit
>>> >> of a learning curve for me).
>>> >>
>>> >> Is there a simpler way to do this? Am I going in the right direction
>>> >> trying to create a new component which extends AbstractField? If there
>>> >> was one that is known to work on the latest versions of tapestry and
>>> >> with jQuery as the js provider (or not requiring jQuery/Prototype), I
>>> >> would really appreciate a link. If not, any guidance on if my approach
>>> >> is sensible, if it is.. i'll just try again this evening.
>>> >>
>>> >>
>>> >> Any help is really appreciated.
>>> >> Thanks,
>>> >>
>>> >> -
>>> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> >> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> >>
>>> >>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4 beta 28] Date and time picker

2015-05-03 Thread Stephen Nutbrown
Hi Dimitris,

That's extremely kind and generous of you, thank you! I owe you a few
beers, if you happen to have a paypal address hooked up to your email
account I can send you a little something (Not much as I'm currently a
student myself, but just to buy yourself a few beers on me).

Cheers,
Steve

C

On 3 May 2015 at 11:28, Dimitris Zenios  wrote:
> Sure I will put them here as an attachment so everybody can see it
>
> You will also need to
> 1.Put the datetimepicker library inside META-INF/modules/datetime/.
> 2.Put the datetimepicker css inside  META-INF/assets/other/css/.
>
> The example I have attached is using Java 8 LocalDateTime but it can be
> adopted in order to use java.util.Date
>
> Thanks
> Dimitris Zenios
>
> On Fri, May 1, 2015 at 9:41 PM, Stephen Nutbrown 
> wrote:
>>
>> Hi Dimitris,
>>
>> Wow, as it happens that's the exact same one I was having problems
>> implementing!
>>
>> It would be awesome to have some kind of tapestry5 component
>> marketplace. Perhaps another thing for another day.
>> I feel very cheeky asking, but would you be up for (able to) send me
>> the code, i'd be more than happy to pay for a few drinks for you?
>>
>> Thanks,
>> Steve
>>
>> On 1 May 2015 at 11:24, Dimitris Zenios  wrote:
>> > For tapestry 5.4 i have been using this javascript library
>> > https://eonasdan.github.io/bootstrap-datetimepicker/
>> >
>> > and a custom component extending AbstractField
>> >
>> >
>> >
>> >
>> > On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown 
>> > wrote:
>> >
>> >> Hi,
>> >>
>> >> I have been looking for a date + time picker for Tapestry. I'd like a
>> >> form component which will bind to a java.util.Date object, and asks
>> >> for a time as well as a date.
>> >>
>> >> I haven't had much luck, i've found bits of code here and there for
>> >> older versions of tapestry. I would have thought this component would
>> >> be one which comes with Tapestry out of the box, as I would think it's
>> >> a common requirement.
>> >>
>> >> I tried to create my own component which extends AbstractField, based
>> >> on the source code I can see for the
>> >>
>> >>
>> >> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
>> >> but I ran in to some issues (I think perhaps I just didn't have enough
>> >> patience, I will need to revisit it if I am to try again - it's a bit
>> >> of a learning curve for me).
>> >>
>> >> Is there a simpler way to do this? Am I going in the right direction
>> >> trying to create a new component which extends AbstractField? If there
>> >> was one that is known to work on the latest versions of tapestry and
>> >> with jQuery as the js provider (or not requiring jQuery/Prototype), I
>> >> would really appreciate a link. If not, any guidance on if my approach
>> >> is sensible, if it is.. i'll just try again this evening.
>> >>
>> >>
>> >> Any help is really appreciated.
>> >> Thanks,
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >> For additional commands, e-mail: users-h...@tapestry.apache.org
>> >>
>> >>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4 beta 28] Date and time picker

2015-05-02 Thread Stephen Nutbrown
Hi Dimitris,

Wow, as it happens that's the exact same one I was having problems
implementing!

It would be awesome to have some kind of tapestry5 component
marketplace. Perhaps another thing for another day.
I feel very cheeky asking, but would you be up for (able to) send me
the code, i'd be more than happy to pay for a few drinks for you?

Thanks,
Steve

On 1 May 2015 at 11:24, Dimitris Zenios  wrote:
> For tapestry 5.4 i have been using this javascript library
> https://eonasdan.github.io/bootstrap-datetimepicker/
>
> and a custom component extending AbstractField
>
>
>
>
> On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown 
> wrote:
>
>> Hi,
>>
>> I have been looking for a date + time picker for Tapestry. I'd like a
>> form component which will bind to a java.util.Date object, and asks
>> for a time as well as a date.
>>
>> I haven't had much luck, i've found bits of code here and there for
>> older versions of tapestry. I would have thought this component would
>> be one which comes with Tapestry out of the box, as I would think it's
>> a common requirement.
>>
>> I tried to create my own component which extends AbstractField, based
>> on the source code I can see for the
>>
>> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
>> but I ran in to some issues (I think perhaps I just didn't have enough
>> patience, I will need to revisit it if I am to try again - it's a bit
>> of a learning curve for me).
>>
>> Is there a simpler way to do this? Am I going in the right direction
>> trying to create a new component which extends AbstractField? If there
>> was one that is known to work on the latest versions of tapestry and
>> with jQuery as the js provider (or not requiring jQuery/Prototype), I
>> would really appreciate a link. If not, any guidance on if my approach
>> is sensible, if it is.. i'll just try again this evening.
>>
>>
>> Any help is really appreciated.
>> Thanks,
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [T5.4 beta 28] Date and time picker

2015-05-01 Thread Dimitris Zenios
For tapestry 5.4 i have been using this javascript library
https://eonasdan.github.io/bootstrap-datetimepicker/

and a custom component extending AbstractField




On Fri, May 1, 2015 at 1:15 PM, Stephen Nutbrown 
wrote:

> Hi,
>
> I have been looking for a date + time picker for Tapestry. I'd like a
> form component which will bind to a java.util.Date object, and asks
> for a time as well as a date.
>
> I haven't had much luck, i've found bits of code here and there for
> older versions of tapestry. I would have thought this component would
> be one which comes with Tapestry out of the box, as I would think it's
> a common requirement.
>
> I tried to create my own component which extends AbstractField, based
> on the source code I can see for the
>
> http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
> but I ran in to some issues (I think perhaps I just didn't have enough
> patience, I will need to revisit it if I am to try again - it's a bit
> of a learning curve for me).
>
> Is there a simpler way to do this? Am I going in the right direction
> trying to create a new component which extends AbstractField? If there
> was one that is known to work on the latest versions of tapestry and
> with jQuery as the js provider (or not requiring jQuery/Prototype), I
> would really appreciate a link. If not, any guidance on if my approach
> is sensible, if it is.. i'll just try again this evening.
>
>
> Any help is really appreciated.
> Thanks,
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


[T5.4 beta 28] Date and time picker

2015-05-01 Thread Stephen Nutbrown
Hi,

I have been looking for a date + time picker for Tapestry. I'd like a
form component which will bind to a java.util.Date object, and asks
for a time as well as a date.

I haven't had much luck, i've found bits of code here and there for
older versions of tapestry. I would have thought this component would
be one which comes with Tapestry out of the box, as I would think it's
a common requirement.

I tried to create my own component which extends AbstractField, based
on the source code I can see for the
http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/corelib/components/DateField.html#line.52
but I ran in to some issues (I think perhaps I just didn't have enough
patience, I will need to revisit it if I am to try again - it's a bit
of a learning curve for me).

Is there a simpler way to do this? Am I going in the right direction
trying to create a new component which extends AbstractField? If there
was one that is known to work on the latest versions of tapestry and
with jQuery as the js provider (or not requiring jQuery/Prototype), I
would really appreciate a link. If not, any guidance on if my approach
is sensible, if it is.. i'll just try again this evening.


Any help is really appreciated.
Thanks,

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: date and time picker (resolved)

2012-12-06 Thread John
It wasn't clear in the tapx DateField docs, but adding the code below fixed the 
issue...
configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$T");
  - Original Message - 
  From: John 
  To: Tapestry users 
  Sent: Thursday, November 29, 2012 2:19 PM
  Subject: Re: date and time picker


  I tried tapx-datefield 1.2-SNAPSHOT which at least runs but then the the js 
is missing?

  Webpage error details

  User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 
GTB7.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDR; 
.NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; .NET4.0C; .NET4.0E; 
BRI/2)
  Timestamp: Thu, 29 Nov 2012 14:16:58 UTC


  Message: Object expected
  Line: 21
  Char: 5
  Code: 0
  URI: 
http://localhost:8080/AuditManager/assets/1.0-SNAPSHOT-DEV/tapx/tapx-datefield.js


- Original Message - 
From: John 
To: Tapestry users 
Sent: Thursday, November 29, 2012 1:56 PM
    Subject: Re: date and time picker


I just tried the tapx component and that blew up...

java.lang.RuntimeException: Service id 'DynamicTemplateParser' has already 
been
defined by 
com.howardlewisship.tapx.core.services.CoreModule.buildDynamicTemplat
eParser(DynamicTemplateParserImpl, UpdateListenerHub) (at 
CoreModule.java:127) a
nd may not be redefined by 
org.apache.tapestry5.internal.dynamic.DynamicTemplate
ParserImpl(ClasspathURLConverter, BindingSource, PageSource, 
TemplateParser) (at
 DynamicTemplateParserImpl.java:45) via 
org.apache.tapestry5.services.TapestryMo
dule.bind(ServiceBinder) (at TapestryModule.java:308). You should rename 
one of
the service builder methods.
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.ja
va:183)
at 
org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:1
77)
at 
org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(T
apestryAppInitializer.java:200)
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:109)
at 
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
  - Original Message - 
  From: John 
  To: Tapestry users 
  Sent: Thursday, November 29, 2012 1:32 PM
      Subject: Re: date and time picker


  It's rumoured there's one in tapx, but I can't find docs on that?

  I'm looking for a month view plus hour/minute drop down.
- Original Message - 
From: Chris Cureau 
To: Tapestry users 
Sent: Thursday, November 29, 2012 1:25 PM
Subject: Re: date and time picker


I haven't found a ready-made tapestry component, but building up a
component isn't too hard.  Mobiscroll (http://mobiscroll.com) is a good
option, as is jQuery TIme Entry (http://keith-wood.name/timeEntry.html)
depending on your needs.


On Thu, Nov 29, 2012 at 7:03 AM, John  wrote:

> Hi,
>
        > Is there any tapestry component that is both a date and time picker?
>
> TIA
> John


Re: date and time picker

2012-11-29 Thread Howard Lewis Ship
It's funny how few date/time pickers are out there.  For my client, I've
cobbled together a decent one that works on top of JSCal2, which is
proprietary.  Even then, its a bit of an integration nightmare.  I'd really
like to write a decent date/time picker on top of jQuery or Tapestry 5.4's
DOM abstraction.


On Thu, Nov 29, 2012 at 9:24 AM, John  wrote:

> oh no, this is a js error, the script runs and fails using IE8!
>   - Original Message -
>   From: John
>   To: Tapestry users
>   Sent: Thursday, November 29, 2012 2:19 PM
>   Subject: Re: date and time picker
>
>
>   I tried tapx-datefield 1.2-SNAPSHOT which at least runs but then the the
> js is missing?
>
>   Webpage error details
>
>   User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
> Trident/4.0; GTB7.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR
> 3.0.04506.30; MDDR; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1;
> .NET4.0C; .NET4.0E; BRI/2)
>   Timestamp: Thu, 29 Nov 2012 14:16:58 UTC
>
>
>   Message: Object expected
>   Line: 21
>   Char: 5
>   Code: 0
>   URI:
> http://localhost:8080/AuditManager/assets/1.0-SNAPSHOT-DEV/tapx/tapx-datefield.js
>
>
> - Original Message -
>     From: John
> To: Tapestry users
> Sent: Thursday, November 29, 2012 1:56 PM
> Subject: Re: date and time picker
>
>
> I just tried the tapx component and that blew up...
>
> java.lang.RuntimeException: Service id 'DynamicTemplateParser' has
> already been
> defined by
> com.howardlewisship.tapx.core.services.CoreModule.buildDynamicTemplat
> eParser(DynamicTemplateParserImpl, UpdateListenerHub) (at
> CoreModule.java:127) a
> nd may not be redefined by
> org.apache.tapestry5.internal.dynamic.DynamicTemplate
> ParserImpl(ClasspathURLConverter, BindingSource, PageSource,
> TemplateParser) (at
>  DynamicTemplateParserImpl.java:45) via
> org.apache.tapestry5.services.TapestryMo
> dule.bind(ServiceBinder) (at TapestryModule.java:308). You should
> rename one of
> the service builder methods.
> at
> org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.ja
> va:183)
> at
> org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:1
> 77)
> at
> org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(T
> apestryAppInitializer.java:200)
> at
> org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:109)
> at
> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>   - Original Message -
>   From: John
>   To: Tapestry users
>   Sent: Thursday, November 29, 2012 1:32 PM
>   Subject: Re: date and time picker
>
>
>   It's rumoured there's one in tapx, but I can't find docs on that?
>
>   I'm looking for a month view plus hour/minute drop down.
> - Original Message -
> From: Chris Cureau
> To: Tapestry users
> Sent: Thursday, November 29, 2012 1:25 PM
> Subject: Re: date and time picker
>
>
> I haven't found a ready-made tapestry component, but building up a
> component isn't too hard.  Mobiscroll (http://mobiscroll.com) is
> a good
> option, as is jQuery TIme Entry (
> http://keith-wood.name/timeEntry.html)
> depending on your needs.
>
>
> On Thu, Nov 29, 2012 at 7:03 AM, John  wrote:
>
> > Hi,
> >
> > Is there any tapestry component that is both a date and time
> picker?
> >
> > TIA
> > John
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


Re: date and time picker

2012-11-29 Thread John
I tried tapx-datefield 1.2-SNAPSHOT which at least runs but then the the js is 
missing?

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 
GTB7.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDR; 
.NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; .NET4.0C; .NET4.0E; 
BRI/2)
Timestamp: Thu, 29 Nov 2012 14:16:58 UTC


Message: Object expected
Line: 21
Char: 5
Code: 0
URI: 
http://localhost:8080/AuditManager/assets/1.0-SNAPSHOT-DEV/tapx/tapx-datefield.js


  - Original Message - 
  From: John 
  To: Tapestry users 
  Sent: Thursday, November 29, 2012 1:56 PM
  Subject: Re: date and time picker


  I just tried the tapx component and that blew up...

  java.lang.RuntimeException: Service id 'DynamicTemplateParser' has already 
been
  defined by 
com.howardlewisship.tapx.core.services.CoreModule.buildDynamicTemplat
  eParser(DynamicTemplateParserImpl, UpdateListenerHub) (at 
CoreModule.java:127) a
  nd may not be redefined by 
org.apache.tapestry5.internal.dynamic.DynamicTemplate
  ParserImpl(ClasspathURLConverter, BindingSource, PageSource, TemplateParser) 
(at
   DynamicTemplateParserImpl.java:45) via 
org.apache.tapestry5.services.TapestryMo
  dule.bind(ServiceBinder) (at TapestryModule.java:308). You should rename one 
of
  the service builder methods.
  at 
org.apache.tapestry5.ioc.internal.RegistryImpl.(RegistryImpl.ja
  va:183)
  at 
org.apache.tapestry5.ioc.RegistryBuilder.build(RegistryBuilder.java:1
  77)
  at 
org.apache.tapestry5.internal.TapestryAppInitializer.createRegistry(T
  apestryAppInitializer.java:200)
  at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:109)
  at 
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
- Original Message - 
From: John 
To: Tapestry users 
Sent: Thursday, November 29, 2012 1:32 PM
Subject: Re: date and time picker


It's rumoured there's one in tapx, but I can't find docs on that?

I'm looking for a month view plus hour/minute drop down.
  - Original Message - 
  From: Chris Cureau 
  To: Tapestry users 
  Sent: Thursday, November 29, 2012 1:25 PM
      Subject: Re: date and time picker


  I haven't found a ready-made tapestry component, but building up a
  component isn't too hard.  Mobiscroll (http://mobiscroll.com) is a good
  option, as is jQuery TIme Entry (http://keith-wood.name/timeEntry.html)
  depending on your needs.


  On Thu, Nov 29, 2012 at 7:03 AM, John  wrote:

  > Hi,
  >
  > Is there any tapestry component that is both a date and time picker?
  >
  > TIA
  > John


Re: date and time picker

2012-11-29 Thread Lance Java
I've used this jquery UI plugin http://fgelinas.com/code/timepicker in a
non-tapestry project and my users love it.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/date-and-time-picker-tp5718388p5718392.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: date and time picker

2012-11-29 Thread Chris Cureau
I haven't found a ready-made tapestry component, but building up a
component isn't too hard.  Mobiscroll (http://mobiscroll.com) is a good
option, as is jQuery TIme Entry (http://keith-wood.name/timeEntry.html)
depending on your needs.


On Thu, Nov 29, 2012 at 7:03 AM, John  wrote:

> Hi,
>
> Is there any tapestry component that is both a date and time picker?
>
> TIA
> John