Examples of AWEncodedString


Examples of ariba.ui.aribaweb.util.AWEncodedString

    protected boolean _idMatches (AWElementIdPath elementId, AWEncodedString nameString, AWComponent component)
    {
        AWBinding idBinding = (_unrecognizedBindingsDictionary != null)
                                ? _unrecognizedBindingsDictionary.get("id") : null;
        AWEncodedString target = elementId.elementId();

        if (nameString != null && nameString.equals(target)) return true;
        // AWBinding idBinding = _unrecognizedBindingsDictionary.get("id");
        return (idBinding != null
                && ((nameString = idBinding.encodedStringValue(component)) != null)
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

    public AWResponseGenerating invokeAction(AWRequestContext requestContext, AWComponent component)
    {
        AWResponseGenerating actionResults = null;
        AWElementIdPath elementIdPath = _hasFormValues ? requestContext.nextElementIdPath() : null;
        AWEncodedString nameString = initNameString(requestContext, component, elementIdPath);

        // Check if this is a pathDebugRequest.  If so, we bail on a match on our name or id
        if (requestContext.isPathDebugRequest() && _idMatches(requestContext.requestSenderIdPath(), nameString, component))
            return requestContext.pageComponent();

        if (_invokeAction != null) {
            boolean isSender = false;
            if (_isSender != null) {
                isSender = _isSender.booleanValue(component);
            }
            else if (nameString != null) {
                String requestSenderId = requestContext.requestSenderId();
                isSender = nameString.equals(requestSenderId);
            }
            if (isSender) {
                AWPage page =  component.page();
                if (page.hasFormValueManager()) {
                    page.formValueManager().processAllQueues();
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

        return actionResults;
    }

    public AWEncodedString tagNameInComponent (AWComponent component)
    {
        AWEncodedString tagName = null;
        boolean emitTags;

        if (_omitOrEmitTags == null) {
            emitTags = true;
        }
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

            response.appendContent(bindingName);

            if (!((attributeValue == AWGenericElement.AWStandalone) || attributeValue.equals(AWGenericElement.AWStandalone))) {
                response.appendContent(AWConstants.Equals);

                AWEncodedString escapedValue = component.escapeAttribute(attributeValue);
                if (escapedValue.mustQuoteAsAttribute()) {
                    response.appendContent(AWConstants.Quote);
                    response.appendContent(escapedValue);
                    response.appendContent(AWConstants.Quote);
                } else {
                    response.appendContent(escapedValue);
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

        if (unrecognizedBindingsDictionary != null) {
            boolean pathDebug = AWConcreteApplication.IsDebuggingEnabled &&
                            component.requestContext().componentPathDebuggingEnabled();
            for (int index = unrecognizedBindingsDictionary.size() - 1; index >= 0; index--) {
                // Note: bindingName needs to be encodedString
                AWEncodedString bindingName = unrecognizedBindingsDictionary.nameAt(index);
                AWBinding binding = unrecognizedBindingsDictionary.elementAt(index);
                AWEncodedString attributeValue = binding.encodedStringValue(component);
                AWGenericElement.appendHtmlAttributeToResponse(response, component, bindingName, attributeValue);
                if (pathDebug && bindingName.equals(AWBindingNames.id)) {
                    AWDebugTrace trace = component.requestContext().debugTrace();
                    trace.pushElementId(attributeValue);
                    trace.popElementId();
                }
            }
        }
        if (otherBindings != null) {
            AWStringDictionary otherBindingsValues = (AWStringDictionary)otherBindings.value(component);
            if (otherBindingsValues != null) {
                for (int index = otherBindingsValues.size() - 1; index >= 0; index--) {
                    AWEncodedString currentBindingName = otherBindingsValues.nameAt(index);
                    AWEncodedString currentBindingValue = otherBindingsValues.elementAt(index);

                    // translate any "on..." handlers
                    String bindingString = currentBindingName.string();
                    AWEncodedString translatedBinding;
                    if (bindingString.startsWith("on") && (translatedBinding = (AWEncodedString)_TranslatedBindings.get(bindingString)) != null) {
                        currentBindingName = translatedBinding;
                    }

                    AWGenericElement.appendHtmlAttributeToResponse(response, component, currentBindingName, currentBindingValue);
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

             * in question.
            */
            elementIdPath = requestContext.nextElementIdPath();
            requestContext.recordFormInputId(elementIdPath);
        }
        AWEncodedString nameString = initNameString(requestContext, component, elementIdPath);
        if (tagName != null) {
            AWResponse response = requestContext.response();
            response.appendContent(AWConstants.LeftAngle);
            response.appendContent(tagName);
            appendOtherBindings(response, component, _unrecognizedBindingsDictionary, _otherBindings);
            if ((_name != null) && (nameString != null)) {
                appendHtmlAttributeToResponse(response, component, _name.name(), nameString);
            }
            if (AWConcreteApplication.IsAutomationTestModeEnabled && requestContext.isDebuggingEnabled()) {
                AWEncodedString semanticKey = computeSemanticKey(requestContext, component, tagName, nameString);
                if (semanticKey != null) {
                    response.appendContent(AWNameEquals);
                    response.appendContent(semanticKey);
                    response.appendContent(AWConstants.Quote);
                }
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

        }
    }

    public void renderResponse(AWRequestContext requestContext, AWComponent component)
    {
        AWEncodedString tagName = tagNameInComponent(component);
        renderResponse(requestContext, component, tagName);
    }
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

    private AWEncodedString computeRecordPlaybackSemanticKey (AWRequestContext requestContext, AWComponent component,
                                                AWEncodedString tagName, AWEncodedString name,
                                                AWEncodedString semanticKeyFromBinding)
    {
        AWEncodedString semanticKey =
            semanticKeyFromBinding == null ? null: semanticKeyFromBinding;
        String semanticKeyString =
            semanticKeyFromBinding == null ? null : semanticKeyFromBinding.string();
        String nameString = null;
        if (_formValuesKey != null) {
            nameString = _formValuesKey.stringValue(component);
        }
        else {
            nameString = name == null ? null : name.string();
        }
        String elementIdString = nameString;
        if (semanticKeyString == null) {
            if (tagName != null &&
                _type != null &&
                "input".equalsIgnoreCase(tagName.string())) {
                String value = _value == null ? null : _value.stringValue(component);
                if (value != null && nameString != null) {
                    String type = _type.stringValue(component);
                    if ("hidden".equalsIgnoreCase(type)) {
                        // In here, we have a hidden field or radio field
                        if (nameString.equals(AWComponentActionRequestHandler.FormSenderKey) ||
                            nameString.equals(AWComponentActionRequestHandler.SenderKey)) {
                            // element id is the form value in this case
                            semanticKeyString = nameString;
                            elementIdString = value;
                        }
                    }
                    else if ("radio".equalsIgnoreCase(type)) {
                        // element id is the form value in this case
                        elementIdString = value;
                    }
                }
            }
        }
        if (semanticKeyString == null) {
            // Only tags which represent action items or form input elements need semantic keys
            if (_hasFormValues || _invokeAction != null || _hasSemenaticKey) {
                semanticKeyString = component._debugCompositeSemanticKey(null);
            }
        }
        if (semanticKeyString != null) {
            String semanticKeyWithPrefix = AWRecordingManager.applySemanticKeyPrefix(requestContext, semanticKeyString, null);
            semanticKeyString = AWRecordingManager.registerSemanticKey(elementIdString, semanticKeyWithPrefix, requestContext);
            if (semanticKey == null) {
                semanticKey = AWEncodedString.sharedEncodedString(semanticKeyString);
            }
            else if (semanticKey != null && !semanticKey.string().equals(semanticKeyString)) {
                semanticKey = AWEncodedString.sharedEncodedString(semanticKeyString);
            }

        }
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

    protected static class EventFilter extends AWBinding.NameFilter
    {
        public String translate (String orig)
        {
            AWEncodedString translatedString;
            if (orig.startsWith("on") && (translatedString = (AWEncodedString)_TranslatedBindings.get(orig)) != null) {
                return translatedString.string();
            }
            return orig;
        }
View Full Code Here

Examples of ariba.ui.aribaweb.util.AWEncodedString

    {
        if (isClientSideConfirmation()) {
            return false;
        }

        AWEncodedString confId = (AWEncodedString)env().peek(ConfirmationId);
        if (confId == null) {
            return false;
        }

        Object idBinding = valueForBinding(AWBindingNames.id);
        if (idBinding instanceof String) {
            return idBinding.equals(confId.string());
        }
        else if (idBinding instanceof AWEncodedString) {
            return idBinding.equals(confId);
        }
        // todo: assert here
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.