Configure requirejs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Configure requirejs

nquirynen
Hey,

How can I configure requirejs in Tapestry? I want to set the
"waitSeconds" option for the whole application. How can I achieve this?

Thanks,

Nathan


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Configure requirejs

Cezary Biernacki
Hi,
in your Layout component you need to add something like:

    private static final ModuleConfigurationCallback CONFIGURE_WAIT_SECONDS
= (config) -> config.put("waitSeconds", 120);
    @AfterRender
    public void configureRequireJS() {

javaScriptSupport.addModuleConfigurationCallback(CONFIGURE_WAIT_SECONDS);
    }

Best regards,
Cezary


On Wed, Aug 7, 2019 at 3:05 PM Nathan Quirynen <[hidden email]>
wrote:

> Hey,
>
> How can I configure requirejs in Tapestry? I want to set the
> "waitSeconds" option for the whole application. How can I achieve this?
>
> Thanks,
>
> Nathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>