Hi!
I added simple simple behavior:
public class XDateField extends DateTextField {
public XDateField(String id, IModel model) {
super(id, model, "yyyy-MM-dd");
add(new AbstractBehavior() {
@Override
public void onRendered(Component component) {
Response response = component.getResponse();
response.write("\n<a href=\"#\" onclick=\"changeDate('" +
component.getMarkupId() + "', -1)\">(DEC)</a>");
}
});
add(new DatePicker());
}
}
It is rendering ok. But when the component is re-rendered via ajax
(target.addComponent(dateTextField))
my behavior is re-added. After each re-render my link looks like this:
[component] (DEC)(DEC)(DEC)(DEC)... [calendarIcon]
How to fix it?
Thanks in advance,
Artur
--
View this message in context:
http://www.nabble.com/AbstractBehavior-problem-after-comonent-re-render-tp19932224p19932224.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]