> Where is this caching of that rowcount?
> Because that is wrong in the first place. That can't be cached outside of
> the IDataProvider..
It is cached in PageableRefreshingView.

> Because when the navigation toolbar renders itself.. what then? Then the
> row count should also be the right value.
> So this shouldn't matter. It is visible when you click the link (because
> there is data then) then you remove an item
> then the dataprovider should be invalidated so that it requeries it. and
> then isVisible() should return you that value.
A form invokes isVisibleInHierarchy on every FormComponent before form 
processing and so if the NavigationToolbar contains a FormComponent, its 
isVisible is invoked and the DataProvider is queried before the listener 
phase. During the render phase isVisible is called again - and now it uses 
the row count cached before the event phase - is this ok?

Well, if you think that isVisible should be overridable, then you should 
completelly remove setVisible and FLAG_VISIBLE.

I just do not see any advantages of isVisible being non-final, only 
potentional problems. For example if you call Component#toString on a 
detached component it may cause a DB query which is IMHO wrong - the 
visibility should be an attribute of a Component.

Regards,
Bendis

Reply via email to