Tapestry
  1. Tapestry
  2. TAPESTRY-1999

Allow the context for an event to be specified as a List as well as an Object array

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.7
    • Fix Version/s: 5.0.11
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      JBoss 4.2.2

      Description

      We wish to have a list as a context for an actionlink :

      .tml :

      <t:actionlink t:id="detail" context="$

      {detailContext}

      ">Detail</t:actionlink>

      .java :

      public List getDetailContext()

      { List context = new ArrayList(); context.add(instance.getId1()); context.add(instance.getId2()); return context; }

      public Object onActionFromDetail(List context)

      { String id1 = context.get(0); String id2 = context.get(1); pageDetail.setup(id1, id2); return pageDetail; }

      BUT

      context parameter in onActionFromDetail contains just one String that looks like "[4, 5]"

        Activity

        Landais Gabriel created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Landais Gabriel made changes -
        Description We wish to have a list as a context for an actionlink :

        .tml :

        <t:actionlink t:id="detail" context="${detailContext}">Detail</t:actionlink>

        .java :

            public String getDetailContext() {
                List context = new ArrayList();
                context.add(instance.getId1());
                context.add(instance.getId2());
                return context;
            }
            
            public Object onActionFromDetail(List context) {
                String id1 = context.get(0);
                String id2 = context.get(1);
                pageDetail.setup(id1, id2);
                return pageDetail;
            }

        BUT

        context parameter in onActionFromDetail contains just one String that looks like "[4, 5]"
        We wish to have a list as a context for an actionlink :

        .tml :

        <t:actionlink t:id="detail" context="${detailContext}">Detail</t:actionlink>

        .java :

            public List getDetailContext() {
                List context = new ArrayList();
                context.add(instance.getId1());
                context.add(instance.getId2());
                return context;
            }
            
            public Object onActionFromDetail(List context) {
                String id1 = context.get(0);
                String id2 = context.get(1);
                pageDetail.setup(id1, id2);
                return pageDetail;
            }

        BUT

        context parameter in onActionFromDetail contains just one String that looks like "[4, 5]"
        Howard M. Lewis Ship made changes -
        Summary Actionlink context type coercion Allow the context for an event to be specified as a List as well as an Object array
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.11 [ 12312968 ]
        Mark Thomas made changes -
        Workflow jira [ 12419903 ] Default workflow, editable Closed status [ 12568549 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568549 ] jira [ 12591592 ]

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Landais Gabriel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development