Hi Thiago,

thanks a lot for your feedback. The application is based on Bootstrap 3 and 
therefore I enabled the core stack by default.

I will therefore create a patch and file a JIRA issue.

Best regards,

Thilo


________________________________________
From: Thiago H de Paula Figueiredo <thiag...@gmail.com>
Sent: Wednesday, November 06, 2013 12:46
To: Tapestry users
Subject: Re: [5.4] Render Partial HTML Pages

On Wed, 06 Nov 2013 07:48:10 -0200, Thilo Tanner <th...@dienststelle.ch>
wrote:

> Dear Tapestry Developers / Users,

Hi!

Does your page import stylesheets or JavaScript directly? Or through
components it uses? If the answers are "no", you can disable the addition
of the core stack. Since alpha 24, there's a symbol for that:
SymbolConstants.INCLUDE_CORE_STACK (tapestry.include-core-stack), which
defaults to true.

Otherwise, I think we can solve this in Tapestry itself by adding some way
to disable DocumentLinker from working in a given request. Please file a
JIRA about it.

>
> I have a question concerning partial HTML rendering without using zones
> using 5.4. Until alpha 24, the following code was working:
>
> @Inject private Block page;
>
> @Inject private Block modal;
>
> public Object getActiveBlock() {
>     return request.isXHR() ? modal : page;
> }
>
> The modal block consists of a <div> element. Using plain jQuery or
> http://pjax.heroku.com/ I was able to replace parts of the page with the
> HTML snippet rendered by T5. The good thing is, that the entire page is
> loaded in case of a normal request and the partial HTML is very easy to
> debug.
>
> The part of the code which prevents the rendering now is in
> DocumentLinkerImpl:
>
> // This only applies when the document is an HTML document. This may
> need to change in the
> // future, perhaps configurable, to allow for html and xhtml and perhaps
> others. Does SVG
> // use stylesheets?
>
> if (!rootElementName.equals("html")) {
>      throw new RuntimeException(String.format("The root element of the
> rendered document was <%s>, not <html>. A root element of <html> is
> needed when linking JavaScript and stylesheet resources.",
> rootElementName));
> }
>
> My question: is there a way to render partial HTML pages without using
> zones or decorate the DocumentLinker service?
>
> What about introducing a Symbol which allows partial HTML rendering? If
> you're interested I can submit a pull request.
>
> Thanks and best regards,
>
> Thilo
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


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

---------------------------------------------------------------------
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

Reply via email to