Ladislav
-- Původní zpráva --
Od: Thiago H de Paula Figueiredo
Komu: Tapestry users
Datum: 20. 2. 2014 0:05:09
Předmět: Re: Executing JS function from component ONCE
"On Wed, 19 Feb 2014 18:48:02 -0300, wrote:
> Hi!
Hi!
> var db =
On Wed, 19 Feb 2014 18:48:02 -0300, wrote:
Hi!
Hi!
var db = function decorateBody() {
document.body.setAttribute("onload","setPosition();");
document.body.setAttribute("onScroll","setPosition();");
}
You're using JavaScript that looks like 10 years ago. Use event listeners
for
ut nothing helped.
> Only working solution is to use addScript() as Dmitry suggested, I'm not
> very happy with storing flag in request solution, but it is currently best
> solution I have.
>
> Best regards
> Ladislav
>
>
>
> -- Původní zpráva --
lution is to use addScript() as Dmitry suggested, I'm not
very happy with storing flag in request solution, but it is currently best
solution I have.
Best regards
Ladislav
-- Původní zpráva --
Od: Thiago H de Paula Figueiredo
Komu: Tapestry users
Datum: 19. 2. 2014 19:17
On Wed, 19 Feb 2014 14:54:07 -0300, Dmitry Gusev
wrote:
Another option could be to store some attribute in the request scope and
only call javaScriptSupport.addScript once on the server side.
JavaScriptSupport.addSCript() is deprecated in T5.4. In addition, I've
just noticed, he's doing a
Another option could be to store some attribute in the request scope and
only call javaScriptSupport.addScript once on the server side.
On Wed, Feb 19, 2014 at 8:19 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:
> On Wed, 19 Feb 2014 12:16:33 -0300, wrote:
>
> javaScriptSupport.
On Wed, 19 Feb 2014 12:16:33 -0300, wrote:
javaScriptSupport.addScript("decorateBody();"); in @AfterRender method.
It works, but when I use more of my components in one page,
"decorateBody();"
call is called x times, where x is number of components on the page.
That's very easy and Tapest
On Wed, 19 Feb 2014 12:16:33 -0300, wrote:
Hi everyone!
Hi!
Question 1: Is it possible to specify something "execute only once in
page" on component level? (call from page containing the components is
not
solution for me, I want to have my component "independent")
No.
Question 2: Is
Hi everyone!
I've implemented component, which needs JavaScript function for proper
positioning and I need to set this function as 's "onload" and
"onScroll" events. So, I have .js file with my possitioning function and
also decorateBody() function which I need to call after page is created.