Examples of HtmlTagDictionary


Examples of org.apache.empire.struts2.html.HtmlTagDictionary

    public int doStartTag()
        throws JspException
    {
        // super.doStartTag();
        // Write the float clear statement
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        String clear = dic.FloatClear();
        if (clear!=null)
        {   // Print the clear statement
            try {
                pageContext.getOut().print(clear);
            } catch (Exception e) {
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

        if (controlType==null)
            controlType = getControlType();
        // Default Class
        if (cssClass==null)
        {
            HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
            cssClass = dic.InputDefaultClass(controlType, isReadOnly());            
        }
        // Create
        InputControl control = InputControlManager.getControl(controlType);
        if (control == null)
            control = InputControlManager.getControl("text");
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

        {   // No Errors, nothing to render
            return;
        }
       
        // Render error list
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlTag list = w.startTag(dic.ErrorListTag());
        addStandardAttributes(list, dic.ErrorListClass());
        list.beginBody();
   
        // Are there field errors to render?
        if (hasFieldErrors)
        {   // Render all field errors
            Collection<ErrorInfo> errors = fieldErrors.values();
            String fieldErrClass = str(fieldErrorClass, dic.ErrorItemEntryClass());
            for (ErrorInfo e : errors)
            {
                String msg = provider.getLocalizedErrorMessage(e);
                renderError(w, fieldErrClass, msg);
            }
        }
       
        // Render last action error
        if (hasActionError)
        {   // Render action error
            String actionErrClass = str(actionErrorClass, dic.ErrorActionEntryClass());
            String msg = provider.getLocalizedErrorMessage(lastActionError);
            renderError(w, actionErrClass, msg);
        }

        // done
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

        list.endTag();
    }

    private void renderError(HtmlWriter w, String cssClassName, String msg)
    {
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlTag tag = w.startTag(dic.ErrorEntryTag());
        // Check whether additional wrapper is desired
        String wrapTag = dic.ErrorEntryWrapperTag();
        if (wrapTag!=null && wrapTag.length()>0)
        {   tag.beginBody();
            // Item wrapper tag
            HtmlTag wrap = w.startTag(wrapTag);
            wrap.addAttribute("class", cssClassName);
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

    @Override
    public int doStartTag() throws JspException
    {
        TableHeadRowTag.HeadRowInfo hri = getHeadRowInfo();
        // HtmlWriter
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        orderIndicator = getSortOrderIdicator(hri, dic);
        // Start Tag
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag wrap = w.startTag(dic.TableHeadColumnTag());
        wrap.addAttribute("id", getId());
        wrap.addAttribute("class", getCssClass(hri));
        setStyleAndWrap(wrap, hri);
        wrap.addAttribute("width", width);
        wrap.addAttribute("height", height);
        wrap.addAttribute("colspan", colspan);
        wrap.addAttribute("rowspan", rowspan);
        wrap.addAttribute("align", str(align, hri.columnAlign));
        wrap.addAttribute("valign", valign);
        wrap.addAttribute("bgcolor", bgcolor);
        // Body
        wrap.beginBody();
        if (prepareLinkParams(hri))
        {   // The Anchor
            this.cssClass = getLinkClass(hri, dic);
            this.cssStyle = null;
            // OnClick
            if (onclick== null)
                onclick = dic.TableHeadLinkDefaultOnClickScript();
            // render column choices
            if (select!=null)
            {
               renderColumnSelect(w);
               text = "";
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

   
    @Override
    public int doEndTag() throws JspException
    {
        // done
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag wrap = w.continueTag(dic.TableHeadColumnTag(), true);
        wrap.endTag();
        // done
        resetParams();
        return EVAL_PAGE;
    }
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

    @SuppressWarnings("unchecked")
    @Override
    public int doStartTag() throws JspException
    {
        // Tabel cell tag
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag menu = w.startTag(dic.MenuTag());
        addStandardAttributes(menu, null);
        menu.beginBody(true);
        // Create Menu Item Info
        MenuInfo mi = new MenuInfo();
        // Get Stack
        Stack<MenuInfo> stack = (Stack<MenuInfo>)pageContext.getAttribute(MENU_STACK_ATTRIBUTE);
        if (stack!=null)
        {   // Nested Menu's
            MenuInfo parent = stack.peek();
            mi.currentId = getString( currentItem, parent.currentId );
            mi.currentClass = getString (currentClass, parent.currentClass);
            mi.enabledClass = getString (enabledClass, parent.enabledClass);
            mi.disabledClass = getString (disabledClass, parent.disabledClass);
            mi.expandedClass = getString (expandedClass, parent.expandedClass);
            mi.actionItem = getString (actionItem, parent.actionItem);
        }
        else
        {   // A new Menu
            stack = new Stack<MenuInfo>();
            pageContext.setAttribute(MENU_STACK_ATTRIBUTE, stack);
            // Init Menu Info
            mi.currentId = getString( currentItem, null );
            mi.currentClass = getString (currentClass, dic.MenuItemCurrentClass());
            mi.enabledClass = getString (enabledClass, dic.MenuItemLinkClass());
            mi.disabledClass = getString (disabledClass, dic.MenuItemDisabledClass());
            mi.expandedClass = getString (expandedClass, dic.MenuItemExpandedClass());
            mi.actionItem = getString (actionItem, null);
        }
        // Add to Stack
        stack.push(mi);
        // boolean usesBody = true;
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

            stack.pop();
            if (stack.isEmpty())
                pageContext.removeAttribute(MENU_STACK_ATTRIBUTE);
        }
        // Write End Tag
        HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
        HtmlWriter w = new HtmlWriter(pageContext.getOut());
        HtmlTag menu = w.continueTag (dic.MenuTag(), true);
        menu.endTag();
        // done
        resetParams();
        return EVAL_PAGE;
    }
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

    public void renderText(HtmlWriter writer, ValueInfo vi)
    {
        if (vi instanceof ControlInfo)
        {   // Wrap read only in a div if it's a control
            ControlInfo ci = ((ControlInfo)vi);
            HtmlTagDictionary dic = HtmlTagDictionary.getInstance();
            HtmlTag div = writer.startTag(dic.InputReadOnlyDataWrapperTag());
            div.addAttribute("id",    ci.getId());
            div.addAttribute("class", ci.getCssClass());
            div.addAttribute("style", ci.getCssStyle());
            div.beginBody();
            internalRenderText(writer, vi);
View Full Code Here

Examples of org.apache.empire.struts2.html.HtmlTagDictionary

        if (renderWrapperTag())
        {   // Write Form Wrapper Tag
            if (useBean())
                setId(null); // Id has already be used for componentBean
            // Render Tag
            HtmlTagDictionary dic = HtmlTagDictionary.getInstance()
            HtmlWriter w = new HtmlWriter(pageContext.getOut());
            HtmlTag wrapTag  = w.startTag( dic.FormPartWrapperTag());
            addStandardAttributes(wrapTag, dic.FormPartWrapperClass());
            wrapTag.addAttributes(dic.FormPartWrapperAttributes());
            wrapTag.beginBody(true);
        }
        // do Start
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.