Re: How to pass a javascript function in tapestry mixin

2014-02-26 Thread Boris Horvat
On Wed, Feb 26, 2014 at 1:02 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Tue, 25 Feb 2014 21:30:39 -0300, Boris Horvat > wrote: > > Sorry Thaigo, but I am not sure what you had in mind. >> If you think about >> That's something to avoid as much as possible. >> > > I wasn't

Re: How to pass a javascript function in tapestry mixin

2014-02-26 Thread Thiago H de Paula Figueiredo
On Tue, 25 Feb 2014 21:30:39 -0300, Boris Horvat wrote: Sorry Thaigo, but I am not sure what you had in mind. If you think about That's something to avoid as much as possible. I wasn't clear. I meant to say you should avoid passing a whole function definition. Just passing a function valu

Re: How to pass a javascript function in tapestry mixin

2014-02-26 Thread Dmitry Gusev
https://github.com/got5/tapestry5-jquery/issues/244#issuecomment-36102130 On Wed, Feb 26, 2014 at 3:50 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Tue, 25 Feb 2014 21:30:39 -0300, Boris Horvat > wrote: > > Sorry Thaigo, but I am not sure what you had in mind. >> >> If yo

Re: How to pass a javascript function in tapestry mixin

2014-02-26 Thread Thiago H de Paula Figueiredo
On Tue, 25 Feb 2014 21:30:39 -0300, Boris Horvat wrote: Sorry Thaigo, but I am not sure what you had in mind. If you think about That's something to avoid as much as possible. What are you talking about? Well first I am not sure why is this the case. If tapestry supports passing configu

Re: How to pass a javascript function in tapestry mixin

2014-02-25 Thread Boris Horvat
Sorry Thaigo, but I am not sure what you had in mind. If you think about That's something to avoid as much as possible. Well first I am not sure why is this the case. If tapestry supports passing configurations in this way then it should support passing functions when those configurations are e

Re: How to pass a javascript function in tapestry mixin

2014-02-24 Thread Thiago H de Paula Figueiredo
On Mon, 24 Feb 2014 19:53:59 -0300, Boris Horvat wrote: Anyone has any idea about this? :) I already gave you my suggestion. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br ---

Re: How to pass a javascript function in tapestry mixin

2014-02-24 Thread Boris Horvat
Anyone has any idea about this? :) On Sat, Feb 22, 2014 at 10:07 PM, Boris Horvat wrote: > In case it helps the method is defined like this > > function showUploadProgress() { > var showUploadProgress = function(id, fileName) { > alert(123) > $('.photo').removeClass('photo').

Re: How to pass a javascript function in tapestry mixin

2014-02-22 Thread Boris Horvat
In case it helps the method is defined like this function showUploadProgress() { var showUploadProgress = function(id, fileName) { alert(123) $('.photo').removeClass('photo').addClass('photo-progress-reveal'); } return showUploadProgress; } Cheers On Sat, Feb 22, 201

Re: How to pass a javascript function in tapestry mixin

2014-02-22 Thread Boris Horvat
Sadly I did posted it Communication with the server failed: null Ajax failure: Status 200 for #{request.url}: null Communication with the server failed: null Not much more info then this. In the console I can see 1. Communication with the server failed: null t5-console-jquery.js:64

Re: How to pass a javascript function in tapestry mixin

2014-02-17 Thread Thiago H de Paula Figueiredo
On Sat, 15 Feb 2014 21:49:11 -0200, Boris Horvat wrote: Sadly that doesnt really help. Same error, same issue. What's the JavaScript error? I don't recall you posting it. That's something to avoid as much as possible. What exactly do you want to avoid and why? Any suggestion how to avo

Re: How to pass a javascript function in tapestry mixin

2014-02-16 Thread Boris Horvat
well that javascript wont work...I will have to find the right properties to trigger it :) On Sun, Feb 16, 2014 at 7:36 PM, Boris Horvat wrote: > As mentioned the code actually do what it was suppose to do, it is just > that it breaks ajax (some browser security concerns as it is sent from the >

Re: How to pass a javascript function in tapestry mixin

2014-02-16 Thread Boris Horvat
As mentioned the code actually do what it was suppose to do, it is just that it breaks ajax (some browser security concerns as it is sent from the server, not too sure about specifics) I would expected that either tapestry has a good way to solve this issue or at least a nice workaround... I will

Re: How to pass a javascript function in tapestry mixin

2014-02-15 Thread Christian Riedel
Hi Boris, passing the whole function code as JSONLiteral could work, I guess: params.put("onSubmit", new JSONLiteral("function () { showUploadProgress(); }")); But Thiago has a point. Passing more complex code around like this is not a good idea. Instead you can alter the fileuploader’

Re: How to pass a javascript function in tapestry mixin

2014-02-15 Thread Boris Horvat
Sadly that doesnt really help. Same error, same issue. I have changed the JSONLiberal call to params.put("onSubmit", new JSONLiteral("showUploadProgress")); My javascript that is generated at the end looks like this "uploadable" : [ { "elementId" : "imageUpload", "onSu

Re: How to pass a javascript function in tapestry mixin

2014-02-15 Thread Thiago H de Paula Figueiredo
On Sat, 15 Feb 2014 16:25:27 -0200, Boris Horvat wrote: Hi everyone, Hi! I have a tapestr5-jquery component that to which I need to pass a function in the configuration. That's something to avoid as much as possible. The component is http://tapestry5-jquery.com/components/docsajaxupl