Volodymyr Siedlecki created MYFACES-4462:
--------------------------------------------
Summary: f:param not passed / Uncaught ReferenceError: myfaces is
not defined
Key: MYFACES-4462
URL: https://issues.apache.org/jira/browse/MYFACES-4462
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 4.0.0-RC1
Reporter: Volodymyr Siedlecki
{color:#d4d4d4}
{color}{color:#808080}<{color}{color:#569cd6}h:form{color}{color:#808080}>{color}
{color:#d4d4d4}
{color}{color:#808080}<{color}{color:#569cd6}h:commandButton{color}{color:#d4d4d4}
{color}{color:#9cdcfe}id{color}{color:#d4d4d4} =
{color}{color:#ce9178}"submit"{color}{color:#d4d4d4} {color}
{color:#d4d4d4} {color}{color:#9cdcfe}value{color}{color:#d4d4d4} =
{color}{color:#ce9178}"Show Message"{color}{color:#808080}>{color}
{color:#d4d4d4}
{color}{color:#808080}<{color}{color:#569cd6}f:param{color}{color:#d4d4d4}
{color}{color:#9cdcfe}name{color}{color:#d4d4d4} =
{color}{color:#ce9178}"test_name"{color}{color:#d4d4d4}
{color}{color:#9cdcfe}value{color}{color:#d4d4d4} =
{color}{color:#ce9178}"test_value"{color}{color:#808080} />{color}
{color:#d4d4d4}
{color}{color:#808080}</{color}{color:#569cd6}h:commandButton{color}>
...
produces the following html:
<form id="j_id_3" name="j_id_3" method="post"
action="/test/home.xhtml?jfwid=-x7udcvg7i"
enctype="application/x-www-form-urlencoded">
<input id="j_id_3:submit" name="j_id_3:submit" type="submit" value="Show
Message" onclick="return
myfaces.oam.submitForm('j_id_3','j_id_3:submit',null,[['username','JSF 2.0
User']]);">
The onclick="return myfaces.oam.." causes an error as the myfaces variable
hasn't been defined not any script tag has been included.
I compared the working 3.0 case to the failing 4.0 case, and I have a fix by
backporting some removed code (minus the IE support) . However, I know there's
been JavaScript discussion, so feel free post another fix if there's better
way.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)