[jboss-user] [JBoss Seam] - Re: Unexpected rendering

Vjger do-not-reply at jboss.com
Fri Oct 5 12:11:07 EDT 2007


I must correct my previous post. Both link goes to server.

I post the jsp code translated for the two <h:commandLink> (inside and outside <h:dataTable>)
i wolud understand, before all, if it's a bad translation by Jboss or a bad submit by jsf library

These are the two commandlink methods:

This is outside datatable


  | 
  | 
  | private boolean _jspx_meth_h_005fcommandLink_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fform_005f0, PageContext _jspx_page_context)
  |           throws Throwable {
  |     PageContext pageContext = _jspx_page_context;
  |     JspWriter out = _jspx_page_context.getOut();
  |     //  h:commandLink
  |     com.sun.faces.taglib.html_basic.CommandLinkTag _jspx_th_h_005fcommandLink_005f0 = new com.sun.faces.taglib.html_basic.CommandLinkTag();
  |     org.apache.jasper.runtime.AnnotationHelper.postConstruct(_jsp_annotationprocessor, _jspx_th_h_005fcommandLink_005f0);
  |     _jspx_th_h_005fcommandLink_005f0.setPageContext(_jspx_page_context);
  |     _jspx_th_h_005fcommandLink_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fform_005f0);
  |     // /jsp/content/test/testLista.jsp(23,3) name = action type = javax.el.MethodExpression reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = true methodSignature = java.lang.Object action()
  |     _jspx_th_h_005fcommandLink_005f0.setAction(new org.apache.jasper.el.JspMethodExpression("/jsp/content/test/testLista.jsp(23,3) '#{tipologicaStandardForm.modifyingPage}'",_el_expressionfactory.createMethodExpression(_jspx_page_context.getELContext(),"#{tipologicaStandardForm.modyfingPage}",java.lang.Object.class,new Class[] {})));
  |     // /jsp/content/test/testLista.jsp(23,3) name = value type = javax.el.ValueExpression reqTime = false required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
  |     _jspx_th_h_005fcommandLink_005f0.setValue(new org.apache.jasper.el.JspValueExpression("/jsp/content/test/testLista.jsp(23,3) 'Fuori dalla tabella'",_el_expressionfactory.createValueExpression("Outside dataTable",java.lang.Object.class)));
  |     _jspx_th_h_005fcommandLink_005f0.setJspId("jsp_37219136_2");
  |     int _jspx_eval_h_005fcommandLink_005f0 = _jspx_th_h_005fcommandLink_005f0.doStartTag();
  |     if (_jspx_eval_h_005fcommandLink_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
  |       if (_jspx_eval_h_005fcommandLink_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
  |         out = _jspx_page_context.pushBody();
  |         _jspx_th_h_005fcommandLink_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
  |         _jspx_th_h_005fcommandLink_005f0.doInitBody();
  |       }
  |       do {
  |         out.write("\r\n");
  |         out.write("\r\n");
  |         out.write("\t\t\t");
  |         int evalDoAfterBody = _jspx_th_h_005fcommandLink_005f0.doAfterBody();
  |         if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
  |           break;
  |       } while (true);
  |       if (_jspx_eval_h_005fcommandLink_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
  |         out = _jspx_page_context.popBody();
  |       }
  |     }
  |     if (_jspx_th_h_005fcommandLink_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
  |       _jspx_th_h_005fcommandLink_005f0.release();
  |       org.apache.jasper.runtime.AnnotationHelper.preDestroy(_jsp_annotationprocessor, _jspx_th_h_005fcommandLink_005f0);
  |       return true;
  |     }
  |     _005fjspx_005ftagPool_005fh_005fcommandLink_005fvalue_005faction.reuse(_jspx_th_h_005fcommandLink_005f0);
  |     return false;
  |   }
  | 
  | 
  | 


This is inside datatable


  | 
  | private boolean _jspx_meth_h_005fcommandLink_005f1(javax.servlet.jsp.tagext.JspTag _jspx_th_h_005fcolumn_005f0, PageContext _jspx_page_context)
  |           throws Throwable {
  |     PageContext pageContext = _jspx_page_context;
  |     JspWriter out = _jspx_page_context.getOut();
  |     //  h:commandLink
  |     com.sun.faces.taglib.html_basic.CommandLinkTag _jspx_th_h_005fcommandLink_005f1 = new com.sun.faces.taglib.html_basic.CommandLinkTag();
  |     org.apache.jasper.runtime.AnnotationHelper.postConstruct(_jsp_annotationprocessor, _jspx_th_h_005fcommandLink_005f1);
  |     _jspx_th_h_005fcommandLink_005f1.setPageContext(_jspx_page_context);
  |     _jspx_th_h_005fcommandLink_005f1.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_h_005fcolumn_005f0);
  |     // /jsp/content/test/testLista.jsp(45,3) name = action type = javax.el.MethodExpression reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = true methodSignature = java.lang.Object action()
  |     _jspx_th_h_005fcommandLink_005f1.setAction(new org.apache.jasper.el.JspMethodExpression("/jsp/content/test/testLista.jsp(45,3) '#{tipologicaStandardForm.modifyingPage}'",_el_expressionfactory.createMethodExpression(_jspx_page_context.getELContext(),"#{tipologicaStandardForm.modifyingPage}",java.lang.Object.class,new Class[] {})));
  |     // /jsp/content/test/testLista.jsp(45,3) name = value type = javax.el.ValueExpression reqTime = false required = false fragment = false deferredValue = true expectedTypeName = java.lang.Object deferredMethod = false methodSignature = null
  |     _jspx_th_h_005fcommandLink_005f1.setValue(new org.apache.jasper.el.JspValueExpression("/jsp/content/test/testLista.jsp(45,3) '#{tipologicaStandard.codice}'",_el_expressionfactory.createValueExpression(_jspx_page_context.getELContext(),"#{tipologicaStandard.codice}",java.lang.Object.class)));
  |     _jspx_th_h_005fcommandLink_005f1.setJspId("jsp_37219136_5");
  |     int _jspx_eval_h_005fcommandLink_005f1 = _jspx_th_h_005fcommandLink_005f1.doStartTag();
  |     if (_jspx_eval_h_005fcommandLink_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
  |       if (_jspx_eval_h_005fcommandLink_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
  |         out = _jspx_page_context.pushBody();
  |         _jspx_th_h_005fcommandLink_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
  |         _jspx_th_h_005fcommandLink_005f1.doInitBody();
  |       }
  |       do {
  |         out.write("\r\n");
  |         out.write("\r\n");
  |         out.write("\t\t\t");
  |         int evalDoAfterBody = _jspx_th_h_005fcommandLink_005f1.doAfterBody();
  |         if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
  |           break;
  |       } while (true);
  |       if (_jspx_eval_h_005fcommandLink_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
  |         out = _jspx_page_context.popBody();
  |       }
  |     }
  |     if (_jspx_th_h_005fcommandLink_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
  |       _jspx_th_h_005fcommandLink_005f1.release();
  |       org.apache.jasper.runtime.AnnotationHelper.preDestroy(_jsp_annotationprocessor, _jspx_th_h_005fcommandLink_005f1);
  |       return true;
  |     }
  |     _005fjspx_005ftagPool_005fh_005fcommandLink_005fvalue_005faction.reuse(_jspx_th_h_005fcommandLink_005f1);
  |     return false;
  |   }
  | }
  |  
  | 

Finally, this is the generated html



  | 
  | <html xmlns="http://www.w3.org/1999/xhtml">
  | <head>
  | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  | <title>Insert title here</title>
  |  
  | </head>
  |  
  |  
  | <body>
  | 	
  | 	
  | <form id="j_id_jsp_37219136_1" name="j_id_jsp_37219136_1" method="post" action="/croute/faces/jsp/content/test/testLista.jsp" enctype="application/x-www-form-urlencoded">
  | <input type="hidden" name="j_id_jsp_37219136_1" value="j_id_jsp_37219136_1" />
  |  
  | <script type="text/javascript" language="Javascript">
  | function dpf(f) {
  | var adp = f.adp;
  | if (adp != null) {for (var i = 0;i < adp.length;i++) {f.removeChild(adp);}}};function apf(f, pvp) {var adp = new Array();f.adp = adp;var ps = pvp.split(',');for (var i = 0,ii = 0;i < ps.length;i++,ii++) {var p = document.createElement("input");p.type = "hidden";p.name = ps;p.value = ps[i + 1];f.appendChild(p);adp[ii] = p;i += 1;}};function jsfcljs(f, pvp, t) {apf(f, pvp);if (t) {f.target = t;}f.submit();dpf(f);};</script>
  | <a href="#" onclick="if(typeof jsfcljs == 'function'){jsfcljs(document.forms['j_id_jsp_37219136_1'],'j_id_jsp_37219136_1:j_id_jsp_37219136_2,j_id_jsp_37219136_1:j_id_jsp_37219136_2','');}return false">Outside table</a><table>
  | <tbody>
  | <tr>
  | <td><a href="#" onclick="if(typeof jsfcljs == 'function'){jsfcljs(document.forms['j_id_jsp_37219136_1'],'j_id_jsp_37219136_1:j_id_jsp_37219136_3:0:j_id_jsp_37219136_5,j_id_jsp_37219136_1:j_id_jsp_37219136_3:0:j_id_jsp_37219136_5','');}return false">cod1</a></td>
  | </tr>
  | </tbody>
  | </table>
  | <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1:j_id3" />
  |  
  | </form>
  |  
  |  
  |  
  | </body>
  | </html>
  | 
  | 

As you can see, the only difference is:

jsfcljs(document.forms['X_1'],'X_1:X_2,X_1:X_2','')

jsfcljs(document.forms['X_1'],X_1:X_3:0:X_5,X_1:X_3:0:X_5','');

where X=j_id_jsp_37219136

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

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



More information about the jboss-user mailing list