Package net.mlw.vlh

Examples of net.mlw.vlh.ValueList


  public ValueList getValueList(String name, ValueListInfo info) {
    int numberPerPage = 0;
    Object tplReturn = null;
    Session tplSession = null;
    List list = null;
    ValueList returnValueList = null;
    Vector<String> params = null;
    String tmpStr = null;

    try {
      if (LOGGER.isDebugEnabled()) {
View Full Code Here


            list = query.list();
            info.setTotalNumberOfEntries(list.size());
         }

         ValueList returnValueList = getListBackedValueList(info, list);
         if (LOGGER.isDebugEnabled())
         {
            LOGGER.debug("Retrieved list was wrapped in valuelist, info=" + info);
         }
         return returnValueList;
View Full Code Here

            list = query.list();
            info.setTotalNumberOfEntries(list.size());
         }

         ValueList returnValueList = getListBackedValueList(info, list);
         if (LOGGER.isDebugEnabled())
         {
            LOGGER.debug("Retrieved list was wrapped in valuelist, info=" + info);
         }
         return returnValueList;
View Full Code Here

    */
   public int doEndTag() throws JspException
   {
      ValueListSpaceTag rootTag = (ValueListSpaceTag) JspUtils.getParent(this, ValueListSpaceTag.class);

      ValueList valueList = rootTag.getValueList();

      StringBuffer sb = new StringBuffer();

      sb.append("<select name=").append("'").append(name).append("'").append(attributes).append(">");

      if (bodyContent != null && bodyContent.getString() != null)
      {
         sb.append(bodyContent.getString());
      }

      try
      {
         String[] svalues = pageContext.getRequest().getParameterValues(name);
         List values = (svalues == null) ? Collections.EMPTY_LIST : Arrays.asList(svalues);

         for (Iterator iter = valueList.getList().iterator(); iter.hasNext();)
         {
            Object bean = iter.next();
            String value = BeanUtils.getProperty(bean, this.value);

            sb.append("<option ");
View Full Code Here

    * @see javax.servlet.jsp.tagext.Tag#doEndTag()
    */
   public int doEndTag() throws JspException
   {

      ValueList valueList = rootTag.getValueList();

      StringBuffer sb = new StringBuffer();
      sb.append("<a href=\"").append(url);
      sb.append(rootTag.getConfig().getLinkEncoder().encode(pageContext, parameters));
      sb.append("\">");
View Full Code Here

      if (LOGGER.isDebugEnabled())
      {
         LOGGER.debug("Focus settings was setted up. Focus property '" + focusProperty + "', focus value '" + focusValue + "'");
      }

      ValueList list = vlh.getValueList(valueListName, info);
      pageContext.getRequest().setAttribute(rootTag.getTableInfo().getName(), list);
      rootTag.setValueList(list);

      if (LOGGER.isDebugEnabled())
      {
View Full Code Here

      //If the valuelist is empty, skip the tag...

      ValueListSpaceTag rootTag = (ValueListSpaceTag) JspUtils.getParent(this, ValueListSpaceTag.class);

      ValueList valueList = rootTag.getValueList();
      if (valueList == null || rootTag.getValueList().getList() == null || rootTag.getValueList().getList().size() == 0)
      {
         return SKIP_BODY;
      }
      else
View Full Code Here

   private String format = DEFAULT_FORMAT;

   public void convertValueList() throws JspException
   {
      ValueList vl = getRootTag().getValueList();

      try
      {

         while (vl.hasNext())
         {
            Object bean = vl.next();
            Object xAxis = PropertyUtils.getProperty(bean, "ixaxis");
            Object yAxis = PropertyUtils.getProperty(bean, "iyaxis");
            Object value = PropertyUtils.getProperty(bean, "ivalue");

            xAxisMap.put(xAxis, null);

            Map map = (Map) yAxisMap.get(yAxis);
            if (map == null)
            {
               yAxisMap.put(yAxis, map = new HashMap());
               map.put("yaxis", yAxis);
            }
            map.put(JspUtils.format(xAxis, null, null).toLowerCase().replace(' ', '_'), value);
         }
      }
      catch (Exception e)
      {
         LOGGER.error("InvertedRowTag.convertValueList() exception...", e);
      }

      //Add all the columns to the tag context.
      for (Iterator iter = xAxisMap.keySet().iterator(); iter.hasNext();)
      {
         String label = JspUtils.format(iter.next(), null, null);
         addColumnInfo(new ColumnInfo(label, label.toLowerCase().replace(' ', '_'), null, null));
      }

      getRootTag().setValueList(new DefaultListBackedValueList(new ArrayList(yAxisMap.values()), vl.getValueListInfo()));
   }
View Full Code Here

   {

      init();

      // If the valuelist is empty, render only header
      ValueList valueList = getRootTag().getValueList();
      if (valueList == null || valueList.getList() == null || valueList.getList().size() == 0)
      {
         getRootTag().setValueList(ValueListNullSpacer.getInstance());
         LOGGER.warn("ValueList '" + getRootTag().getTableInfo().getName()
               + "' is empty or null. Continue working with the singleton ValueListNullSpacer.");
      }
View Full Code Here

    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
    ValueListHandler vlh = (ValueListHandler) context.getBean("valueListHandler", ValueListHandler.class);

    ValueListInfo info = ValueListRequestUtil.buildValueListInfo(request);
    ValueList valueList = vlh.getValueList(name, info);

    request.setAttribute(requestName, valueList);
  }
View Full Code Here

TOP

Related Classes of net.mlw.vlh.ValueList

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.