Thanks for that - that's where I ended up myself. I wondered if it was possible to get away without having to do the onActionFromLogin2() method, but it's not exactly difficult to write!
ta, Tim. On Sunday 06 May 2007 02:08, Howard Lewis Ship wrote: > You can capture the action even from multiple components: > > void onAction() { ... } > > But you probably have more than one component that will fire action events > and you don't want all of them to cause a login, so: > > void onActionFromLogin() { ...} > > Now, you have a second component on your page; component ids have to be > unique, so this other component needs its own id: > > <t:actionlink t:id="login2">login another</t:actionlink> > > and > > void onActionFromLogin2() { return onActionFromLogin(); } > > On 5/5/07, Tim Sawyer <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > I had a complex if/then structure in my component's html template, such > > that I > > want to render different things under different conditions. Two of the > > conditions will result in logins, but with different link text. > > > > I therefore found myself wanting to do: > > > > @OnEvent(component="login") > > public Login login() > > { > > // ... > > } > > > > in my code, but I can't have the id of both ActionLink components > > being "login" > > > > <a href="#" t:type="actionLink" t:id="login">login one way</a> > > <a href="#" t:type="actionLink" t:id="login">login another</a> > > > > I therefore ended up having different ids in my html, and trying to catch > > them > > both with annotations which didn't seem to work either. > > > > Can someone point me in the right direction please? Or is this not > > possible > > and I have to write another method for the second login link? > > > > ta, > > > > Tim. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]