Package net.sf.jwan.jsf.menu.ui

Examples of net.sf.jwan.jsf.menu.ui.UIMenu


  public void encodeBegin(FacesContext context, UIComponent component) throws IOException
  {
    String title = (String)component.getAttributes().get("title");
    String styleClass = (String)component.getAttributes().get("styleClass");
   
    UIMenu uiExMenu = (UIMenu)component;
   
    List<?> lDm = (List<?>)component.getAttributes().get("value");
    DataModel dm = new ListDataModel(lDm);
    uiExMenu.setValue(dm);
   
    logger.debug("uiExMenu.getRowCount()="+uiExMenu.getRowCount());
   
    ResponseWriter writer = context.getResponseWriter();
   
    writer.startElement("div", component);
    writer.writeAttribute("class", "iMenu", null);
View Full Code Here


    writer.endElement("div");writer.write("\n");
  }
 
  public void encodeChildren(FacesContext context, UIComponent component) throws IOException
 
    UIMenu uiMenu = (UIMenu)component;
   
    if(component.getChildCount()==0){return;}
   
    int max=-1;
    UIMenuLimit uiMenuLimit = getMenuLimit(uiMenu);
    if(uiMenuLimit==null){logger.debug("No Limit");}
    else
    {
      max = (Integer)uiMenuLimit.getAttributes().get("max");
      logger.debug("Limit found");
   
   
    logger.debug("uiExMenu.getRowCount()="+uiMenu.getRowCount()+" Limit(max)="+max);
   
    List<UIComponent> uiMenuItems = getMenuItems(uiMenu);
   
    int itemCounter=0;
    for(UIComponent uiChild : uiMenuItems)
    {
      if(uiChild instanceof UIMenuItems)
      {
        for(int index=0;index<uiMenu.getRowCount();index++)
        {
          itemCounter++;
          logger.debug(itemCounter+" < "+max);
          uiMenu.setRowIndex(index);
          uiChild.encodeAll(context);
          if(itemCounter==max)
          {
            encodeMoreButton(context, uiMenuLimit);
            return;
View Full Code Here

TOP

Related Classes of net.sf.jwan.jsf.menu.ui.UIMenu

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.