Bir formun içeriğine bağlı olarak bir DataTable içeriğini değiştirmek istiyorum (bir arama çubuğu işlevi olarak düşünün). Ben bunu wicket 1.5.x içinde yaptım ama ben 6.0.0-beta2 küçük ayarında çalışmak için görünmüyor olabilir. AjaxButton'un onSubmit yöntemine girmiyor gibi görünüyor. Diğer her şey gayet iyi çalışıyor, her bileşen düzgün bir şekilde çalışıyor ve sayfa yüklendiğinde dataTable doğru verilerle dolduruluyor, ancak düğmeye bastığımda hiçbir şey olmuyor.wicket 6.0.0-beta2 AjaxButton ile form gönderirken DataTable içeriği güncelleniyor
Herhangi bir yardım büyük memnuniyetle karşılanacaktır.
dataTable:
private class SearchForm extends Form<String> {
private static final long serialVersionUID = 1L;
private String tnModel;
private Label tnLabel = new Label("tnLabel", "Telephone Number :");
private TextField<String> tn;
public SearchForm(String id) {
super(id);
tn = new TextField<String>("tnTextField", new PropertyModel<String>(this, "tnModel"));
tn.setOutputMarkupId(true);
add(tnLabel);
add(tn);
AjaxButton lSearchButton = new AjaxButton("searchButton") {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
SubscriberFilter filter = new SubscriberFilter();
target.add(table);
if (!(tn.getValue() == null) && !tn.getValue().isEmpty()) {
filter.setTn(tn.getValue());
}
// giving the new filter to the dataProvider
subscriberDataProvider.setFilterState(filter);
}
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
// TODO Implement onError(..)
throw new UnsupportedOperationException("Not yet implemented.");
}
};
lSearchButton.setOutputMarkupId(true);
this.setDefaultButton(lSearchButton);
add(lSearchButton);
}
}
mı()? Hata ayıklama mesajı veya hata ayıklayıcı aracılığıyla? – bert
Evet, sorumu söylediğim gibi, onSubmit() 'e ulaşmıyor ve neden bilmiyorum ... – jrochette
Bu biletle ilgili olabilir: https://issues.apache.org/jira/browse/WICKET-4630? (Yandaki notta: 6.0.0 beta-3 olduğunu biliyor musunuz?) –