Package org.apache.struts.taglib.html

Examples of org.apache.struts.taglib.html.FormTag


  public int doEndTag() throws JspException {
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    FormsSupport support = FormsSupport.getInstance(request);

    FormTag formTag = (FormTag)findAncestorWithClass(this, FormTag.class);
    if (formTag == null) {
      throw new JspException("Cannot get enclosing form tag");
    }
    String action = formTag.getAction();
     
    FormData formData = null;
    try {
      formData = support.getFormData(request, action, false);
    } catch (Exception e) {
View Full Code Here


        prepareAttribute(handlers, "onfocus", getOnfocus());
       
        if(!enable)
        {
            // Get the parent FormTag (if necessary)
            FormTag formTag = null;
            if ((doDisabled && !getDisabled()) ||
                (doReadonly && !getReadonly())) {
                formTag = (FormTag)pageContext.getAttribute(Constants.FORM_KEY,
                                                            PageContext.REQUEST_SCOPE);
            }
   
            // Format Disabled
            if (doDisabled) {
                boolean formDisabled = formTag == null ? false : formTag.isDisabled();
                if (formDisabled || getDisabled()) {
                    handlers.append(" disabled=\"disabled\"");
                }
            }
   
            // Format Read Only
            if (doReadonly) {
                boolean formReadOnly = formTag == null ? false : formTag.isReadonly();
                if (formReadOnly || getReadonly()) {
                    handlers.append(" readonly=\"readonly\"");
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.struts.taglib.html.FormTag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.