Hi,

Yes, it should be called also on invisible components, but only when
it is any chance that these components can be rendered. If one of
theirs parents are not visible, then such component will not be
rendered.

In my scenario DataView is visible only when "dataView.getItemCount()
> 0". But it leads to an abnormal situation:
1. First request: dataView.getItemCount()=3 so DataView renders 3
subitems (children).
2. Second request: dataView.getItemCount()=0 (eg. someone remove all 3
records from DB), so I set DataView.setVisible(false), but DataView
subitems are not removed from its children list before calling
DataView.setRenderAllowed (MarkupContainer.setRenderAllowed).
MarkupContainer.setRenderAllowed calls setRenderAllowed for all 3
subitems in visitChildren(...). But these subitems should not exists
in current request because dataView.getItemCount()=0. They are not
removed from DataView because it is not visible and calling
setRenderAllowed for these subitems is a bug for me.


--
Daniel

On Mon, Sep 5, 2011 at 4:21 PM, Andrea Del Bene <adelb...@ciseonweb.it> wrote:
> Hi,
>
> I'm not completely  sure, but setRenderAllowed is called to check rendering
> authorization, so it should be called also on invisible components.
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to