001 package railo.runtime.tag; 002 003 import railo.runtime.exp.PageException; 004 import railo.runtime.ext.tag.BodyTagImpl; 005 import railo.runtime.op.Caster; 006 007 public final class Setting extends BodyTagImpl { 008 009 private boolean hasBody; 010 011 /** set the value requesttimeout 012 * @param requesttimeout value to set 013 **/ 014 public void setRequesttimeout(double requesttimeout) { 015 pageContext.setRequestTimeout((long)(requesttimeout*1000)); 016 } 017 018 /** set the value showdebugoutput 019 * Yes or No. When set to No, showDebugOutput suppresses debugging information that would 020 * otherwise display at the end of the generated page.Default is Yes. 021 * @param showdebugoutput value to set 022 **/ 023 public void setShowdebugoutput(boolean showdebugoutput) { 024 pageContext.getDebugger().setOutput(showdebugoutput); 025 } 026 027 /** set the value enablecfoutputonly 028 * Yes or No. When set to Yes, cfsetting blocks output of HTML that resides outside cfoutput tags. 029 * @param enablecfoutputonly value to set 030 * @throws PageException 031 **/ 032 public void setEnablecfoutputonly(Object enablecfoutputonly) throws PageException { 033 if(enablecfoutputonly instanceof String && 034 Caster.toString(enablecfoutputonly).trim().equalsIgnoreCase("reset")) { 035 pageContext.setCFOutputOnly((short)0); 036 } 037 else { 038 pageContext.setCFOutputOnly(Caster.toBooleanValue(enablecfoutputonly)); 039 } 040 } 041 042 /** 043 * @deprecated this method is replaced by the method <code>setEnablecfoutputonly(Object enablecfoutputonly)</code> 044 * @param enablecfoutputonly 045 */ 046 public void setEnablecfoutputonly(boolean enablecfoutputonly) { 047 pageContext.setCFOutputOnly(enablecfoutputonly); 048 } 049 050 @Override 051 public int doStartTag() { 052 return EVAL_BODY_INCLUDE; 053 } 054 055 @Override 056 public int doEndTag() { 057 return EVAL_PAGE; 058 } 059 060 /** 061 * sets if tag has a body or not 062 * @param hasBody 063 */ 064 public void hasBody(boolean hasBody) { 065 this.hasBody=hasBody; 066 } 067 068 }