You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Michael Wyraz <mi...@evermind.de> on 2014/05/12 17:27:09 UTC

contributeMarkupRenderer missing JavaScriptSupport

Hi,

we have a layout package that adds some extra css/js to all pages. It is 
implemented as contributeMarkupRenderer:

         public void
    contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter>
    configuration, final Environment environment)
         {
             MarkupRendererFilter importUIStack = new MarkupRendererFilter()
             {
                 public void renderMarkup(MarkupWriter writer,
    MarkupRenderer renderer)
                 {
                     renderer.renderMarkup(writer);

                     JavaScriptSupport
    jss=environment.peekRequired(JavaScriptSupport.class);
                     jss.importStack("ui");
                 }
             };
             configuration.add("ImportUIStack", importUIStack);
         }

We run Tapestry 5.4-beta3. The problem is that randomly after 
application start JavaScriptSupport is not set on environment. If this 
happens, we must restart the apllication to get it work again.

Does anyone have an idea what the problem might be?

Kind regards,
Michael.


Re: contributeMarkupRenderer missing JavaScriptSupport

Posted by Michael Wyraz <mi...@evermind.de>.
Hi Thiago,

thank you a lot. I changed it to

    configuration.add("ImportUIStack", importUIStack,
    "after:JavaScriptSupport");

This contribution comes from Tapestry's JavaScriptModule. The problem 
did not occur in the last hour - I guess it's solved with this change.

Kind Regards,
MIchael.


>> configuration.add("ImportUIStack", importUIStack);
>>
>> We run Tapestry 5.4-beta3. The problem is that randomly after
>> application start JavaScriptSupport is not set on environment. If this
>> happens, we must restart the apllication to get it work again.
>>
>> Does anyone have an idea what the problem might be?
>
> You provided your contribution without any ordering constraint. I 
> cannot look up what's the exact contribution that adds 
> JavaScriptSupport, but you need to add yours after or before it, I 
> cannot recall which.
>


-- 

Mit freundlichen Grüßen / Kind regards

Michael Wyraz

evermind GmbH
Schorlemmerstraße 1
04155 Leipzig

Tel.:       +49 (0)341-25 39 66 - 0
Fax:        +49 (0)341-25 39 66 - 1
Funk:       +49 (0)177-73 00 00 3
E-Mail:     michael.wyraz@evermind.de

HRB: 21586
Amtsgericht Leipzig

Geschäftsführer:
Christoph Klemm


Re: contributeMarkupRenderer missing JavaScriptSupport

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 12 May 2014 12:27:09 -0300, Michael Wyraz  
<mi...@evermind.de> wrote:

> Hi,

Hi!

>              configuration.add("ImportUIStack", importUIStack);
>
> We run Tapestry 5.4-beta3. The problem is that randomly after
> application start JavaScriptSupport is not set on environment. If this
> happens, we must restart the apllication to get it work again.
>
> Does anyone have an idea what the problem might be?

You provided your contribution without any ordering constraint. I cannot  
look up what's the exact contribution that adds JavaScriptSupport, but you  
need to add yours after or before it, I cannot recall which.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org