Refresh tapestry kaptcha using ajax event link

2015-09-28 Thread Simon Raveh
Hi All,

I'm using Tapestry 5.4-beta-35  trying to refresh the Kaptcha image using an
ajax event link. I'm  using the following code:







What characters are shown in the box above?







New
Image




And in the java class:
void onNewImage() {
if (request.isXHR()) {
ajaxResponseRenderer.addRender(captchaZone);
}
}
I can see the ajax call being trigger on the server and the correct JSON
response is returned but the image does not refresh. I noticed that the
KaptchaImage onImage method is never invoked so new image is not being
generated, only the beginRender method is being called.
When doing the full page reload the following methods are being invoke on
the KaptchaImage component:
1. beginRender
2. onImage
A. prepareResponse
B. getStream
But when doing an ajax call only the begainRender method is being called
Any help will be appreciate
Thanks,
Simon




smime.p7s
Description: S/MIME cryptographic signature


Re: Contributing ComponentMessagesSource

2015-09-28 Thread Geoff Callender
No problem. That’s good to know. Thanks.

> On 28 Sep 2015, at 7:32 pm, Charlouze  wrote:
> 
> My problem doesn't happen anymore but i realize that i had a remaining
> propertie hidden in my app.properties :/ I removed it and it works. I'm a
> bit ashamed for bothering you :p
> 
> Thanks anyway Geoff !
> 
> Charles
> 
> Le lun. 28 sept. 2015 à 10:24, Geoff Callender <
> geoff.callender.jumpst...@gmail.com> a écrit :
> 
>> Try a different path, not in META-INF, and not in one of the special
>> folders (pages, components, mixins, etc). There’s a lot of
>> behind-the-scenes stuff going on with META-INF/assets which might be
>> interfering. For example:
>> 
>> 
>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/contributingtranslators
>> 
>> Geoff
>> 
>>> On 28 Sep 2015, at 5:49 pm, Charlouze  wrote:
>>> 
>>> Hello tapestry users,
>>> 
>>> I have a problem that I can't figure ou what it is.
>>> 
>>> I'm contributing to the ComponentMessagesSource from a component library
>> :
>>> 
>>> 
>>> 
>>> *public static void contributeComponentMessagesSource(final
>>> OrderedConfiguration
>>> configuration,
>> @Path("classpath:META-INF/assets/catalogs/request.properties")
>>> final
>>> Resource requestCatalog) {configuration.add("request",
>>> requestCatalog);}*
>>> 
>>> As you see i have a file located at
>>> *META-INF/assets/catalogs/request.properties* in my classpath. I also
>> have
>>> the localized one for french locale (*request_fr.properties*) in the same
>>> folder.
>>> 
>>> When I use the Messages service with a propertie written in those files,
>> it
>>> doesn't get translated.
>>> 
>>> Does someone already had that issue ?
>>> 
>>> Thanks in advance for your help.
>>> 
>>> Regards,
>>> Charles
>> 
>> 
>> -
>> 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: Contributing ComponentMessagesSource

2015-09-28 Thread Charlouze
My problem doesn't happen anymore but i realize that i had a remaining
propertie hidden in my app.properties :/ I removed it and it works. I'm a
bit ashamed for bothering you :p

Thanks anyway Geoff !

Charles

Le lun. 28 sept. 2015 à 10:24, Geoff Callender <
geoff.callender.jumpst...@gmail.com> a écrit :

> Try a different path, not in META-INF, and not in one of the special
> folders (pages, components, mixins, etc). There’s a lot of
> behind-the-scenes stuff going on with META-INF/assets which might be
> interfering. For example:
>
>
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/contributingtranslators
>
> Geoff
>
> > On 28 Sep 2015, at 5:49 pm, Charlouze  wrote:
> >
> > Hello tapestry users,
> >
> > I have a problem that I can't figure ou what it is.
> >
> > I'm contributing to the ComponentMessagesSource from a component library
> :
> >
> >
> >
> > *public static void contributeComponentMessagesSource(final
> > OrderedConfiguration
> > configuration,
> @Path("classpath:META-INF/assets/catalogs/request.properties")
> > final
> > Resource requestCatalog) {configuration.add("request",
> > requestCatalog);}*
> >
> > As you see i have a file located at
> > *META-INF/assets/catalogs/request.properties* in my classpath. I also
> have
> > the localized one for french locale (*request_fr.properties*) in the same
> > folder.
> >
> > When I use the Messages service with a propertie written in those files,
> it
> > doesn't get translated.
> >
> > Does someone already had that issue ?
> >
> > Thanks in advance for your help.
> >
> > Regards,
> > Charles
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Contributing ComponentMessagesSource

2015-09-28 Thread Geoff Callender
Try a different path, not in META-INF, and not in one of the special folders 
(pages, components, mixins, etc). There’s a lot of behind-the-scenes stuff 
going on with META-INF/assets which might be interfering. For example:


http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/contributingtranslators

Geoff

> On 28 Sep 2015, at 5:49 pm, Charlouze  wrote:
> 
> Hello tapestry users,
> 
> I have a problem that I can't figure ou what it is.
> 
> I'm contributing to the ComponentMessagesSource from a component library :
> 
> 
> 
> *public static void contributeComponentMessagesSource(final
> OrderedConfiguration
> configuration, @Path("classpath:META-INF/assets/catalogs/request.properties")
> final
> Resource requestCatalog) {configuration.add("request",
> requestCatalog);}*
> 
> As you see i have a file located at
> *META-INF/assets/catalogs/request.properties* in my classpath. I also have
> the localized one for french locale (*request_fr.properties*) in the same
> folder.
> 
> When I use the Messages service with a propertie written in those files, it
> doesn't get translated.
> 
> Does someone already had that issue ?
> 
> Thanks in advance for your help.
> 
> Regards,
> Charles


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



Contributing ComponentMessagesSource

2015-09-28 Thread Charlouze
Hello tapestry users,

I have a problem that I can't figure ou what it is.

I'm contributing to the ComponentMessagesSource from a component library :



*public static void contributeComponentMessagesSource(final
OrderedConfiguration
configuration, @Path("classpath:META-INF/assets/catalogs/request.properties")
final
Resource requestCatalog) {configuration.add("request",
requestCatalog);}*

As you see i have a file located at
*META-INF/assets/catalogs/request.properties* in my classpath. I also have
the localized one for french locale (*request_fr.properties*) in the same
folder.

When I use the Messages service with a propertie written in those files, it
doesn't get translated.

Does someone already had that issue ?

Thanks in advance for your help.

Regards,
Charles