Details
Description
The link is declared by
<h:commandLink id="select" action="#
{locationListManagedBean.associate}" styleClass="detailLink" title="#
{messages['associate']}">
<t:div />
<f:param name="locationSelectedBean" value="#
" />
</h:commandLink>
The associated generated HTML code is valid but the \ character is not escaped :
<a href="#"
onclick="return oamSubmitForm('xnetForm','xnetForm:_idJsp30:tablelocation:2:select',null,[['locationSelectedBean','com.michelin.wrh.bo.LocationBean CAR/T1[]5%Car\m+es|']]);"
id="xnetForm:_idJsp30:tablelocation:2:select" title="Associer" class="detailLink">
<div></div>
</a>
The associated javascript method does not manage special characters !
The locationSelectedBean param retrieved from
context.getExternalContext().getRequestParameterMap().get("locationSelectedBean");
has lost the "\" character
We can fix the issue by overwritting the org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase class and modify the following method :
private StringBuffer addChildParameters(UIComponent component, UIComponent nestingForm)
{
StringBuffer params = new StringBuffer();
params.append("[");
Iterator it = getChildren(component).iterator();
do
{
if(!it.hasNext())
break;
UIComponent child = (UIComponent)it.next();
if(child instanceof UIParameter)
} while(true);
params.append("]");
return params;
}
Attachments
Issue Links
- relates to
-
MYFACES-1832 bad charset encoding on <f:param> tag
- Closed