Hi,
> in complex apps enable and visiblity can be linked with security
settings and so on
this is why you should override #onConfigure() and call #setEnabled()
and #setVisible() from there.
Have fun
Sven
On 19.08.2015 06:19, Илья Нарыжный wrote:
Sven,
Thanks! In my case IDataProvider provides data from DB. And these
options leads to double query to DB... And that's a little bit
redundant...
DataProvider:
https://github.com/OrienteerDW/wicket-orientdb/blob/master/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/OQueryDataProvider.java
Do Wicket really need check enabling on every component within
hasError() method? Maybe somehow mark those components which can have
messages on it? Or as a workaround: check messages first and only
after that check for enable and visibility? I think, that it will be
even more time efficient: in complex apps enable and visiblity can be
linked with security settings and so on - so for first time it might
be time consuming.
Thanks,
Ilia
2015-08-16 1:41 GMT-07:00 Sven Meier <[email protected]>:
Hi,
actually this is a known case where you have to call #detach() on your model
by yourself:
onClick() {
service.delete(rowModel.getObject());
// let model reload the items
tableModel.detach();
}
Alternatively you can change IDataProvider#model() to provide a model, which
can load a single item without loading the whole list of items first.
Have fun
Sven
On 15.08.2015 23:36, Илья Нарыжный wrote:
Guys,
Please help to resolve the following problem. There is datatable with
paging. Table propagated from LoadableDetachableModel. Also table is under
form and contain action (AjaxFormSubmitLink) to remove a row within table.
Problem: load() on the model invoked before actual action performed due to
invoking isEnabled on AjaxPagebleLink in method Form.hasError(). So model
loaded before actual changing of underlying layer.
For me it looks like an issue in wicket.
There are not so good work arounds: detach model after action or do not
use
LoadableDetachableModel.
What can you suggest?
----------------
Thanks,
Founder of Modern Data Warehouse: Orienteer
Ilia Naryzhnyy
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]