Package com.cosmo.data.lists

Examples of com.cosmo.data.lists.StaticList


      this.name = name;
      this.label = label;
      this.description = StringUtils.EMPTY;
      this.value = StringUtils.EMPTY;
      this.listType = ListType.ComboBox;
      this.list = new StaticList();
   }
View Full Code Here


      this.name = name;
      this.label = label;
      this.description = StringUtils.EMPTY;
      this.value = HttpRequestUtils.getValue(request, name);
      this.listType = ListType.ComboBox;
      this.list = new StaticList();
   }
View Full Code Here

      Node listNode;
      NodeList attribList;
      NodeList listDefs;
      Element listElement;
      Element attribElement;
      StaticList sList = null;
      DynamicList dList = null;
      ListItem item;

      // Inicializa el contenedor de listas
      HashMap<String, List> lists = new HashMap<String, List>();

      // Comprueba si existe la definici�n
      attribList = doc.getElementsByTagName(DataServiceProperties.XML_TAG_DATALISTS);
      if (attribList.getLength() < 1)
      {
         return lists;
      }

      // Carga las listas est�ticas
      listDefs = doc.getElementsByTagName(DataServiceProperties.XML_TAG_STATICLIST);
      for (int pidx = 0; pidx < listDefs.getLength(); pidx++)
      {
         listNode = listDefs.item(pidx);
         if (listNode.getNodeType() == Node.ELEMENT_NODE)
         {
            listElement = (Element) listNode;

            sList = new StaticList(listElement.getAttribute(DataServiceProperties.XML_ATT_ID));

            attribList = listElement.getElementsByTagName(DataServiceProperties.XML_TAG_STATICLISTITEM);
            for (int aidx = 0; aidx < attribList.getLength(); aidx++)
            {
               attribNode = attribList.item(aidx);
               if (attribNode.getNodeType() == Node.ELEMENT_NODE)
               {
                  attribElement = (Element) attribNode;
                  item = new ListItem(attribElement.getAttribute(DataServiceProperties.XML_ATT_VALUE),
                                      attribElement.getAttribute(DataServiceProperties.XML_ATT_TITLE));

                  if (!StringUtils.isNullOrEmptyTrim(attribElement.getAttribute(DataServiceProperties.XML_ATT_DEFAULTVALUE)))
                  {
                     item.setDefault(attribElement.getAttribute(DataServiceProperties.XML_ATT_DEFAULTVALUE).equals("true") ||
                                     attribElement.getAttribute(DataServiceProperties.XML_ATT_DEFAULTVALUE).equals("1"));
                  }

                  sList.addListItem(item);
               }
            }

            lists.put(sList.getId(), sList);
         }
      }

      // Carga las listas din�micas SQL
      listDefs = doc.getElementsByTagName(DataServiceProperties.XML_TAG_DYNAMICLIST);
View Full Code Here

TOP

Related Classes of com.cosmo.data.lists.StaticList

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.