[ 
http://issues.apache.org/jira/browse/MYFACES-702?page=comments#action_12361333 
] 

Henrik Bentel commented on MYFACES-702:
---------------------------------------


It seems when the components are created the createUniqueId method in 
UIViewRoot.java 
calls ExternalContext.encodeNamespace(...) method. 
The portlet implementation of the ExternalContext 
(PortletExternalContextImpl.java) returns 
"((RenderResponse)_portletResponse).getNamespace() + name" where name is passed 
in and looks like "_id0", "_id1", "_idx".

The Servlet implementation just returns the passed in value. 

Myfaces's HtmlTextRendererBase.java seems to inject SPAN elements around all 
components that
has an ID which does NOT start with "_id". 

-Henrik




> outputText generates wrapped span element in a portal
> -----------------------------------------------------
>
>          Key: MYFACES-702
>          URL: http://issues.apache.org/jira/browse/MYFACES-702
>      Project: MyFaces
>         Type: Bug
>   Components: Implementation
>     Versions: 1.1.0
>     Reporter: Gavin Cornwell

>
> We have a JSF app that runs as a portlet and normal webapp.
> In the webapp the <h:outputText value="some text"/> appears as I would expect 
> (i.e. just the text) however the same thing in the portlet gets rendered as:
> <span id="form-id:handleMetaDataEvent_id36">some text</span>
> This becomes a problem when you are trying to use outputText to render part 
> of a URL or to become a JavaScript string as the output includes the span 
> element!
> Looking at the renderer code for outputText it appears the span gets 
> generated when the id does not start with "_id", so the question is where has 
> the "handleMetaDataEvent" prefix for the id come from?

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

Reply via email to