]
henry katz commented on JBSEAM-2588:
------------------------------------
Tested on Google chrome (10.0.648.134) and IE (7.0.5730.13CO) using seam 2.2.1.Final where
it still breaks the a4j:commandbutton.
Button Works (breaks conversation - even with <begin-conversation
join="true"/> on corresponding page.xml):
<a4j:commandButton value="Invoke Backtest popup"
action="#{backTestBean.invokeBacktest}"
oncomplete="doPopup('BTresults_realpopup.seam','_target',800,800)">
<f:param name="#{conversationPropagation}"
value="join"/>
</a4j:commandButton>
Breaks button:
<a4j:commandButton value="Invoke Backtest popup"
action="#{backTestBean.invokeBacktest}"
oncomplete="doPopup('BTresults_realpopup.seam','_target',800,800)">
<s:conversationPropagation type="join"/>
</a4j:commandButton>
s:conversationPropagation breaks a4j:commandButton
--------------------------------------------------
Key: JBSEAM-2588
URL:
https://issues.jboss.org/browse/JBSEAM-2588
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.0.1.GA
Environment: Firefox OSX 10.51, JBoss AS 4.22, JAVA 1.5.0_13-b05-237
Reporter: Fijai Cairo
Assignee: Pete Muir
Fix For: 2.0.2.CR1, 2.1.0.BETA1
<a4j:commandButton styleClass="btn"
id="contactButton#{accountHolder}"
oncomplete="UIControl('contactForm', 'contact',
'identification');" reRender="contactBlock#{accountHolder},uiSec"
actionListener="#{accountOpen.submitContactInfo}" value="Continue"
>
<a4j:actionparam name="holder" value="getSuffix()"
noEscape="true"/>
<s:conversationPropagation type="join" />
</a4j:commandButton>
Renders the following: Notice that the onclick handler is rendered before the input is
rendered and causes a document.getElementById("contactButton1") has no
properties javascript error.
<div id="contactContinueSection1" style="padding: 10px 10px 10px 10px;
display: block">
<script language="JavaScript" type="text/javascript">
//<![CDATA[
document.getElementById('contactButton1').onclick = new
Function("event", "{if (document.getElementById){var form =
document.getElementById('contactForm1');var input = documen
t.createElement('input');if (document.all){ input.type =
'hidden';input.name = 'conversationPropagat
ion';input.value = 'join';}else if (document.getElementById)
{input.setAttribute('type', 'hidden');i
nput.setAttribute('name',
'conversationPropagation');input.setAttribute('value',
'join');}form.appen
dChild(input);return true;}}");
//]]>
</script>
<input id="contactButton1" name="contactButton1"
onclick="A4J.AJAX.Submit('_viewRoot','contactForm1',event,{'parameters':{'holder':getSuffix(),'conversationPr
opagation':'join','contactButton1':'contactButton1'}
,'actionUrl':'/BaisiPrototype/AE/primary.jspv?j
avax.portlet.faces.DirectLink=true','oncomplete':function(request,event,data){UIControl('contactForm
', 'contact', 'identification');}} );return false;"
value="Continue" class="btn" type="button" />
</div>
Without <s:conversationPropagation type="join" />, the onclick handler is
rendered as an attribute of the button as ff:
<div id="contactContinueSection1" style="padding: 10px 10px 10px 10px;
display: block"><input id="contactButton1"
name="contactButton1"
onclick="A4J.AJAX.Submit('_viewRoot','contactForm1',event,{'parameters':{'holder':getSuffix(),'contactButton1
':'contactButton1'}
,'actionUrl':'/BaisiPrototype/AE/primary.jspv?javax.portlet.faces.DirectLink=tru
e','oncomplete':function(request,event,data){UIControl('contactForm',
'contact', 'identification');}
} );return false;" value="Continue" class="btn"
type="button" />
--
This message is automatically generated by JIRA.
For more information on JIRA, see: