source: ether_2012/work/org/apache/jsp/tag/web/htmlCss_tag.java @ 319

Last change on this file since 319 was 319, checked in by vmipsl, 12 years ago

Import du projet Ether pour le nouveau look 2012

File size: 5.4 KB
Line 
1package org.apache.jsp.tag.web;
2
3import javax.servlet.*;
4import javax.servlet.http.*;
5import javax.servlet.jsp.*;
6
7public final class htmlCss_tag
8    extends javax.servlet.jsp.tagext.SimpleTagSupport
9    implements org.apache.jasper.runtime.JspSourceDependent {
10
11
12  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
13
14  private static java.util.List _jspx_dependants;
15
16  private JspContext jspContext;
17  private java.io.Writer _jspx_sout;
18  private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fif_0026_005ftest;
19
20  private javax.el.ExpressionFactory _el_expressionfactory;
21  private org.apache.AnnotationProcessor _jsp_annotationprocessor;
22
23  public void setJspContext(JspContext ctx) {
24    super.setJspContext(ctx);
25    java.util.ArrayList _jspx_nested = null;
26    java.util.ArrayList _jspx_at_begin = null;
27    java.util.ArrayList _jspx_at_end = null;
28    this.jspContext = new org.apache.jasper.runtime.JspContextWrapper(ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null);
29  }
30
31  public JspContext getJspContext() {
32    return this.jspContext;
33  }
34  private java.lang.String cssFile;
35
36  public java.lang.String getCssFile() {
37    return this.cssFile;
38  }
39
40  public void setCssFile(java.lang.String cssFile) {
41    this.cssFile = cssFile;
42    jspContext.setAttribute("cssFile", cssFile);
43  }
44
45  public Object getDependants() {
46    return _jspx_dependants;
47  }
48
49  private void _jspInit(ServletConfig config) {
50    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(config);
51    _el_expressionfactory = _jspxFactory.getJspApplicationContext(config.getServletContext()).getExpressionFactory();
52    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) config.getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
53  }
54
55  public void _jspDestroy() {
56    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.release();
57  }
58
59  public void doTag() throws JspException, java.io.IOException {
60    PageContext _jspx_page_context = (PageContext)jspContext;
61    HttpServletRequest request = (HttpServletRequest) _jspx_page_context.getRequest();
62    HttpServletResponse response = (HttpServletResponse) _jspx_page_context.getResponse();
63    HttpSession session = _jspx_page_context.getSession();
64    ServletContext application = _jspx_page_context.getServletContext();
65    ServletConfig config = _jspx_page_context.getServletConfig();
66    JspWriter out = jspContext.getOut();
67    _jspInit(config);
68    jspContext.getELContext().putContext(JspContext.class,jspContext);
69    if( getCssFile() != null ) 
70      _jspx_page_context.setAttribute("cssFile", getCssFile());
71
72    try {
73      out.write('\n');
74      out.write('\n');
75      out.write('\n');
76      if (_jspx_meth_c_005fif_005f0(_jspx_page_context))
77        return;
78    } catch( Throwable t ) {
79      if( t instanceof SkipPageException )
80          throw (SkipPageException) t;
81      if( t instanceof java.io.IOException )
82          throw (java.io.IOException) t;
83      if( t instanceof IllegalStateException )
84          throw (IllegalStateException) t;
85      if( t instanceof JspException )
86          throw (JspException) t;
87      throw new JspException(t);
88    } finally {
89      jspContext.getELContext().putContext(JspContext.class,super.getJspContext());
90      ((org.apache.jasper.runtime.JspContextWrapper) jspContext).syncEndTagFile();
91      _jspDestroy();
92    }
93  }
94
95  private boolean _jspx_meth_c_005fif_005f0(PageContext _jspx_page_context)
96          throws Throwable {
97    JspWriter out = _jspx_page_context.getOut();
98    //  c:if
99    org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
100    _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
101    _jspx_th_c_005fif_005f0.setParent(new javax.servlet.jsp.tagext.TagAdapter((javax.servlet.jsp.tagext.SimpleTag) this ));    // /WEB-INF/tags/htmlCss.tag(4,0) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
102    _jspx_th_c_005fif_005f0.setTest(((java.lang.Boolean) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${not empty cssFile}", java.lang.Boolean.class, (PageContext)this.getJspContext(), null, false)).booleanValue());
103    int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
104    if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
105      do {
106        out.write("\n");
107        out.write("    <link rel=\"stylesheet\" type=\"text/css\" href=\"resources/css/");
108        out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${cssFile}", java.lang.String.class, (PageContext)this.getJspContext(), null, false));
109        out.write(".css\"/>\n");
110        int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
111        if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
112          break;
113      } while (true);
114    }
115    if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
116      _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
117      throw new SkipPageException();
118    }
119    _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
120    return false;
121  }
122}
Note: See TracBrowser for help on using the repository browser.