Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-Alpha2
-
Fix Version/s: 2.0-Alpha3, 2.0.0
-
Component/s: Framework
-
Labels:None
-
Environment:jsf2.0, ICEfaces-2.0
Description
using basic-ajax example of redirection, the following does not render correctly when adding ICEfaces-2.0:-
<h:body>
<h1>Ajax Redirect</h1>
<h:form id="form">
<h:selectOneMenu valueChangeListener="#{redirectBean.redirectPage}">
<f:selectItem itemLabel="Pick One" noSelectionOption="true" />
<f:selectItem itemValue="/redirecttarget1.xhtml" itemLabel="Page 1"/>
<f:selectItem itemValue="/redirecttarget2.xhtml" itemLabel="Page 2"/>
<f:selectItem itemValue="/redirecttarget3.xhtml" itemLabel="Page 3"/>
<f:ajax/>
</h:selectOneMenu>
</h:form>
</h:body>
remove the <f:ajax/> for ICEfaces (not required), and this component still does not render markup correctly:-
WITHOUT ICEFACES the markup is:-
<form enctype="application/x-www-form-urlencoded" action="/basic-ajax/redirect.jsf" method="post" name="form" id="form">
<input type="hidden" value="form" name="form"/>
<select onchange="mojarra.ab(this,event,'valueChange',0,0)" size="1" name="form:j_idt7" id="form:j_idt7"> <option selected="selected" value="">Pick One</option>
<option value="/redirecttarget1.xhtml">Page 1</option>
<option value="/redirecttarget2.xhtml">Page 2</option>
<option value="/redirecttarget3.xhtml">Page 3</option>
</select><input type="hidden" autocomplete="off" value="-7374595938062284617:-4968993212789003275" id="javax.faces.ViewState" name="javax.faces.ViewState"/>
</form>
Adding ICEFACES-2.0 generates the following markup:-
span id="selectionRedirect">
<h1>ICEfaces Redirect</h1>
<form id="form" name="form" method="post" enctype="application/x-www-form-urlencoded" action="/navigationLinks/redirect.jsf">
<input type="hidden" value="form" name="form"/>
<select id="form:selectionRedirectId" size="1" onchange="null" name="form:selectionRedirectId">
<option one="" pick="" selected="true" value=""/>
<option 1="" page="" value="/redirecttarget1.xhtml"/>
<option 2="" page="" value="/redirecttarget2.xhtml"/>
<option 3="" page="" value="/redirecttarget3.xhtml"/>
</select>
<input id="javax.faces.ViewState" type="hidden" autocomplete="off" value="109192987162155312:-8337909413678179354" name="javax.faces.ViewState"/>
<input type="hidden" name="ice.window" value="1266425719994"/>
</form>
</span>
<script type="text/javascript">
1window.ice.window = 1266425719994;
</script>
<script type="text/javascript">
1ice.push.register(['1266425719994'], ice.retrieveUpdate);
</script>
<input id="gwProxy" type="hidden"></input>
<input id="jsProxy" type="hidden" onclick="jsCall();"/>
<div id="refHTML"/>
<h:body>
<h1>Ajax Redirect</h1>
<h:form id="form">
<h:selectOneMenu valueChangeListener="#{redirectBean.redirectPage}">
<f:selectItem itemLabel="Pick One" noSelectionOption="true" />
<f:selectItem itemValue="/redirecttarget1.xhtml" itemLabel="Page 1"/>
<f:selectItem itemValue="/redirecttarget2.xhtml" itemLabel="Page 2"/>
<f:selectItem itemValue="/redirecttarget3.xhtml" itemLabel="Page 3"/>
<f:ajax/>
</h:selectOneMenu>
</h:form>
</h:body>
remove the <f:ajax/> for ICEfaces (not required), and this component still does not render markup correctly:-
WITHOUT ICEFACES the markup is:-
<form enctype="application/x-www-form-urlencoded" action="/basic-ajax/redirect.jsf" method="post" name="form" id="form">
<input type="hidden" value="form" name="form"/>
<select onchange="mojarra.ab(this,event,'valueChange',0,0)" size="1" name="form:j_idt7" id="form:j_idt7"> <option selected="selected" value="">Pick One</option>
<option value="/redirecttarget1.xhtml">Page 1</option>
<option value="/redirecttarget2.xhtml">Page 2</option>
<option value="/redirecttarget3.xhtml">Page 3</option>
</select><input type="hidden" autocomplete="off" value="-7374595938062284617:-4968993212789003275" id="javax.faces.ViewState" name="javax.faces.ViewState"/>
</form>
Adding ICEFACES-2.0 generates the following markup:-
span id="selectionRedirect">
<h1>ICEfaces Redirect</h1>
<form id="form" name="form" method="post" enctype="application/x-www-form-urlencoded" action="/navigationLinks/redirect.jsf">
<input type="hidden" value="form" name="form"/>
<select id="form:selectionRedirectId" size="1" onchange="null" name="form:selectionRedirectId">
<option one="" pick="" selected="true" value=""/>
<option 1="" page="" value="/redirecttarget1.xhtml"/>
<option 2="" page="" value="/redirecttarget2.xhtml"/>
<option 3="" page="" value="/redirecttarget3.xhtml"/>
</select>
<input id="javax.faces.ViewState" type="hidden" autocomplete="off" value="109192987162155312:-8337909413678179354" name="javax.faces.ViewState"/>
<input type="hidden" name="ice.window" value="1266425719994"/>
</form>
</span>
<script type="text/javascript">
1window.ice.window = 1266425719994;
</script>
<script type="text/javascript">
1ice.push.register(['1266425719994'], ice.retrieveUpdate);
</script>
<input id="gwProxy" type="hidden"></input>
<input id="jsProxy" type="hidden" onclick="jsCall();"/>
<div id="refHTML"/>
Incorrect rendering is confirmed.