Package org.apache.ecs.xhtml

Examples of org.apache.ecs.xhtml.div


    {
        String include = (String)params.get( PARAM_INCLUDE );
        String exclude = (String)params.get( PARAM_EXCLUDE );
       
        List<String> pages;
        div masterDiv = new div();
        masterDiv.setClass( "index" );
       
        div indexDiv = new div();
       
        masterDiv.addElement( indexDiv );
        indexDiv.setClass( "header" );
        try
        {
            pages = listPages( context, include, exclude );
            context.getEngine().getPageSorter().sort( pages );
           
            char initialChar = ' ';
           
            div currentDiv = new div();
           
            for( String name : pages )
            {
                if( name.charAt( 0 ) != initialChar )
                {
                    if( initialChar != ' ' ) indexDiv.addElement( " - " );
                    initialChar = name.charAt( 0 );
                   
                    masterDiv.addElement( makeHeader(initialChar) );
           
                    currentDiv = new div();
                    currentDiv.setClass("body");
                    masterDiv.addElement( currentDiv );
                   
                    indexDiv.addElement( "<a href='#"+initialChar+"'>"+initialChar+"</a>" );
                }
                else
                {
                    currentDiv.addElement( ", " );
                }
               
                String link = "<a href='"+
                              context.getURL( WikiContext.VIEW, name )+
                              "'>"+name+"</a>";
               
                currentDiv.addElement( link );
            }
        }
        catch( ProviderException e )
        {
            log.warn("Could not load page index",e);
View Full Code Here


    /**
     *  Outputs a HTML-formatted version of a stack trace.
     */
    private String stackTrace( Map< String, String > params, Throwable t ) {
        div d = new div();
        d.setClass( "debug" );
        d.addElement( "Plugin execution failed, stack trace follows:" );
        StringWriter out = new StringWriter();
        t.printStackTrace( new PrintWriter( out ) );
        d.addElement( new pre( out.toString() ) );
        d.addElement( new b( "Parameters to the plugin" ) );

        ul list = new ul();
        for( Iterator<Map.Entry< String, String > > i = params.entrySet().iterator(); i.hasNext(); ) {
            Map.Entry< String, String > e = i.next();
            String key = e.getKey();

            list.addElement( new li( key + "'='" + e.getValue() ) );
        }

        d.addElement( list );

        return d.toString();
    }
View Full Code Here

    {
        String include = params.get( PARAM_INCLUDE );
        String exclude = params.get( PARAM_EXCLUDE );
       
        List<String> pages;
        div masterDiv = new div();
        masterDiv.setClass( "index" );
       
        div indexDiv = new div();
       
        masterDiv.addElement( indexDiv );
        indexDiv.setClass( "header" );
        try
        {
            pages = listPages( context, include, exclude );
            context.getEngine().getPageSorter().sort( pages );
           
            char initialChar = ' ';
           
            div currentDiv = new div();
           
            for( String name : pages )
            {
                if( name.charAt( 0 ) != initialChar )
                {
                    if( initialChar != ' ' ) indexDiv.addElement( " - " );
                    initialChar = name.charAt( 0 );
                   
                    masterDiv.addElement( makeHeader(initialChar) );
           
                    currentDiv = new div();
                    currentDiv.setClass("body");
                    masterDiv.addElement( currentDiv );
                   
                    indexDiv.addElement( "<a href='#"+initialChar+"'>"+initialChar+"</a>" );
                }
                else
                {
                    currentDiv.addElement( ", " );
                }
               
                String link = "<a href='"+
                              context.getURL( WikiContext.VIEW, name )+
                              "'>"+name+"</a>";
               
                currentDiv.addElement( link );
            }
        }
        catch( ProviderException e )
        {
            log.warn("Could not load page index",e);
View Full Code Here

    {
        String include = params.get( PARAM_INCLUDE );
        String exclude = params.get( PARAM_EXCLUDE );
       
        List<String> pages;
        div masterDiv = new div();
        masterDiv.setClass( "index" );
       
        div indexDiv = new div();
       
        masterDiv.addElement( indexDiv );
        indexDiv.setClass( "header" );
        try
        {
            pages = listPages( context, include, exclude );
            context.getEngine().getPageSorter().sort( pages );
           
            char initialChar = ' ';
           
            div currentDiv = new div();
           
            for( String name : pages )
            {
                if( name.charAt( 0 ) != initialChar )
                {
                    if( initialChar != ' ' ) indexDiv.addElement( " - " );
                    initialChar = name.charAt( 0 );
                   
                    masterDiv.addElement( makeHeader(initialChar) );
           
                    currentDiv = new div();
                    currentDiv.setClass("body");
                    masterDiv.addElement( currentDiv );
                   
                    indexDiv.addElement( "<a href='#"+initialChar+"'>"+initialChar+"</a>" );
                }
                else
                {
                    currentDiv.addElement( ", " );
                }
               
                String link = "<a href='"+
                              context.getURL( WikiContext.VIEW, name )+
                              "'>"+name+"</a>";
               
                currentDiv.addElement( link );
            }
        }
        catch( ProviderException e )
        {
            log.warn("Could not load page index",e);
View Full Code Here

    {
        String include = (String)params.get( PARAM_INCLUDE );
        String exclude = (String)params.get( PARAM_EXCLUDE );
       
        List<String> pages;
        div masterDiv = new div();
        masterDiv.setClass( "index" );
       
        div indexDiv = new div();
       
        masterDiv.addElement( indexDiv );
        indexDiv.setClass( "header" );
        try
        {
            pages = listPages( context, include, exclude );
            context.getEngine().getPageSorter().sort( pages );
           
            char initialChar = ' ';
           
            div currentDiv = new div();
           
            for( String name : pages )
            {
                if( name.charAt( 0 ) != initialChar )
                {
                    if( initialChar != ' ' ) indexDiv.addElement( " - " );
                    initialChar = name.charAt( 0 );
                   
                    masterDiv.addElement( makeHeader(initialChar) );
           
                    currentDiv = new div();
                    currentDiv.setClass("body");
                    masterDiv.addElement( currentDiv );
                   
                    indexDiv.addElement( "<a href='#"+initialChar+"'>"+initialChar+"</a>" );
                }
                else
                {
                    currentDiv.addElement( ", " );
                }
               
                String link = "<a href='"+
                              context.getURL( WikiContext.VIEW, name )+
                              "'>"+name+"</a>";
               
                currentDiv.addElement( link );
            }
        }
        catch( ProviderException e )
        {
            log.warn("Could not load page index",e);
View Full Code Here

TOP

Related Classes of org.apache.ecs.xhtml.div

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.