Package org.apache.myfaces.view.facelets.el

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


            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

    }

    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

    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

            {
                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

                    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
                            // containing only spaces, or recreating new ones containing only the necessary
                            // spaces.
                            size = compressSpaces(instructionBuffer, size);
                        }
                        Instruction[] instructions = (Instruction[]) this.instructionBuffer
                                .toArray(new Instruction[size]);
                        this.children.add(new UIInstructionHandler(this.alias, this.id, instructions, txt));
                        this.instructionBuffer.clear();
                    }

                }
                catch (ELException e)
                {
                    if (this.tags.size() > 0)
                    {
                        throw new TagException((Tag) this.tags.peek(), e.getMessage());
                    }
                    else
                    {
                        throw new ELException(this.alias + ": " + e.getMessage(), e.getCause());
                    }
                }
            }

            // KEEP THESE SEPARATE SO LOGIC DOESN'T GET FUBARED
        }
        else if (this.buffer.length() > 0)
        {
            String s = this.buffer.toString();
            if (s.trim().length() > 0)
            {
                if (child)
                {
                    s = trimRight(s);
                }
                if (s.length() > 0)
                {
                    try
                    {
                        ELText txt = ELText.parse(s);
                        if (txt != null)
                        {
                            if (txt.isLiteral())
                            {
                                this.children.add(new UILiteralTextHandler(txt.toString()));
                            }
                            else
                            {
                                this.children.add(new UITextHandler(this.alias, txt));
                            }
View Full Code Here

                new DoctypeInstruction(
                    this.name,
                    this.publicId,
                    this.systemId,
                    this.html5Doctype)
            }, new ELText(""));
        h[1] = this.getNextFaceletHandler();
        return new CompositeFaceletHandler(h);
    }
View Full Code Here

            {
                s = trimRight(s);
            }
            if (s.length() > 0)
            {
                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

    }

    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

    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

TOP

Related Classes of org.apache.myfaces.view.facelets.el.ELText

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.