myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Lucy <wtl...@us.ibm.com>
Subject Issue with javax.faces.SEPARATOR_CHAR and commandLink
Date Wed, 20 Aug 2014 11:36:36 GMT


Hello all,

We've come across an issue while trying to modify the
javax.faces.SEPARATOR_CHAR - changing it to a non-colon character seems to
break h:commandLink actions.  For example, with the separator character set
to a hyphen "-", the following navigation does not work (the output link
just triggers a refresh):

<f:view>
<h:form>
	<h:commandLink id="link" action="toLink.html">
		<h:outputText value="Link" />
	</h:commandLink>
</h:form>
</f:view>

This can be observed in MyFaces 2.0.21, 2.1.15, and 2.2.4.  A workaround is
to enable the context parameter
org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE, however that parameter
has been removed in the 2.2 branch.  (It's also not a particularly
desirable workaround.)  The issue here seems to stem from the oamSubmit.js
script; in that file there is a call

    myfaces.oam.setHiddenInput(formName, formName + ':' + '_idcl', linkId);

which explicitly passes uses a colon separator character.  In
HtmlRendendererUtils.getHiddenCommandLinkFieldname, however, we have

    return formInfo.getFormName() + UINamingContainer.getSeparatorChar
(FacesContext.getCurrentInstance())+ HIDDEN_COMMANDLINK_FIELD_NAME;

which will cause the wrong hidden field name to be searched, and the broken
actions seen here.

Is this a bug, or just an accepted limitation of javax.faces.SEPARATOR_CHAR
use?  Thanks for any feedback!

Bill Lucy
IBM RTP WebSphere
wtlucy@us.ibm.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message