public void doTag(TagPluginContext ctxt) { String condV = ctxt.getTemporaryVariableName(); ctxt.generateJavaSource("boolean " + condV + "="); ctxt.generateAttribute("test"); ctxt.generateJavaSource(";"); if (ctxt.isAttributeSpecified("var")) { String scope = "PageContext.PAGE_SCOPE"; if (ctxt.isAttributeSpecified("scope")) { String scopeStr = ctxt.getConstantAttribute("scope"); if ("request".equals(scopeStr)) { scope = "PageContext.REQUEST_SCOPE"; } else if ("session".equals(scopeStr)) { scope = "PageContext.SESSION_SCOPE"; } else if ("application".equals(scopeStr)) { scope = "PageContext.APPLICATION_SCOPE"; } } ctxt.generateJavaSource("_jspx_page_context.setAttribute("); ctxt.generateAttribute("var"); ctxt.generateJavaSource(", new Boolean(" + condV + ")," + scope + ");"); } ctxt.generateJavaSource("if (" + condV + "){"); ctxt.generateBody(); ctxt.generateJavaSource("}"); } }
public void doTag(TagPluginContext ctxt) { String condV = ctxt.getTemporaryVariableName(); ctxt.generateJavaSource("boolean " + condV + "="); ctxt.generateAttribute("test"); ctxt.generateJavaSource(";"); if (ctxt.isAttributeSpecified("var")) { String scope = "PageContext.PAGE_SCOPE"; if (ctxt.isAttributeSpecified("scope")) { String scopeStr = ctxt.getConstantAttribute("scope"); if ("request".equals(scopeStr)) { scope = "PageContext.REQUEST_SCOPE"; } else if ("session".equals(scopeStr)) { scope = "PageContext.SESSION_SCOPE"; } else if ("application".equals(scopeStr)) { scope = "PageContext.APPLICATION_SCOPE"; } } ctxt.generateJavaSource("_jspx_page_context.setAttribute("); ctxt.generateAttribute("var"); ctxt.generateJavaSource(", new Boolean(" + condV + ")," + scope + ");"); } ctxt.generateJavaSource("if (" + condV + "){"); ctxt.generateBody(); ctxt.generateJavaSource("}"); } }
public void doTag(TagPluginContext ctxt) { String condV = ctxt.getTemporaryVariableName(); ctxt.generateJavaSource("boolean " + condV + "="); ctxt.generateAttribute("test"); ctxt.generateJavaSource(";"); if (ctxt.isAttributeSpecified("var")) { String scope = "PageContext.PAGE_SCOPE"; if (ctxt.isAttributeSpecified("scope")) { String scopeStr = ctxt.getConstantAttribute("scope"); if ("request".equals(scopeStr)) { scope = "PageContext.REQUEST_SCOPE"; } else if ("session".equals(scopeStr)) { scope = "PageContext.SESSION_SCOPE"; } else if ("application".equals(scopeStr)) { scope = "PageContext.APPLICATION_SCOPE"; } } ctxt.generateJavaSource("_jspx_page_context.setAttribute("); ctxt.generateAttribute("var"); ctxt.generateJavaSource(", new Boolean(" + condV + ")," + scope + ");"); } ctxt.generateJavaSource("if (" + condV + "){"); ctxt.generateBody(); ctxt.generateJavaSource("}"); } }
@Override public void doTag(TagPluginContext ctxt) { String condV = ctxt.getTemporaryVariableName(); ctxt.generateJavaSource("boolean " + condV + "="); ctxt.generateAttribute("test"); ctxt.generateJavaSource(";"); if (ctxt.isAttributeSpecified("var")) { String scope = "PageContext.PAGE_SCOPE"; if (ctxt.isAttributeSpecified("scope")) { String scopeStr = ctxt.getConstantAttribute("scope"); if ("request".equals(scopeStr)) { scope = "PageContext.REQUEST_SCOPE"; } else if ("session".equals(scopeStr)) { scope = "PageContext.SESSION_SCOPE"; } else if ("application".equals(scopeStr)) { scope = "PageContext.APPLICATION_SCOPE"; } } ctxt.generateJavaSource("_jspx_page_context.setAttribute("); ctxt.generateAttribute("var"); ctxt.generateJavaSource(", new Boolean(" + condV + ")," + scope + ");"); } ctxt.generateJavaSource("if (" + condV + "){"); ctxt.generateBody(); ctxt.generateJavaSource("}"); } }
public void doTag(TagPluginContext ctxt) { String condV = ctxt.getTemporaryVariableName(); ctxt.generateJavaSource("boolean " + condV + "="); ctxt.generateAttribute("test"); ctxt.generateJavaSource(";"); if (ctxt.isAttributeSpecified("var")) { String scope = "PageContext.PAGE_SCOPE"; if (ctxt.isAttributeSpecified("scope")) { String scopeStr = ctxt.getConstantAttribute("scope"); if ("request".equals(scopeStr)) { scope = "PageContext.REQUEST_SCOPE"; } else if ("session".equals(scopeStr)) { scope = "PageContext.SESSION_SCOPE"; } else if ("application".equals(scopeStr)) { scope = "PageContext.APPLICATION_SCOPE"; } } ctxt.generateJavaSource("_jspx_page_context.setAttribute("); ctxt.generateAttribute("var"); ctxt.generateJavaSource(", new Boolean(" + condV + ")," + scope + ");"); } ctxt.generateJavaSource("if (" + condV + "){"); ctxt.generateBody(); ctxt.generateJavaSource("}"); } }
public void doTag(TagPluginContext ctxt) { String condV = ctxt.getTemporaryVariableName(); ctxt.generateJavaSource("boolean " + condV + "="); ctxt.generateAttribute("test"); ctxt.generateJavaSource(";"); if (ctxt.isAttributeSpecified("var")) { String scope = "PageContext.PAGE_SCOPE"; if (ctxt.isAttributeSpecified("scope")) { String scopeStr = ctxt.getConstantAttribute("scope"); if ("request".equals(scopeStr)) { scope = "PageContext.REQUEST_SCOPE"; } else if ("session".equals(scopeStr)) { scope = "PageContext.SESSION_SCOPE"; } else if ("application".equals(scopeStr)) { scope = "PageContext.APPLICATION_SCOPE"; } } ctxt.generateJavaSource("_jspx_page_context.setAttribute("); ctxt.generateAttribute("var"); ctxt.generateJavaSource(", new Boolean(" + condV + ")," + scope + ");"); } ctxt.generateJavaSource("if (" + condV + "){"); ctxt.generateBody(); ctxt.generateJavaSource("}"); } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
@Override public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
@Override public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
@Override public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
@Override public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
@Override public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }
public void doTag(TagPluginContext ctxt) { // Get the parent context to determine if this is the first <c:when> TagPluginContext parentContext = ctxt.getParentContext(); if (parentContext == null) { ctxt.dontUseTagPlugin(); return; } if ("true".equals(parentContext.getPluginAttribute("hasBeenHere"))) { ctxt.generateJavaSource("} else if("); // See comment below for the reason we generate the extra "}" here. } else { ctxt.generateJavaSource("if("); parentContext.setPluginAttribute("hasBeenHere", "true"); } ctxt.generateAttribute("test"); ctxt.generateJavaSource("){"); ctxt.generateBody(); // We don't generate the closing "}" for the "if" here because there // may be whitespaces in between <c:when>'s. Instead we delay // generating it until the next <c:when> or <c:otherwise> or // <c:choose> } }