[jbossseam-issues] [JBoss JIRA] Assigned: (JBSEAM-2588) s:conversationPropagation breaks a4j:commandButton

Pete Muir (JIRA) jira-events at lists.jboss.org
Thu Mar 13 11:47:22 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2588?page=all ]

Pete Muir reassigned JBSEAM-2588:
---------------------------------

    Assignee: Pete Muir

> s:conversationPropagation breaks a4j:commandButton
> --------------------------------------------------
>
>                 Key: JBSEAM-2588
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2588
>             Project: JBoss 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
>         Assigned To: Pete Muir
>             Fix For: 2.0.2.GA, 2.1.0.GA
>
>
> <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.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list