Package org.apache.ecs

Examples of org.apache.ecs.ConcreteElement


         *   Add the version declaration to the beginning of the document.
         */
        out.write(versionDecl);
       
        for (int i=0; i<prolog.size(); i++) {
            ConcreteElement e = (ConcreteElement)prolog.elementAt(i);
            e.output(out);
            // XXX really this should use line separator!
            // XXX should also probably check for pretty print
            out.println();
        }
       
View Full Code Here


    public final String toString() {
        StringBuffer retVal = new StringBuffer();
       
        if (codeset != null) {
            for (int i=0; i<prolog.size(); i++) {
                ConcreteElement e = (ConcreteElement)prolog.elementAt(i);
                retVal.append(e.toString(getCodeset()) + "\n");
            }  
           
            if (content != null)
                retVal.append(content.toString(getCodeset()));
        } else {
            for (int i=0; i<prolog.size(); i++) {
                ConcreteElement e = (ConcreteElement)prolog.elementAt(i);
                retVal.append(e.toString() + "\n");
            }       
           
            if (content != null)
                retVal.append(content.toString());
        }
View Full Code Here

     */
    public final String toString(String codeset) {
        StringBuffer retVal = new StringBuffer();
       
        for (int i=0; i<prolog.size(); i++) {
            ConcreteElement e = (ConcreteElement)prolog.elementAt(i);
            retVal.append(e.toString(getCodeset()) + "\n");
        }       
        if (content != null)
            retVal.append(content.toString(getCodeset()) + "\n");
       
        /**
 
View Full Code Here

    {
         SimpleHash context = getContext(data);

        // First, generate the screen and put it in the context so we
        // can grab it the layout template.
        ConcreteElement results = ScreenLoader.getInstance()
            .eval(data, data.getScreen());
        String screenValue = "";
        if (results != null)
        {
            screenValue = results.toString();
        }
        context.put("screen_placeholder", new SimpleScalar(screenValue));

        // Variable to reference the navigation templates in the
        // layout template.
View Full Code Here

        try
        {
            module = ((TemplateService)TurbineServices.getInstance()
                      .getService(TemplateService.SERVICE_NAME))
                .getNavigationName(template);
            ConcreteElement results = NavigationLoader.getInstance()
                .eval(data, module);
            returnValue = results.toString();
        }
        catch (Exception e)
        {
            String message = ("Error processing navigation template:" +
                              this.template +
View Full Code Here

     * @exception Exception, a generic exception.
     */
    protected ConcreteElement doBuild( RunData data )
        throws Exception
    {
        ConcreteElement out = null;

        try
        {
            doBuildTemplate(data);
            out = buildTemplate(data);
View Full Code Here

     * @exception Exception, a generic exception.
     */
    public void doBuild( RunData data ) throws Exception
    {
        // Execute the Top Navigation portion for this Layout.
        ConcreteElement topNav =
            NavigationLoader.getInstance().eval(data, "DefaultTopNavigation");

        if ( topNav != null)
        {
            data.getPage().getBody().addElement( topNav );
        }

        // If an Action has defined a message, attempt to display it
        // here.
        if ( data.getMessage() != null )
        {
            data.getPage().getBody().addElement(new P())
                .addElement(new Font().setColor(HtmlColor.red)
                    .addElement(data.getMessageAsHTML()));
        }

        // Now execute the Screen portion of the page.
        ConcreteElement screen = ScreenLoader.getInstance()
            .eval(data, data.getScreen());

        if (screen != null)
        {
            data.getPage().getBody().addElement( screen );
        }

        // The screen should have attempted to set a Title for itself,
        // otherwise, a default title is set.
        data.getPage().getTitle().addElement(data.getTitle());

        // The screen should have attempted to set a Body bgcolor for
        // itself, otherwise, a default body bgcolor is set.
        data.getPage().getBody().setBgColor(HtmlColor.white);

        // Execute the Bottom Navigation portion for this Layout.
        ConcreteElement bottomNav =
        NavigationLoader.getInstance().eval ( data, "DefaultBottomNavigation" );

        if ( bottomNav != null)
        {
            data.getPage().getBody().addElement( bottomNav );
View Full Code Here

     * @exception Exception a generic exception.
     */
    public void doBuild(RunData data) throws Exception
    {
        // Execute the Top Navigation portion for this Layout.
        ConcreteElement topNav = NavigationLoader.getInstance()
                .eval(data, "DefaultTopNavigation");

        if (topNav != null)
        {
            data.getPage().getBody().addElement(topNav);
        }

        // If an Action has defined a message, attempt to display it here.
        if (data.getMessage() != null)
        {
            data.getPage().getBody().addElement(new P())
                    .addElement(new Font().setColor(HtmlColor.red)
                    .addElement(data.getMessageAsHTML()));
        }

        // Now execute the Screen portion of the page.
        ConcreteElement screen = ScreenLoader.getInstance()
                .eval(data, data.getScreen());

        if (screen != null)
        {
            data.getPage().getBody().addElement(screen);
        }

        // The screen should have attempted to set a Title for itself,
        // otherwise, a default title is set.
        data.getPage().getTitle().addElement(data.getTitle());

        // The screen should have attempted to set a Body bgcolor for
        // itself, otherwise, a default body bgcolor is set.
        data.getPage().getBody().setBgColor(HtmlColor.white);

        // Execute the Bottom Navigation portion for this Layout.
        ConcreteElement bottomNav = NavigationLoader.getInstance().eval(data,
                "DefaultBottomNavigation");

        if (bottomNav != null)
        {
            data.getPage().getBody().addElement(bottomNav);
View Full Code Here

     * @exception Exception A generic exception.
     */
    protected ConcreteElement doBuild(RunData data)
            throws Exception
    {
        ConcreteElement out = null;

        try
        {
            doBuildTemplate(data);
            out = buildTemplate(data);
View Full Code Here

        log.debug("Loading Screen " + screenName);

        // First, generate the screen and put it in the context so
        // we can grab it the layout template.
        ConcreteElement results =
            ScreenLoader.getInstance().eval(data, screenName);

        String returnValue = (results == null) ? "" : results.toString();

        // variable for the screen in the layout template
        context.put(TurbineConstants.SCREEN_PLACEHOLDER, returnValue);

        // variable to reference the navigation screen in the layout template
View Full Code Here

TOP

Related Classes of org.apache.ecs.ConcreteElement

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.