Title / Description
Code protected String src() throws JspException { // 1 : deal with src if (this.srcName != null) { if (this.srcKey != null || this.page != null || this.pageKey !=null) { // we can not have src and srcKey simultaneously throw new JspException("ImgTag >> One of this is (srcName,srcKey,page,pageKey,action) permit not all simultaneously"); } // Get skin image directory. Skin lc_skin = LayoutUtils.getSkin(pageContext.getSession()); String lc_imgSrc = lc_skin.getImageDirectory(pageContext.getRequest()); // Generate image URL code. StringBuffer lc_buffer = new StringBuffer(lc_imgSrc); if (!lc_imgSrc.endsWith("/") && !srcName.startsWith("/")) { lc_buffer.append('/'); } lc_buffer.append(srcName); return lc_buffer.toString(); } // 2 : deal with srcKey if (this.srcKey != null) { if (this.srcName != null || this.page != null || this.pageKey !=null) { // we can not have src and srcKey simultaneously throw new JspException("ImgTag >> One of this is (srcName,srcKey,page,pageKey,action) permit not all simultaneously"); } return TagUtils.message(pageContext, getBundle(), getLocale(), this.srcKey); } // 3 : page }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code