Package ariba.ui.aribaweb.core

Examples of ariba.ui.aribaweb.core.AWElement


    public static AWAction[] initActionList (AWComponentReference componentReference)
    {
        AWAction[] actionList = (AWAction[])componentReference.userData();
        if (actionList == null) {
            AWElement contentElement = componentReference.contentElement();
            if (contentElement instanceof AWTemplate) {
                AWTemplate contentTemplate = (AWTemplate)contentElement;
                actionList = (AWAction[])contentTemplate.extractElementsOfClass(AWAction.class);
                componentReference.setUserData(actionList);
                AWConcreteTemplate newTemplate = new AWConcreteTemplate();
                newTemplate.init();
                AWElement[] elementArray = contentTemplate.elementArray();
                int elementArrayLength = elementArray.length;
                for (int index = 0; index < elementArrayLength; index++) {
                    AWElement currentElement = elementArray[index];
                    if (currentElement instanceof AWAction) {
                        break;
                    }
                    newTemplate.add(currentElement);
                }
View Full Code Here


        StaticImageNames = (String[])AWUtil.addElement(StaticImageNames, imageName);
    }

    public AWElement determineInstance (String elementName, Map bindingsHashtable, String templateName, int lineNumber)
    {
        AWElement imageElement = null;
        boolean isStaticImageName = false;
        AWBinding filenameBinding = (AWBinding)bindingsHashtable.get(BindingNames.filename);
        if ((filenameBinding != null) && (filenameBinding.isConstantValue())) {
            String filename = filenameBinding.stringValue(null);
            if (AWUtil.contains(StaticImageNames, filename)) {
View Full Code Here

    public static AWElement elementOfClass (AWTemplate template, Class target)
    {
        AWElement[] elements = template.elementArray();
        int elementCount = elements.length;
        for (int index = 0; index < elementCount; index++) {
            AWElement element = elements[index];
            if (classInheritsFromClass(element.getClass(), target)) {
                return element;
            }
        }
        return null;
    }
View Full Code Here

        This guarantees that the contentElement is always an AWTemplate.
    */
    public AWTemplate subtemplate ()
    {
        AWTemplate template = null;
        AWElement contentElement = contentElement();
        if (contentElement != null) {
            if (contentElement instanceof AWTemplate) {
                template = (AWTemplate)contentElement;
            }
            else {
View Full Code Here

        // swallow our content
    }

    public String scriptString ()
    {
        AWElement content = contentElement();
        if (content instanceof AWBareString) {
            return ((AWBareString)content).string();
        }
        throw new AWGenericException("AWXGroovyTag with content that is not a BareString!");
    }
View Full Code Here

     * <code>initializeColumn()</code>
     * @aribaapi private
     */
    private void initializeElementArray ()
    {
        AWElement contentElement = componentReference().contentElement();
        if (contentElement != null) {
            if (contentElement instanceof AWTemplate) {
                AWTemplate elementsTemplate = (AWTemplate)contentElement;
                AWCycleable[] elementArray = elementsTemplate.elementArray();
                int elementCount = elementArray.length;
                for (int index = 0; index < elementCount; index++) {
                    AWElement currentElement = (AWElement)elementArray[index];
                    if ((currentElement != null) && (currentElement instanceof Column)) {
                        ((Column)currentElement).initializeColumn(this);
                    }
                }
            }
View Full Code Here

        return null// we don't actually serve as a column
    }

    public void initializeColumn (AWTDataTable table)
    {
        AWElement content = contentElement();
        Assert.that((content instanceof AWBareString), "Content of AWTCSVData must be a simple string (no embedded tags)");
        String csvString = ((AWBareString)content).string();
        csvString = csvString.trim()// trim leading and trailing whitespace
        table.setDataSource(AWTCSVDataSource.dataSourceForCSVString(csvString));
    }
View Full Code Here

        // nothing (don't emit our body!)
    }

    public String contentString ()
    {
        AWElement content = contentElement();
        Assert.that(content instanceof AWBareString, "MetaRules content must be simple string");
        return ((AWBareString)content).string();
    }
View Full Code Here

        if (contentElement() instanceof AWTemplate) {
            AWTemplate template = (AWTemplate)contentElement();

            AWElement[] elements = template.elementArray();
            for (int i=0; i < elements.length; i++) {
                AWElement currElement = elements[i];
                if (currElement instanceof MetaRules) {
                    ((MetaRules)currElement).initWithContext(context, component);
                    hasOne = true;
                }
            }
View Full Code Here

    public static AWComponent componentWithTemplateNamed (String templateName,
                                                          AWComponent component)
    {
        AWComponent context = component;
        for (; context != null; context = context.parent()) {
            AWElement contentElement = context.componentReference().contentElement();
            if (contentElement instanceof AWTemplate) {
                AWTemplate template = (AWTemplate)contentElement;
                if (template.indexOfNamedSubtemplate(templateName, component) != -1) {
                    return context;
                }
View Full Code Here

TOP

Related Classes of ariba.ui.aribaweb.core.AWElement

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.