tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Landais Gabriel (JIRA)" <...@tapestry.apache.org>
Subject [jira] Updated: (TAPESTRY-1999) Actionlink context type coercion
Date Thu, 03 Jan 2008 13:05:37 GMT

     [ https://issues.apache.org/jira/browse/TAPESTRY-1999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Landais Gabriel updated TAPESTRY-1999:
--------------------------------------

    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]"

  was:
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]"


Wrong return type of getDetailContext() (was String)

> Actionlink context type coercion
> --------------------------------
>
>                 Key: TAPESTRY-1999
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1999
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0.7
>         Environment: JBoss 4.2.2
>            Reporter: Landais Gabriel
>
> 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]"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message