Package ariba.ui.aribaweb.util

Examples of ariba.ui.aribaweb.util.AWFastStringBuffer


        String imageUrl = imageUrl(imageInfo, filename);
        AWEncodedString width = widthString(bindingsHashtable, imageInfo);
        AWEncodedString height = heightString(bindingsHashtable, imageInfo);
        String widthString = width.string();
        String heightString = height.string();
        AWFastStringBuffer fastStringBuffer = new AWFastStringBuffer();
        fastStringBuffer.append("<img src=\"");
        fastStringBuffer.append(imageUrl);
        fastStringBuffer.append("\"");
        if (widthString != null) {
            fastStringBuffer.append(" width=\"");
            fastStringBuffer.append(widthString);
            fastStringBuffer.append("\"");
        }
        if (heightString != null) {
            fastStringBuffer.append(" height=\"");
            fastStringBuffer.append(heightString);
            fastStringBuffer.append("\"");
        }
        AWBinding borderBinding = (AWBinding)bindingsHashtable.remove(BindingNames.border);
        String borderString = (borderBinding != null) ? borderBinding.stringValue(null) : "0";
        if (borderString != null) {
            fastStringBuffer.append(" border=\"");
            fastStringBuffer.append(borderString);
            fastStringBuffer.append("\"");
        }
        // no alt binding, so specifying empty string for now
        fastStringBuffer.append(" alt=\"\"");
        AWBindingDictionary bindingsDictionary = AWBinding.bindingsDictionary(bindingsHashtable);
        appendHtmlAttributes(fastStringBuffer, bindingsDictionary);
        fastStringBuffer.append(">");
        return fastStringBuffer.toString();
    }
View Full Code Here


        return templateResource().fullUrl();
    }

    public AWFastStringBuffer componentPath (String separatorString)
    {
        AWFastStringBuffer stringBuffer = new AWFastStringBuffer();
        AWComponent currentComponent = this;
        while (currentComponent != null) {
            stringBuffer.append("        ");
            if (currentComponent.getClass() == AWComponent.ClassObject) {
                AWResource resource = currentComponent.templateResource();
                if (resource != null) {
                    stringBuffer.append(resource.fullUrl());
                }
                else {
                    stringBuffer.append(currentComponent.namePath());
                    stringBuffer.append(".awl");
                }
                AWBaseElement elem = (AWBaseElement)currentComponent.currentTemplateElement();
                if (elem != null) {
                    stringBuffer.append(":");
                    stringBuffer.append(elem.lineNumber());
                }
            }
            else {
                AWBaseElement elem = (AWBaseElement)currentComponent.currentTemplateElement();
                if (elem instanceof AWBindableElement) {
                    AWBindableElement bindable = (AWBindableElement)elem;
                    stringBuffer.append(bindable.tagName());
                }
                else {
                    // needed by toolkit / non-bindeable element based code
                    stringBuffer.append(currentComponent.toString());
                }
                if (elem != null) {
                    stringBuffer.append("(");
                    stringBuffer.append(currentComponent.fullTemplateResourceUrl().replaceAll("^file\\:/", "/"));
                    stringBuffer.append(":");
                    stringBuffer.append(elem.lineNumber());
                    stringBuffer.append(")");
                }
            }

            stringBuffer.append(separatorString);
            currentComponent = currentComponent.parent();
        }
        return stringBuffer;
    }
View Full Code Here

    /////////////
    // Debug
    /////////////
    public String toString ()
    {
        AWFastStringBuffer stringBuffer = new AWFastStringBuffer();
        stringBuffer.append("<");
        stringBuffer.append(_tagName);
        if (_bindings != null) {
            for (int index = (_bindings.size() - 1); index >= 0; index--) {
                AWBinding currentBinding = _bindings.elementAt(index);
                stringBuffer.append(" ");
                stringBuffer.append(currentBinding.toString());
            }
        }
        if (_xmlNodeChildren.length == 0) {
            stringBuffer.append("/>");
        }
        else {
            stringBuffer.append(">");
            int childCount = _xmlNodeChildren.length;
            for (int index = 0; index < childCount; index++) {
                AWXmlNode currentChild = _xmlNodeChildren[index];
                stringBuffer.append("\n    ");
                stringBuffer.append(currentChild.toString());
            }
            stringBuffer.append("</");
            stringBuffer.append(_tagName);
            stringBuffer.append(">");
        }
        return stringBuffer.toString();
    }
View Full Code Here

TOP

Related Classes of ariba.ui.aribaweb.util.AWFastStringBuffer

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.