Examples of ELText


Examples of org.apache.myfaces.view.facelets.el.ELText

                String s = this.buffer.toString();
                if (child)
                {
                    s = trimRight(s);
                }
                ELText txt = ELText.parse(s);
                if (txt != null)
                {
                    if (compressSpaces)
                    {
                        // Use the logic behind the instructions to remove unnecessary instructions
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

            if (s.length() > 0)
            {
                if (!compressSpaces)
                {
                    //Do it as usual.
                    ELText txt = ELText.parse(s);
                    if (txt != null)
                    {
                        if (txt.isLiteral())
                        {
                            if (escapeInlineText)
                            {
                                this.instructionBuffer.add(new LiteralTextInstruction(txt.toString()));
                            }
                            else
                            {
                                this.instructionBuffer.add(new LiteralNonExcapedTextInstruction(txt.toString()));
                            }
                        }
                        else
                        {
                            if (escapeInlineText)
                            {
                                this.instructionBuffer.add(new TextInstruction(this.alias, txt ));
                            }
                            else
                            {
                                // When escape inline text is disabled (jspx case) we have to split the EL and add
                                // separate instructions, so it can be properly escaped.
                                ELText[] splitText = ELText.parseAsArray(s);
                                if (splitText.length > 1)
                                {
                                    Instruction[] array = new Instruction[splitText.length];
                                    for (int i = 0; i < splitText.length; i++)
                                    {
                                        ELText selText = splitText[i];
                                        if (selText.isLiteral())
                                        {
                                            array[i] = new LiteralNonExcapedTextInstruction(selText.toString());
                                        }
                                        else
                                        {
                                            array[i] = new TextInstruction(this.alias, selText );
                                        }
                                    }
                                    this.instructionBuffer.add(new CompositeTextInstruction(array));
                                }
                                else
                                {
                                    this.instructionBuffer.add(new TextInstruction(this.alias, txt ));
                                }
                            }
                        }
                    }
                }
                else
                {
                    // First check if the text contains EL before build something, and if contains
                    // an EL expression, compress it before build the ELText.
                    if (s != null && s.length() > 0)
                    {
                        if (ELText.isLiteral(s))
                        {
                            if (escapeInlineText)
                            {
                                this.instructionBuffer.add(new LiteralTextInstruction(s));
                            }
                            else
                            {
                                this.instructionBuffer.add(new LiteralNonExcapedTextInstruction(s));
                            }
                        }
                        else
                        {
                            if (instructionBuffer.size() > 0 &&
                                !(instructionBuffer.get(instructionBuffer.size()-1) instanceof LiteralXMLInstruction))
                            {
                                s = compressELText(s);
                            }
                            // When escape inline text is disabled (jspx case) we have to split the EL and add
                            // separate instructions, so it can be properly escaped.
                            ELText[] splitText = ELText.parseAsArray(s);
                            if (splitText.length > 1)
                            {
                                Instruction[] array = new Instruction[splitText.length];
                                for (int i = 0; i < splitText.length; i++)
                                {
                                    ELText selText = splitText[i];
                                    if (selText.isLiteral())
                                    {
                                        array[i] = new LiteralNonExcapedTextInstruction(selText.toString());
                                    }
                                    else
                                    {
                                        array[i] = new TextInstruction(this.alias, selText );
                                    }
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

    }

    public void writeInstruction(String text)
    {
        this.finishStartTag();
        ELText el = ELText.parse(text);
        if (el.isLiteral())
        {
            this.addInstruction(new LiteralXMLInstruction(text));
        }
        else
        {
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

    public void writeComment(String text)
    {
        this.finishStartTag();

        ELText el = ELText.parse(text);
        if (el.isLiteral())
        {
            this.addInstruction(new LiteralCommentInstruction(text));
        }
        else
        {
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

            {
                String qname = attrs[i].getQName();
                String value = attrs[i].getValue();
                this.buffer.append(' ').append(qname).append("=\"").append(value).append("\"");

                ELText txt = ELText.parse(value);
                if (txt != null)
                {
                    if (txt.isLiteral())
                    {
                        this.addInstruction(new LiteralAttributeInstruction(qname, txt.toString()));
                    }
                    else
                    {
                        this.addInstruction(new AttributeInstruction(this.alias, qname, txt));
                    }
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

                String s = this.buffer.toString();
                if (child)
                {
                    s = trimRight(s);
                }
                ELText txt = ELText.parse(s);
                if (txt != null)
                {
                    if (compressSpaces)
                    {
                        // Use the logic behind the instructions to remove unnecessary instructions
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

            if (s.length() > 0)
            {
                if (!compressSpaces)
                {
                    //Do it as usual.
                    ELText txt = ELText.parse(s);
                    if (txt != null)
                    {
                        if (txt.isLiteral())
                        {
                            if (escapeInlineText)
                            {
                                this.instructionBuffer.add(new LiteralTextInstruction(txt.toString()));
                            }
                            else
                            {
                                this.instructionBuffer.add(new LiteralNonExcapedTextInstruction(txt.toString()));
                            }
                        }
                        else
                        {
                            this.instructionBuffer.add(new TextInstruction(this.alias, txt ));
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

    }

    public void writeInstruction(String text)
    {
        this.finishStartTag();
        ELText el = ELText.parse(text);
        if (el.isLiteral())
        {
            this.addInstruction(new LiteralXMLInstruction(text));
        }
        else
        {
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

    public void writeComment(String text)
    {
        this.finishStartTag();

        ELText el = ELText.parse(text);
        if (el.isLiteral())
        {
            this.addInstruction(new LiteralCommentInstruction(text));
        }
        else
        {
View Full Code Here

Examples of org.apache.myfaces.view.facelets.el.ELText

            {
                String qname = attrs[i].getQName();
                String value = attrs[i].getValue();
                this.buffer.append(' ').append(qname).append("=\"").append(value).append("\"");

                ELText txt = ELText.parse(value);
                if (txt != null)
                {
                    if (txt.isLiteral())
                    {
                        this.addInstruction(new LiteralAttributeInstruction(qname, txt.toString()));
                    }
                    else
                    {
                        this.addInstruction(new AttributeInstruction(this.alias, qname, txt));
                    }
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.