Hi, How exactly do you use SimpleAttributeModifier here? I think using CSS like: input:focus {...} should be good enough for highlighting the currently focused <input>. No need of extra logic.
Martin Grigorov Freelancer. Available for hire! Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Jun 16, 2015 at 1:31 AM, sorinev <sori...@gmail.com> wrote: > I decoupled the submit buttons from the table, which was easy on the Java > side but a HUGE pain on the HTML side. However, I now have a new problem > (well it always existed, but it's next on the agenda). > > This form has a TextField and a table. The table has some rows on it, and > each row has a couple of TextFields on it. Each of the TextFields on the > table has a SimpleAttributeModifier that, upon focus, highlights the > contents of the box. > > BUT, the TextField at the top of the form has an onBlur set to it. This > means that when you click away from the TextField at the top, and into one > of the tables TextFields, the contents of the table TextField will briefly > flash blue (highlighted), but then a split second after that the contents > are no longer highlighted and the cursor is at the beginning of the > TextField. This seems to obviously be because in the main TextField's > onblur, the table is added (no getting around that in this case). So the > table TextField's onfocus is basically nullified as a result. Also, it > seems > that the onfocus of the table TextField fires before the main TextField's > onblur, which kills the one idea I had (grab the row and textfield IDs on > the onfocus, then in the onblur, after adding the table, set the focus > back). > > So how can I keep the content of the TextField that's clicked into > highlighted even after that TextField is added back onto the page via > another component's onblur? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/TextField-AjaxEventBehavior-onBlur-onEvent-tp4671150p4671174.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 > >