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 <steves...@gmail.com> 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 <steves...@gmail.com> 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 <dimitris.zen...@gmail.com> 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 <dimitris.zen...@gmail.com> 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
>>>> >> 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

Reply via email to