1 package org.jahia.deprecated.taglibs.field.file; 2 3 import javax.servlet.ServletRequest ; 4 import javax.servlet.jsp.JspException ; 5 6 import org.jahia.data.JahiaData; 7 import org.jahia.gui.GuiBean; 8 9 10 16 public class FileTitleTag extends FileFieldAbstract { 17 18 private int maxchar = 0; 19 20 public void setMaxchar(int maxchar) { 21 this.maxchar = maxchar; 22 } 23 24 public String getField() { 25 26 ServletRequest request = pageContext.getRequest(); 27 JahiaData jData = (JahiaData) request.getAttribute("org.jahia.data.JahiaData"); 28 if (this.maxchar == 0) { 29 return theFile.getFileFieldTitle(); 30 } else { 31 return GuiBean.glueTitle(theFile.getFileFieldTitle(), this.maxchar); 32 } 33 } 34 35 public int doEndTag() throws JspException { 36 super.doEndTag(); 39 maxchar = 0; 40 return EVAL_PAGE; 41 } 42 43 } 44 45 | Popular Tags |