[jboss-user] [JBoss Seam] - <s:conversationPropagation type=

joeyxxx do-not-reply at jboss.com
Tue Feb 5 17:22:04 EST 2008


This code worked prior to Seam 2.0.1GA. I've tested various combinations of seam and richfaces versions and 2.0.1 seems to be the culprit.
With <s:conversationPropagation type="join" />:

  | <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 = document.createElement('input');if (document.all){ input.type = 'hidden';input.name = 'conversationPropagation';input.value = 'join';}else if (document.getElementById) {input.setAttribute('type', 'hidden');input.setAttribute('name', 'conversationPropagation');input.setAttribute('value', 'join');}form.appendChild(input);return true;}}");
  | //]]>
  | </script>
  | 
  | <input id="contactButton1" name="contactButton1" onclick="A4J.AJAX.Submit('_viewRoot','contactForm1',event,{'parameters':{'holder':getSuffix(),'conversationPropagation':'join','contactButton1':'contactButton1'} ,'actionUrl':'/BaisiPrototype/AE/primary.jspv?javax.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=true','oncomplete':function(request,event,data){UIControl('contactForm', 'contact', 'identification');}} );return false;" value="Continue" class="btn" type="button" />
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126787#4126787

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126787



More information about the jboss-user mailing list