I consider this a bit of a nice case. Define one method for the first link.
Define a second method for the second link and just call the first link's method. It's a balance: an extra couple of lines of code for something that's pretty rare, vs. added complexity for this one situation. An option not supported by the framework is to change ActionLink so that the event type (currently fixed as "action") can be specified. That way you could rig it to trigger a "useCase" event, and have a single onUseCase() event handler method. As usual: add an issue if you don't want this idea to fall in the cracks. On Nov 19, 2007 3:14 AM, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I think I'm missing something obvious here, but would appreciate a shove in > the right direction. > > I have a page with two links on it, and I want both to run the same listener > method on the page class. > > So I want to have > > <a href="#" t:type="ActionLink" t:id="openUseCase" > context="useCaseBaseline.useCaseSerial">${useCaseBaseline.name}</a> > > at two points in my page (actually both are in a loop), and then in my code I > want to have > > @OnEvent(component="openUseCase") > public SingleUseCase openUseCase(int pUseCaseSerial) > { > // blah > } > > My problems are: > > 1) I can't have two ActionLink's with the same id > 2) If I have unique ids, then I can't have two OnEvent annotations on the same > method. > > Cheers, > > Tim. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]