Package org.apache.ecs.xhtml

Examples of org.apache.ecs.xhtml.td


        for( Iterator i = results.iterator(); i.hasNext() && idx++ <= maxItems; )
        {
            SearchResult sr = (SearchResult) i.next();
            row = new tr();
           
            td name = new td().setWidth("30%");
            name.addElement( "<a href=\""+
                             context.getURL( WikiContext.VIEW, sr.getPage().getName() )+
                             "\">"+engine.beautifyTitle(sr.getPage().getName())+"</a>");
            row.addElement( name );
           
            row.addElement( new td().addElement(""+sr.getScore()));
           
            t.addElement( row );
        }
       
        if( results.isEmpty() )
        {
            row = new tr();
           
            row.addElement( new td().setColSpan(2).addElement( new b().addElement("No results")));

            t.addElement(row);
        }
       
        return t.toString();
View Full Code Here


              tr.addElement(th);
              th.addElement(Util.maskHTML(item.getPrintName(language)));
            }
            else
            {
              td td = new td();
              tr.addElement(td);
              Object obj = m_printData.getNode(new Integer(item.getAD_Column_ID()));
              if (obj == null)
                td.addElement("&nbsp;");
              else if (obj instanceof PrintDataElement)
              {
                PrintDataElement pde = (PrintDataElement) obj;
                String value = pde.getValueDisplay(language)//  formatted
                if (pde.getColumnName().endsWith("_ID") && extension != null)
                {
                  //link for column
                  a href = new a("javascript:void(0)");                 
                  href.setID(pde.getColumnName() + "_" + row + "_a");                 
                  td.addElement(href);
                  href.addElement(Util.maskHTML(value));
                  if (cssPrefix != null)
                    href.setClass(cssPrefix + "-href");
                 
                  extension.extendIDColumn(row, td, href, pde);
                                                     
                }
                else
                {
                  td.addElement(Util.maskHTML(value));
                }
                if (cssPrefix != null)
                {
                  if (DisplayType.isNumeric(pde.getDisplayType()))
                    td.setClass(cssPrefix + "-number");
                  else if (DisplayType.isDate(pde.getDisplayType()))
                    td.setClass(cssPrefix + "-date");
                  else
                    td.setClass(cssPrefix + "-text");
                }               
              }
              else if (obj instanceof PrintData)
              {
                //  ignore contained Data
View Full Code Here

TOP

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

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.