Package org.apache.tapestry

Examples of org.apache.tapestry.IRequestCycle


        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();

        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle(form);
        IFormComponent field = newField("MyLabel");
        Location l = newLocation();

        FieldLabel fl = (FieldLabel) _creator.newInstance(FieldLabel.class, new Object[]
        { "location", l, "field", field });
View Full Code Here


    {
        MockControl formc = newControl(IForm.class);
        IForm form = (IForm) formc.getMock();

        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycle(form);

        MockControl fieldc = newControl(IFormComponent.class);

        IFormComponent field = (IFormComponent) fieldc.getMock();
View Full Code Here

public class TestListenerMap extends HiveMindTestCase
{
    public void testGetListener()
    {
        Object target = new Object();
        IRequestCycle cycle = newCycle();
        ListenerMethodInvoker invoker = newInvoker();
        Map map = newMap("method", invoker);

        invoker.invokeListenerMethod(target, cycle);
View Full Code Here

        super(location);
    }

    public void write(StringBuffer buffer, ScriptSession session)
    {
        IRequestCycle cycle = session.getRequestCycle();

        Location location = getLocation();
        String tag = "<unique> " + location.toString();

        if (cycle.getAttribute(tag) != null)
            return;

        cycle.setAttribute(tag, Boolean.TRUE);

        writeChildren(buffer, session);
    }
View Full Code Here

  public IAsset getSortImage()
  {
    IAsset objImageAsset;

    IRequestCycle objCycle = getPage().getRequestCycle();
    ITableSortingState objSortingState = getTableModel().getSortingState();
    if (objSortingState.getSortOrder()
      == ITableSortingState.SORT_ASCENDING)
    {
      objImageAsset =
        (IAsset) objCycle.getAttribute(
          TableColumns.TABLE_COLUMN_ARROW_UP_ATTRIBUTE);
      if (objImageAsset == null)
        objImageAsset = getAsset("sortUp");
    }
    else
    {
      objImageAsset =
        (IAsset) objCycle.getAttribute(
          TableColumns.TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE);
      if (objImageAsset == null)
        objImageAsset = getAsset("sortDown");
    }
View Full Code Here

    public IAsset getSortImage()
    {
        IAsset objImageAsset;

        IRequestCycle objCycle = getPage().getRequestCycle();
        ITableSortingState objSortingState = getTableModel().getSortingState();
        if (objSortingState.getSortOrder() == ITableSortingState.SORT_ASCENDING)
        {
            objImageAsset = (IAsset) objCycle
                    .getAttribute(TableColumns.TABLE_COLUMN_ARROW_UP_ATTRIBUTE);
            if (objImageAsset == null) objImageAsset = getAsset("sortUp");
        }
        else
        {
            objImageAsset = (IAsset) objCycle
                    .getAttribute(TableColumns.TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE);
            if (objImageAsset == null) objImageAsset = getAsset("sortDown");
        }

        return objImageAsset;
View Full Code Here

  public IAsset getSortImage()
  {
    IAsset objImageAsset;

    IRequestCycle objCycle = getPage().getRequestCycle();
    ITableSortingState objSortingState = getTableModel().getSortingState();
    if (objSortingState.getSortOrder()
      == ITableSortingState.SORT_ASCENDING)
    {
      objImageAsset =
        (IAsset) objCycle.getAttribute(
          TableColumns.TABLE_COLUMN_ARROW_UP_ATTRIBUTE);
      if (objImageAsset == null)
        objImageAsset = getAsset("sortUp");
    }
    else
    {
      objImageAsset =
        (IAsset) objCycle.getAttribute(
          TableColumns.TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE);
      if (objImageAsset == null)
        objImageAsset = getAsset("sortDown");
    }
View Full Code Here

    public IAsset getSortImage()
    {
        IAsset objImageAsset;

        IRequestCycle objCycle = getPage().getRequestCycle();
        ITableSortingState objSortingState = getTableModel().getSortingState();
        if (objSortingState.getSortOrder() == ITableSortingState.SORT_ASCENDING)
        {
            objImageAsset = (IAsset) objCycle
                    .getAttribute(TableColumns.TABLE_COLUMN_ARROW_UP_ATTRIBUTE);
            if (objImageAsset == null) objImageAsset = getAsset("sortUp");
        }
        else
        {
            objImageAsset = (IAsset) objCycle
                    .getAttribute(TableColumns.TABLE_COLUMN_ARROW_DOWN_ATTRIBUTE);
            if (objImageAsset == null) objImageAsset = getAsset("sortDown");
        }

        return objImageAsset;
View Full Code Here

        Visit visit = (Visit) engine.getVisit();

        if (visit == null)
            return false;

        IRequestCycle cycle = getPage().getRequestCycle();

        return visit.isUserLoggedIn() && visit.getUser(cycle).isAdmin();
    }
View Full Code Here

    {
        Object objValue = objConvertedTableRow;

        IPrimaryKeyConvertor objConvertor = getCachedConvertor();
        if (objConvertor != null) {
            IRequestCycle objCycle = getPage().getRequestCycle();
            if (objCycle.isRewinding()) {
                objValue = objConvertor.getValue(objConvertedTableRow)
            }
            else {
                Map mapConvertedValues = getConvertedValues();
                objValue = mapConvertedValues.get(objConvertedTableRow);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.IRequestCycle

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.