Hello,

I have a simple DataView where each row has some labels and textfields. Each
time the user enter in a textfield I would like to highlight the selected
row. (The idea is to adapt the wicket stuff example (OIRPage.java) with an
AjaxFormComponentUpdatingBehavior("onfocus") instead of a simple Link)


The example in wicket stuff
(
http://wicketstuff.org/wicket/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage
)

 shows how to highlight the selected row using ReuseIfModelsEqualStrategy
when the user click on a Link.

Using the AjaxFormComponentUpdatingBehavior with the "onfocus" event I try
to simulate the Link click but it does not work...

 myTextField.add(new AjaxFormComponentUpdatingBehavior("onfocus") {

                    @Override
                    protected void onUpdate(AjaxRequestTarget target) {
                        HighlitableDataItem<EtudiantAS> hitem =
(HighlitableDataItem<EtudiantAS>) item;
                        hitem.toggleHighlite();
                       // target.addComponent( ??? don' know what to put
here, how to re-render the item)

                    }
                });


Well, any idea

thanks

Arnaud

Reply via email to