On 9/17/07, Francois Armand <[EMAIL PROTECTED]> wrote:
> Well, I'm not sure that I understand what you do correctly, may you
> provide the actual code ?
> As far as I can tell, you persists a field that is used as value for the
> loop, and so it's always the last MacthInfo that is persists.
>
> You may want to have a look at
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
> and look how Tapestry deals with context and onActivate/onPassivate methods.

Thanks for your reply however, I don't think was very clear about what
I'm trying to do.

I was trying to avoid posting code from lots of different files but. I
think I can find the relevant snippets, which should make things
clearer.

So here goes:

>From Start.html:

       <t:loop source="Matches" value="CurrentMatch">                           
                                
             <t:MatchInfo match="CurrentMatch" />
       </t:loop>

>From Start.java:

    @Persist
    private List<DateeeMatch> matches;

    @Persist
    private DateeeMatch currentMatch;

matches is filled from a long DB query.

The action link in MatchInfo.html:

    <td class="matchLink">
        <t:actionlink t:id="changedMind">Changed Your Mind</t:actionlink>
    </td>

>From MatchInfo.java
        
        @Parameter(required=true)
        private DateeeMatch match;

        
        public void onActionFromChangedMind()
        {
                System.out.println(match.getName());
        }


My problem is when you click the action link on any of the MatchInfo
components on the start page. The console shows the name of the last
match not the one clicked on. The MatchInfo component also correctly
displays lots of info from the match parameter, so that is defiantly
OK.

Can anyone shed some light on this for me?

Charlie M

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to