myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-769) configurable IDs used for rendering
Date Mon, 06 Feb 2006 14:34:07 GMT
    [ http://issues.apache.org/jira/browse/MYFACES-769?page=comments#action_12365291 ] 

Martin Marinschek commented on MYFACES-769:
-------------------------------------------

Before creating dynamic IDs, JSF calls the following:

        ExternalContext extCtx = FacesContext.getCurrentInstance().getExternalContext();
        return extCtx.encodeNamespace(UNIQUE_ID_PREFIX + _uniqueIdCounter++);

so you would basically need to make sure that the parent-most naming-container in your app
has a dynamic id, and then make sure that your PortletExternalContextImpl overwrites that
encodeNamespace method correctly.

Does that solve your problem?

regards,

Martin

> configurable IDs used for rendering
> -----------------------------------
>
>          Key: MYFACES-769
>          URL: http://issues.apache.org/jira/browse/MYFACES-769
>      Project: MyFaces
>         Type: Improvement
>     Reporter: Dave Brondsema

>
> If the same code is used ot generated a component tree for more than one part of a webpage,
the rendered IDs are the same and functionality is broken (javascript needs unique IDs).
> An example of when this happens is when as portlet uses JSF for rendering.  If the portlet
is used more than once on a single page (e.g. an RSS reader) all the IDs are the same.
> Thus we need a way to have more configurable (perhaps random) IDs when rendered.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message