Examples of Ul


Examples of com.dodo.blog.ui.component.container.Ul

public class NavigationPanel
        extends Nav
{
    public NavigationPanel( Class<? extends Page>... pages )
    {
        Ul menu = new Ul();
        add( menu );

        for ( Class<? extends Page> page : pages )
        {
            Li menuItem = new Li();
            Anchor link = new Anchor( localize( "menu." + page.getSimpleName().toLowerCase() ), page );
            menuItem.add( link );
            if ( WebApplication.get().getPageClassByPath( RequestCycle.get().getRequest().getServletPath() ) == page )
            {
                link.setClassName( "selected" );
            }

            menu.add( menuItem );
        }

        // TODO: implement search
        Form form = new Form( "search-form" );
        form.add( new TextBox( "search" ).setPlaceHolder( localize( "placeholder.search" ) ) );
View Full Code Here

Examples of org.apache.ecs.html.UL

        // ------------
        // Header table
        // ------------

        UL headerList = new UL();
        for(int i = 0; i < texts.length; i++) {
            LI listItem = new LI();
            listItem.setNeedClosingTag(true);
            if(i == up)
                listItem.setID("current");

            Span headerSpan = new Span();

            String link = links != null && links[i] != null ? links[i] : null;
            String text = texts[i] != null ? texts[i] : "";
            text = text.trim();

            if(link == null){
                link = "#";               
            } else if(link.length() == 0){
              link = "#";
              listItem.setID("dummy");
            }
           
            if(parameters != null) {
                link += parameters;
            }
            A anchor = new A(link.trim(), text);
            anchor.setOnMouseOver("window.status='" + text + "'; return true");
            anchor.setOnMouseOut("window.status=''; return true");
            headerSpan.addElement(anchor);

            headerList.addElement(listItem.addElement(headerSpan));
        }

        Table headerTable = new Table()
            .setWidth(width)
            .setBorder(0)
View Full Code Here

Examples of org.apache.ecs.html.UL

        }
        else {
            ElementContainer newContent = new ElementContainer().addElement(new BR());
           
            if(errors != null && errors.size() > 0) {
                UL errorList = new UL();
                for(Iterator it=errors.iterator(); it.hasNext();) {
                    errorList.addElement(new LI( (String) it.next() ));
                }
                Div errorDiv = new Div().addElement(errorList);
                errorDiv.setID(errorCssId);
               
                newContent.addElement(errorDiv);
            }
            if(notices != null && notices.size() > 0) {
                UL noticeList = new UL();
                for(Iterator it=notices.iterator(); it.hasNext();) {
                    noticeList.addElement(new LI( (String) it.next() ));
                }
                Div noticeDiv = new Div().addElement(noticeList);
                noticeDiv.setID(noticeCssId);
               
                newContent.addElement(noticeDiv);
View Full Code Here

Examples of org.apache.ecs.html.UL

        root.addElement( "Click on a url to take it out of the list" +
                         " and retry it in when requested. " );

        root.addElement( new BR() );
       
        UL ul = new UL();
        //FIXME: the getReason() call has to be escaped from HTML markup, CR&LF
        DynamicURI uri = new DynamicURI( rundata );
       
        ParameterParser params = rundata.getParameters();
        uri.addQueryData( params );
       
        Iterator i = urls.iterator();
       
        while ( i.hasNext() ) {
            URLInfo info = URLManager.getInfo( (String)i.next() );
            /* It can happen that url is no longer in list while
               we are processing */
            if( info != null ) {
                uri.removeQueryData( RETRY_URL );
                uri.addQueryData(RETRY_URL, info.getURL());
                ul.addElement( new LI()
                    .addElement( new A(uri.toString() )
                        .addElement( info.getURL() ) )
                    .addElement( new B( info.getMessage() ) ) );
            }
        }
       
        root.addElement( ul );

        java.util.Hashtable rt = URLFetcher.getRealtimeURLs();

        root.addElement( "The following " +
                         rt.size() +
                         " URL(s) are being loaded: " );

        root.addElement( new BR() );
        ul = new UL();
       
        java.util.Enumeration en = rt.keys();
        while (en.hasMoreElements()) {
            String key = (String)en.nextElement();
            LI li = new LI().addElement( key )
                .addElement( " - by " );
            if (rt.get(key) != null )
                li.addElement( String.valueOf(((Vector)rt.get(key)).size()) )
                    .addElement( " threads." );
            ul.addElement( li );
        }
       
        root.addElement( ul );
       

View Full Code Here

Examples of org.apache.ecs.html.UL

        root.addElement( "Click on a url to take it out of the list" +
                         " and retry it in when requested. " );

        root.addElement( new BR() );
       
        UL ul = new UL();
        //FIXME: the getReason() call has to be escaped from HTML markup, CR&LF
        DynamicURI uri = new DynamicURI( rundata );
       
        ParameterParser params = rundata.getParameters();
        uri.addQueryData( params );
       
        Iterator i = urls.iterator();
       
        while ( i.hasNext() ) {
            URLInfo info = URLManager.getInfo( (String)i.next() );
            /* It can happen that url is no longer in list while
               we are processing */
            if( info != null ) {
                uri.removeQueryData( RETRY_URL );
                uri.addQueryData(RETRY_URL, info.getURL());
                ul.addElement( new LI()
                    .addElement( new A(uri.toString() )
                        .addElement( info.getURL() ) )
                    .addElement( new B( info.getMessage() ) ) );
            }
        }
       
        root.addElement( ul );

        java.util.Hashtable rt = URLFetcher.getRealtimeURLs();

        root.addElement( "The following " +
                         rt.size() +
                         " URL(s) are being loaded: " );

        root.addElement( new BR() );
        ul = new UL();
       
        java.util.Enumeration en = rt.keys();
        while (en.hasMoreElements()) {
            String key = (String)en.nextElement();
            LI li = new LI().addElement( key )
                .addElement( " - by " );
            if (rt.get(key) != null )
                li.addElement( String.valueOf(((Vector)rt.get(key)).size()) )
                    .addElement( " threads." );
            ul.addElement( li );
        }
       
        root.addElement( ul );
       

View Full Code Here

Examples of org.apache.ecs.xhtml.ul

{
    public static String getCollectionInHTML( WikiContext context, Collection coll )
    {
        XhtmlDocument doc = new XhtmlDocument("UTF-8");
       
        ul content = new ul();
       
        for( Iterator i = coll.iterator(); i.hasNext(); )
        {
            Object o = i.next();
           
            if( o instanceof WikiPage )
            {
                WikiPage p = (WikiPage)o;
                content.addElement( new li().addElement( p.getName() ) );
            }
            else if( o instanceof String )
            {
                content.addElement( new li().addElement( o.toString() ));
            }
        }

        doc.appendBody( content );
       
View Full Code Here

Examples of org.apache.ecs.xhtml.ul

        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

Examples of org.apache.ecs.xhtml.ul

{
    public static String getCollectionInHTML( WikiContext context, Collection coll )
    {
        XhtmlDocument doc = new XhtmlDocument("UTF-8");
       
        ul content = new ul();
       
        for( Iterator i = coll.iterator(); i.hasNext(); )
        {
            Object o = i.next();
           
            if( o instanceof WikiPage )
            {
                WikiPage p = (WikiPage)o;
                content.addElement( new li().addElement( p.getName() ) );
            }
            else if( o instanceof String )
            {
                content.addElement( new li().addElement( o.toString() ));
            }
        }

        doc.appendBody( content );
       
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.