Examples of BindingExpression


Examples of flex2.compiler.mxml.rep.BindingExpression

        {
            if (result instanceof BindingExpression)
            {
                if (allowBinding)
                {
                    BindingExpression bindingExpression = (BindingExpression)result;
                    if (parent != null)
                    {
                        bindingExpression.setDestination(parent);
                    }
                    else
                    {
                        bindingExpression.setDestination(vector);
                    }

                    bindingExpression.setDestinationLValue(getName());
                    bindingExpression.setDestinationProperty(getName());
                }
                else
                {
                    log(line, new BindingNotAllowed());
                }
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

       * <requestName>@{binding_expression}</requestName>
       */
      CDATANode cdata = (CDATANode) node.getChildAt(0);
      if (cdata.image.length() > 0)
      {
                BindingExpression be = textParser.parseBindingExpression(cdata.image, cdata.beginLine);
                if (be != null)
                {
                    if (be.isTwoWayPrimary())
                    {
                        log(cdata, new TwoWayBindingNotAllowed());
                    }
                    else
                    {
                        be.setDestination(graph);
                    }
                }
         else
        {
          log(cdata, new ModelBuilder.OnlyScalarError(requestName));
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

    {
      if (result instanceof BindingExpression)
      {
        if (allowBinding)
        {
          BindingExpression bindingExpression = (BindingExpression)result;
          if (parent != null)
          {
            bindingExpression.setDestination(parent);
          }
          else
          {
            bindingExpression.setDestination(array);
          }

          bindingExpression.setDestinationLValue(getName());
          bindingExpression.setDestinationProperty(getName());
        }
        else
        {
          log(line, new BindingNotAllowed());
        }
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

        if (!inCDATA(flags))
        {
            //  binding?
            if (!ignoreBinding(flags))
            {
                BindingExpression result = parseBindingExpression(text);
                if (result != null)
                {
                    return result;
                }
                else
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

        ArgumentListNode argumentList = null;
        Iterator<BindingExpression> iterator = propertyWatcher.getBindingExpressions().iterator();

        while (iterator.hasNext())
        {
            BindingExpression bindingExpression = iterator.next();
            MemberExpressionNode base =
                AbstractSyntaxTreeUtil.generateGetterSelector(nodeFactory, BINDINGS, false);
            GetExpressionNode selector = generateArrayIndex(nodeFactory, bindingExpression.getId());
            selector.setMode(Tokens.LEFTBRACKET_TOKEN);
            MemberExpressionNode memberExpression = nodeFactory.memberExpression(base, selector);
            argumentList = nodeFactory.argumentList(argumentList, memberExpression);
        }
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

        {
            CDATANode cdata = (CDATANode) node.getChildAt(0);

            if (cdata.image.length() > 0)
            {
                BindingExpression be = textParser.parseBindingExpression(cdata.image, cdata.beginLine);

                if (be != null)
                {
                    if (allowTopLevelBinding)
                    {
                        be.setDestination(xmlList);
                        writer.write("null");
                    }
                    else
                    {
                        log(cdata, new AbstractBuilder.BindingNotAllowed());                       
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

                else
                {
                    attrExpr = e4xElementsByLocalName + ".@" + attrName.getLocalPart();
                }

                BindingExpression be = attributeBindings.get(attrName);
               
                be.setDestinationLValue(attrExpr);
                be.setDestinationProperty(destinationProperty + "[" + node.getIndex() + "]");
                be.setDestination(xmlList);
                be.setDestinationXMLAttribute(true);
               
                // So be.getDestination() will use LValue.  The destinationProperty is wrong.               
                be.setDestinationE4X(true);
               
                //System.out.println("cdata: LValue=" + e4xElementsByLocalName + " prop=" + be.getDestinationProperty()));

                xmlList.setHasBindings(true);

                PrefixMapping.pushNamespaces(be, namespaces);
                if (nsUri.length() > 0)
                {
                    be.addNamespace(nsUri, nsId);
                }
            }
        }

        node.toStartElement(serializer);

        if (node.getChildCount() == 1 && node.getChildAt(0) instanceof CDATANode)
        {
            CDATANode cdata = (CDATANode) node.getChildAt(0);
            if (cdata.image.length() > 0)
            {
                BindingExpression be = textParser.parseBindingExpression(cdata.image, cdata.beginLine);
                if (be != null)
                {
                    //[Matt] I think this value is wrong but I can't see where it's used so we'll leave it for now.
                    String destinationProperty = createExpression(destinationPropertyStack);

                    be.setDestinationLValue(e4xElementsByLocalName);
                    be.setDestinationProperty(destinationProperty + "[" + node.getIndex() + "]");
                    be.setDestination(xmlList);
                    be.setDestinationXMLNode(true);
                   
                    // So be.getDestination() will use LValue.  The destinationProperty is wrong.
                    be.setDestinationE4X(true);

                    //System.out.println("cdata: LValue=" + e4xElementsByLocalName + " prop=" + be.getDestinationProperty()));
                   
                    xmlList.setHasBindings(true);
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

        for (Iterator<QName> i = node.getAttributeNames(); i != null && i.hasNext();)
        {
            QName qname = i.next();
            String value = (String) node.getAttributeValue(qname);
           
            BindingExpression be = textParser.parseBindingExpression(value, node.beginLine);

            if (be != null)
            {
                if (attributeBindings == null)
                {
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

        Iterator<BindingExpression> iterator = mxmlDocument.getBindingExpressions().iterator();

        while (iterator.hasNext())
        {
            BindingExpression bindingExpression = iterator.next();

            if (bindingExpression.isRepeatable())
            {
                ExpressionStatementNode expressionStatement = generateRepeatableBinding(bindingExpression);
                functionStatementList = nodeFactory.statementList(functionStatementList, expressionStatement);
            }
            else
            {
                ExpressionStatementNode expressionStatement = generateBinding(bindingExpression);
                functionStatementList = nodeFactory.statementList(functionStatementList, expressionStatement);
            }

            if (bindingExpression.getTwoWayCounterpart() != null)
            {
                if (bindingExpression.isTwoWayPrimary())
                {
                    // result[${bindingExpression.id}].isTwoWayPrimary = true;
                    ExpressionStatementNode expressionStatement =
                        generateIsTwoWayPrimaryAssignment(bindingExpression.getId());
                    functionStatementList = nodeFactory.statementList(functionStatementList, expressionStatement);
                }

                {
                    // result[${bindingExpression.id}].twoWayCounterpart = result[${bindingExpression.twoWayCounterpart.id}];
                    ExpressionStatementNode expressionStatement =
                        generateTwoWayCounterpartAssignment(bindingExpression.getId(),
                                                            bindingExpression.getTwoWayCounterpart().getId());
                    functionStatementList = nodeFactory.statementList(functionStatementList, expressionStatement);
                }

                if (bindingExpression.getTwoWayCounterpart().isTwoWayPrimary())
                {
                    // result[${bindingExpression.twoWayCounterpart.id}].isTwoWayPrimary = true;
                    ExpressionStatementNode expressionStatement =
                        generateIsTwoWayPrimaryAssignment(bindingExpression.getTwoWayCounterpart().getId());
                    functionStatementList = nodeFactory.statementList(functionStatementList, expressionStatement);
                }

                {
                    //result[${bindingExpression.twoWayCounterpart.id}].twoWayCounterpart = result[${bindingExpression.id}];
                    ExpressionStatementNode expressionStatement =
                        generateTwoWayCounterpartAssignment(bindingExpression.getTwoWayCounterpart().getId(),
                                                            bindingExpression.getId());
                    functionStatementList = nodeFactory.statementList(functionStatementList, expressionStatement);
                }
            }
        }
View Full Code Here

Examples of flex2.compiler.mxml.rep.BindingExpression

    if (node.getChildCount() == 1 && node.getChildAt(0) instanceof CDATANode)
    {
      CDATANode cdata = (CDATANode) node.getChildAt(0);
      if (cdata.image.length() > 0)
      {
          BindingExpression be = textParser.parseBindingExpression(cdata.image, cdata.beginLine);
          if (be != null)
          {
                    /**
                     * <mx:Model>{binding_expression}</mx:Model>
                     * or
                     * <mx:Model>@{binding_expression}</mx:Model>
                     */
                    be.setDestination(graph);
                    be.setDestinationObjectProxy(true);
          }
                else
                {
                    /**
                     * <mx:Model>some string</mx:Model>
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.