Why are you unwilling to show some source code?  Here is an example of a
Layout that uses ECS to generate a Layout with a side navigation.

/*
 * The Working-Dogs.com License, Version 1.1
 *
 * Copyright (c) 2000 Working-Dogs.com.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *    any, must include the following acknowlegement:  
 *       "This product includes software developed by the 
 *        Working-Dogs.com ."
 *    Alternately, this acknowlegement may appear in the software itself,
 *    if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "Working-Dogs.com" and "FreeTrade" must not be used to 
 *    endorse or promote products derived from this software without 
 *    prior written permission. For written permission, please contact 
 *    [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called 
 *    "Working-Dogs.com" or "FreeTrade" nor may "Working-Dogs.com" or 
 *    "FreeTrade" appear in their names  without prior written 
 *    permission of Working-Dogs.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Working-Dogs.com.  For more
 * information on the Working-Dogs.com, please see 
 * <http://www.working-dogs.com>.
 */

// Java Core Classes
import java.io.*;
import java.util.*;

// Turbine Modules
import org.apache.turbine.modules.*;

// Turbine Utility Classes
import org.apache.turbine.util.*;

// ECS Classes
import org.apache.ecs.*;
import org.apache.ecs.html.*;

/**
 * layout module that includes side navigation
 * 
 * Created: 02/29/2000
 * @author <a href="mailto:[EMAIL PROTECTED]">John D. McNally</a>
 * @author <a href="mailto:[EMAIL PROTECTED]">Frank Y. Kim</a>
 * @version: $Revision: 1.2 $ $Date: 2000/05/01 15:49:25 $ $Author: frank $
 */
public class WithSideNav extends Layout
{
    public void doBuild( RunData data ) throws Exception
    {
        ConcreteElement topNav = 
            NavigationLoader.getInstance().eval ( data, "PageTop" );
        ConcreteElement sideNav = 
            NavigationLoader.getInstance().eval ( data, "Side" );
        ConcreteElement adminNav = 
            NavigationLoader.getInstance().eval ( data, "Admin" );
        ConcreteElement bottomNav = 
            NavigationLoader.getInstance().eval ( data, "PageBottom" );
        ConcreteElement debugNav = 
            NavigationLoader.getInstance().eval ( data,
"DefaultBottomNavigation" );
        ConcreteElement screen = 
            ScreenLoader.getInstance().eval ( data, data.getScreen() );
        
        data.getPage().getBody()
            .addElement(
                new Table()
                .setBorder(0)
                .setWidth("100%")
                .addElement(
                    new TR()
                    .addElement(
                        new TD()
                        .addElement(topNav)
                    )
                )
            )
            .addElement(
                new Table()
                .setBorder(0)
                .setWidth("120")
                .setAlign(AlignType.left)
                .addElement(
                    new TR()
                    .addElement(
                        new TD()
                        .setVAlign(AlignType.top)
                        .addElement(sideNav)
                        .addElement(adminNav)
                        .addElement( 
                            new BR()
                            .setClear("all")
                        )
                        .addElement( new BR() )
                        .addElement(
                            new A("http://www.ecml.org")
                            .addElement(
                                new IMG("/images/ecml_logosmall.jpg")
                                .setBorder(0)
                                .setWidth(48)
                                .setHeight(48)
                                .setAlt("ECML")
                            )
                        )
                        .addElement( new BR() )
                    )
                )
            )
            .addElement(
                new Table()
                .setBorder(0)
                .addElement(
                    new TR()
                    .addElement(
                        new TD()
                        .addElement(
                            new P()
                            .addElement(
                                new Font()
                                .setColor(HtmlColor.red)
                                .addElement(data.getMessageAsHTML())
                                .addElement( new BR() )
                            )
                        )                
                        .addElement(screen)
                    )
                )
            )
            .addElement(
                new BR()
                .setClear("all")
            )
            .addElement(
                new Table()
                .setBorder(0)
                .setWidth("100%")
                .addElement(
                    new TR()
                    .addElement(
                        new TD()
                        .addElement(bottomNav)
                    )
                )
            .addElement(
                    new TR()
                    .addElement(
                        new TD()
                        .addElement(debugNav)
                    )
                )
            );   
    }
}


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to