We're choosing an item from a list and then using ajax to populate a
view of the item, together with a listview of purchasable details.
For any given item there may or may not be images.  Either managing
the relevant components in a page-level collection or using a visitor
to find them works.  The key to the solution is:

1. they are all in a panel
2. that panel must be an ajax target
3. the logic to determine whether they are visible must be in the
onbeforereneder method of that panel

Thanks all.

- Scott

On 9/8/07, Ryan Holmes <[EMAIL PROTECTED]> wrote:
>
> On Sep 7, 2007, at 8:52 PM, Carlos Pita wrote:
>
> > You can also make the components to hide implement some listener (or
> > just marker) interface X and then do a visitChildren traversal from
> > page.onBeforeRender as follows:
> >
> > visitChildren(X.class, new IVisitor() {
> >   public Object component(Component component) {
> >     comp.setVisible(your visibility logic here);
> >   }
> > });
> >
> > This is less centralized that keeping a list at the top level, if you
> > care about this.
> >
> > Regards,
> > Carlos
> >
> >
>
> Damn. I just now recommended the same thing. Sorry, didn't notice
> your post.
>
> This approach definitely seems cleaner than managing a list of
> component references -- I wonder if it works for Scott...
>
> -Ryan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Scott Swank
reformed mathematician

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to