I am actually completely stuck on a problem that would be solved by being able to get the component id in this fashion.
I am implementing a form. The form uses an ajaxformloop to add/remove fields. The fields are <select> elements. What's more, I am using the @OnEvent mixin + javascript to make one select dependent on the other. This dependent select approach works fine outside of the ajaxformloop. The problem happens in the javascript function called. It is impossible to know which <select> fired the onChange and consequently which dependent <select> to update. The rendered <select> elements have a generated unique id. If I could determine in the javascript function which <select> fired the on change OR if I could stick that id in the parameter of this function, it would work. I am REALLY desperate to get this to work in the ajaxformloop, as I have a deadline. Anything someone could tell me that would help would be VERY much appreciated. As a side note, I have used Tapestry since T4. I love it immensly, and love T5 even more. Fantastic work to Howard and everyone who builds and maintains it. I find it weird that the Ajax/javascript implementation seems incongruent to how smart T5 is. Thanks in advance Howard Lewis Ship wrote: > > Unnecessary would be too strong. > > The best bet for this kind of thing would be to add an issue > requesting this kind of logging be built into Tapestry. > > There isn't a MagicWand service that stores any data about the current > event. > > On Feb 11, 2008 3:34 PM, Hilco Wijbenga <hilco.wijbe...@gmail.com> wrote: >> On Feb 7, 2008 3:31 PM, Hilco Wijbenga <hilco.wijbe...@gmail.com> wrote: >> > To aid debugging, is it possible to do something like this: >> > >> > @onEvent >> > public void onEvent() { >> > final String componentId = MagicWand.getComponentIdForThisEvent(); >> > final String action = MagicWand.getActionForThisEvent(); >> > System.out.println("Component ID: " + componentId); >> > System.out.println("Action: " + action); >> > } >> > >> > What's T5's replacement for MagicWand? :-) >> >> Is this impossible? Or unnecessary? >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/Displaying-the-source-of-an-event-tp15346218p22108075.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org