You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Martin Marinschek <ma...@gmail.com> on 2008/04/09 04:47:11 UTC

Re: Is it possible to have a renderer do its rendering at the end of the document?

Short answer: no, not really. What I would do in your case is I would
create a new component, and put it before the closing of your </body>
(or even create a new component which renders the body for you). Then
the renderer can register the stuff it wants to render with this new
component...

regards,

Martin

On Fri, Mar 28, 2008 at 12:14 PM,
<Ma...@sanofi-aventis.com> wrote:
>
>
>
>
> Hi,
>
>
>
> The subject is vague so here's a more detailed description.
>
>
>
> I have a context menu component that I've written. The way it works is by
> rendering a <div> with the context menu items, anything that's in the
> javax.output.Command family is an item. The div is initially set to hidden.
> In the renderer I'm also creating a value binding of this context menu
> component using its ID.
>
>
>
> To use the context menu I have a sub class/components of commandLink which
> has the added attribute of contextMenu. The command link then can reference
> the context menu with an expression like contextMenu="#{myContextMenu}".
>
>
>
> This all works great. The problem is accessibility is very important for
> this particular site. Currently the context menu has to be defined before
> using the context menu command link. With this the div is generated
> somewhere higher up on the page. For accessibility purposes we want the div
> to be at the end of page. When you disable CSS which is what the
> accessibility screen readers essentially do, the hidden div is no longer
> hidden.
>
>
>
> I've done a lot of things with the AddResource interface, I have a whole
> resource component which works very well. I've looked through the extension
> filter code and I understand how that works with the positioned info. I'm
> wondering if there is a similar way to do this with a renderer. You know
> with AddResource you can do something like
> addJavascriptAtPostion(AddResource.HEADER_BEGIN ….) and I think there is
> also BODY_END. I want to do the rendering where it is in the page, but write
> all the HTML at BODY_END. Is this possible?
>
>
>
> Thanks,
>
> Matt



-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces