0

JSF tags get "compiled" into java code. How can I change the output, the java code, of a tag?

Where is the template for what gets written to the java source. Here is an example.

<f:view>

Translates to:

  //  f:view
  com.sun.faces.taglib.jsf_core.ViewTag _jspx_th_f_005fview_005f0 = (com.sun.faces.taglib.jsf_core.ViewTag) _005fjspx_005ftagPool_005ff_005fview.get(com.sun.faces.taglib.jsf_core.ViewTag.class);
  _jspx_th_f_005fview_005f0.setPageContext(_jspx_page_context);
  _jspx_th_f_005fview_005f0.setParent(null);
  int _jspx_eval_f_005fview_005f0 = _jspx_th_f_005fview_005f0.doStartTag();
  if (_jspx_eval_f_005fview_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
    if (_jspx_eval_f_005fview_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
      out = _jspx_page_context.pushBody();
      _jspx_th_f_005fview_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
      _jspx_th_f_005fview_005f0.doInitBody();
    }
    do {

So all this code seems reasonable, but I need to change it. Where is the source for this? I am assume it is in jsf-api or jsf-impl, but have not found it.

Edit: I added jsp tag. I think basic tag to java process must be related.

GC_
  • 1,673
  • 6
  • 23
  • 39
  • Basically, I gave up. For more information, see http://book.javanb.com/servlets-and-javaserver-pages-the-j2ee_technology-web-tier/0321136497_ch07lev1sec7.html. Particularly, there are Tag types. I think the type controls the output, not some custom tag code. – GC_ Jan 09 '15 at 23:56
  • [As already stated](http://stackoverflow.com/a/27863304/1391249), the source is not available on the internet. Besides that is there any mandatory requirement that still makes you use JSF 1.1 - just as a curiosity? – Tiny Jan 10 '15 at 08:55
  • @Tiny I am thinking about switching up to 1.2. However, there is a reason I am reluctant. We use custom components that were supposed to be compatible with jsf 1.1 and myfaces 1.2. I have some doubts whether they will be compatible. I have no idea whether they "were relying on specific 1.1 bug(s) being the correct behavior." (From quoted answer.) It is basically a regression issue. – GC_ Jan 10 '15 at 23:04

0 Answers0