Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App
if you do a type search for "o.a.w.I*Listener" you will see a bunch of interesting ones, especially: IComponentInstantiationListener and IComponentInitializationListener -igor On Wed, Oct 31, 2012 at 10:57 AM, eugenebalt wrote: > I guess what I'm asking is, is there a common Post-Constructor place that > could be generically called in Wicket, where I could iterate through all > components and append a JavaScript modifier to selective ones (Button and > Link types)? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653498.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App
I would expect the Visitor to run after Page construction, so all Components should be ready. I use a similar technique for Form components (to add error behaviors etc) - I dont see why the IVisitor approach wouldnt work at the BasePage level as well though. N On Wed, Oct 31, 2012 at 2:50 PM, eugenebalt wrote: > Hi Nick, > > In the BasePage, we haven't created any of our components yet. We create > them in the Page. I need a *POST*-constructor of some kind, by which points > all the components will be created. > > If I do anything in the BasePage, no components exist there yet. > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653502.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App
Hi Nick, In the BasePage, we haven't created any of our components yet. We create them in the Page. I need a *POST*-constructor of some kind, by which points all the components will be created. If I do anything in the BasePage, no components exist there yet. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653502.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App
Maybe you could add a Component Visitor to a Base Page (assuming you have a BasePage) and then inspect all the components that way. IVisitor Then based on the type of the Component being visited, attach a Behavior. N On Wed, Oct 31, 2012 at 1:57 PM, eugenebalt wrote: > I guess what I'm asking is, is there a common Post-Constructor place that > could be generically called in Wicket, where I could iterate through all > components and append a JavaScript modifier to selective ones (Button and > Link types)? > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653498.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Generically Append a JavaScript Method to all Buttons/Links Throughout App
I guess what I'm asking is, is there a common Post-Constructor place that could be generically called in Wicket, where I could iterate through all components and append a JavaScript modifier to selective ones (Button and Link types)? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495p4653498.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Generically Append a JavaScript Method to all Buttons/Links Throughout App
We are using a JS library to "veil" our forms after the user clicks Submit. (This is done to show a busy status, and prevent the user from doing anything else until it's done.) The veil is not a Wicket veil -- rather, we are using a separate jQuery library. It's working fine. We have 2 apps, one Wicket and one not, so we wanted a "neutral" JS-only veil solution that can be applied to both. The problem is, the veil is called by doing an onClick="method();" on every button and link. The Wicket app is already written, and we don't want to go through every Button and every Link (these are the 2 types of fields that should call the veil) and add this JS method reference. Sometimes, some of our buttons will already have some JS, others won't. Is there a quick, generic way to always auto-append this, throughout every page and every Button/Link, on an already-existing Wicket app? Any recommendations? Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generically-Append-a-JavaScript-Method-to-all-Buttons-Links-Throughout-App-tp4653495.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org