Example usage for javax.servlet.jsp JspContext removeAttribute

List of usage examples for javax.servlet.jsp JspContext removeAttribute

Introduction

In this page you can find the example usage for javax.servlet.jsp JspContext removeAttribute.

Prototype


abstract public void removeAttribute(String name);

Source Link

Document

Remove the object reference associated with the given name from all scopes.

Usage

From source file:org.lightadmin.core.view.tags.form.EditControlDispatcherTag.java

private void doWithStandardControl() throws JspException, IOException {
    JspContext context = getJspContext();
    JspFragment worker;/*from w w  w.j  a va 2 s . c om*/
    switch (PersistentPropertyType.forPersistentProperty(persistentProperty)) {
    case ASSOC_MULTI:
        worker = n2manyEditControl;
        break;
    case ASSOC:
        worker = n2oneEditControl;
        break;
    case EMBEDDED:
        worker = simpleEditControl;
        break;
    case MAP:
        worker = mapEditControl;
        break;
    case BOOL:
        worker = booleanEditControl;
        break;
    case DATE:
        worker = dateEditControl;
        break;
    case TIME:
        worker = timeEditControl;
        break;
    case DATE_TIME:
        worker = dateTimeEditControl;
        break;
    case NUMBER_INTEGER:
        worker = numberEditControl;
        break;
    case NUMBER_FLOAT:
        worker = numberEditControl;
        break;
    case STRING:
        worker = simpleEditControl;
        break;
    case FILE:
        worker = fileEditControl;
        break;
    default:
        worker = simpleEditControl;
        break;
    }
    try {
        worker.invoke(null);
    } finally {
        context.removeAttribute(DISABLED);
    }
}