Package org.apache.tapestry.util

Examples of org.apache.tapestry.util.ComponentAddress


        return arrPages;
    }

    public Object[] getFirstPageContext()
    {
        ComponentAddress objAddress = new ComponentAddress(getTableModelSource());
        return new Object[] { objAddress, new Integer(1)};
    }
View Full Code Here


        return new Object[] { objAddress, new Integer(1)};
    }

    public Object[] getLastPageContext()
    {
        ComponentAddress objAddress = new ComponentAddress(getTableModelSource());
        return new Object[] { objAddress, new Integer(getPageCount())};
    }
View Full Code Here

        return new Object[] { objAddress, new Integer(getPageCount())};
    }

    public Object[] getBackPageContext()
    {
        ComponentAddress objAddress = new ComponentAddress(getTableModelSource());
        return new Object[] { objAddress, new Integer(getCurrentPage() - 1)};
    }
View Full Code Here

        return new Object[] { objAddress, new Integer(getCurrentPage() - 1)};
    }

    public Object[] getFwdPageContext()
    {
        ComponentAddress objAddress = new ComponentAddress(getTableModelSource());
        return new Object[] { objAddress, new Integer(getCurrentPage() + 1)};
    }
View Full Code Here

        return new Object[] { objAddress, new Integer(getCurrentPage() + 1)};
    }

    public Object[] getDisplayPageContext()
    {
        ComponentAddress objAddress = new ComponentAddress(getTableModelSource());
        return new Object[] { objAddress, new Integer(m_nDisplayPage)};
    }
View Full Code Here

        {
            // error
            return;
        }

        ComponentAddress objAddress = (ComponentAddress) arrParameters[0];
        ITableModelSource objSource = (ITableModelSource) objAddress.findComponent(objCycle);
        setCurrentPage(objSource, ((Integer) arrParameters[1]).intValue());

        // ensure that the change is saved
        objSource.fireObservedStateChange();
    }
View Full Code Here

    private static final String PREFIX = "A";
    private static final char SEPARATOR = '/';
   
    public String squeeze(DataSqueezer squeezer, Object data) throws IOException
    {
        ComponentAddress address = (ComponentAddress) data;

        // a 'null' id path is encoded as an empty string
        String idPath = address.getIdPath();
        if (idPath == null)
          idPath = "";

        return PREFIX + address.getPageName() + SEPARATOR + idPath;
    }
View Full Code Here

        String pageName = string.substring(1, separator);
        String idPath = string.substring(separator + 1);
        if (idPath.equals(""))
          idPath = null;

        return new ComponentAddress(pageName, idPath);
    }
View Full Code Here

  }

  public Object[] getColumnSelectedParameters()
  {
    return new Object[] {
      new ComponentAddress(m_objModelSource),
      m_objColumn.getColumnName()};
  }
View Full Code Here

  }

  public void columnSelected(IRequestCycle objCycle)
  {
    Object[] arrArgs = objCycle.getServiceParameters();
    ComponentAddress objAddr = (ComponentAddress) arrArgs[0];
    String strColumnName = (String) arrArgs[1];

    ITableModelSource objSource =
      (ITableModelSource) objAddr.findComponent(objCycle);
    ITableModel objModel = objSource.getTableModel();

    ITableSortingState objState = objModel.getSortingState();
    if (strColumnName.equals(objState.getSortColumn()))
      objState.setSortColumn(strColumnName, !objState.getSortOrder());
View Full Code Here

TOP

Related Classes of org.apache.tapestry.util.ComponentAddress

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.