1 19 20 package com.sslexplorer.navigation.tags; 21 22 import javax.servlet.jsp.tagext.TagSupport ; 23 24 import org.apache.commons.logging.Log; 25 import org.apache.commons.logging.LogFactory; 26 27 import com.sslexplorer.security.Constants; 28 import com.sslexplorer.wizard.AbstractWizardSequence; 29 30 public class InWizardTag extends TagSupport { 31 final static Log log = LogFactory.getLog(InWizardTag.class); 32 33 private String value; 34 private String finish = "true"; 35 36 39 public String getFinish() { 40 return finish; 41 } 42 43 46 public void setFinish(String finish) { 47 this.finish = finish; 48 } 49 50 public InWizardTag() { 51 value = "true"; 52 } 53 54 public int doStartTag() { 55 AbstractWizardSequence seq = (AbstractWizardSequence)pageContext.getSession().getAttribute(Constants.WIZARD_SEQUENCE); 56 if (seq != null && ( finish.equals("true") || seq.getCurrentPageForm().getStepIndex() != 0 ) ) { 57 return value.equalsIgnoreCase("false") ? SKIP_BODY : EVAL_BODY_INCLUDE; 58 } 59 return value.equalsIgnoreCase("false") ? EVAL_BODY_INCLUDE : SKIP_BODY; 60 } 61 62 65 public String getValue() { 66 return value; 67 } 68 69 72 public void setValue(String value) { 73 this.value = value; 74 } 75 } | Popular Tags |