I one case, I have a "CollapsablePanel" that contains a RepeatingView.  The
idea is that I stick whatever panels I want to be included in the
Collapsable area by adding them to the repeater, if I didn't add any panels
or if the panels aren't visible (maybe access rights prevent the user from
seeing the data contained in the panel) then I don't even want to show the
Collapsable area.  So, the repeaters isVisble() returns true when at least
one of it's children is visble, false otherwise.

In a second case, I have a WebMarkupContainer that acts as a wrapper around
a couple of fields.  Again, maybe the fields aren't visble at this time due
to access rights, if none of the fields are visible, why bother rendering
the div (WebMarkupContainer)?  Instead, I define the div using the same
Visitor as described above.

In both cases, the parent's visibility depends on the children, not the
other way around.


Chuck


Johan Compagner wrote:
> 
> why would a parent be none visible if one of its childs is not visible??
> 
> isVisibleInHierachy is exactly what it says for one component. It test if
> that component
> will be visible yes or know. And that depends on itself or his parent
> visibility or render allowed boolean.
> 
> johan
> 
> 
> On 10/26/06, ChuckDeal <[EMAIL PROTECTED]> wrote:
>>
>>
>> It goes into an infinite loop because I define the parent component's
>> isVisble() to be the result of visiting the children and calling their
>> isVisbleInHierarchy() which will in turn call the parent's isVisble()
>> which
>> is the result of the childrens's ... and on and on
>>
>> isVisbleInHierarchy is not a straight replacement for using (isVisble()
>> &&
>> isRenderAllowed())
>>
>> Chuck
>>
>>
>> Johan Compagner wrote:
>> >
>> > why comes it in an infinite loop??
>> >
>> > i think one is protected because that one has an alternative
>> > isVisibleInHierarchy()
>> >
>> >
>> > johan
>> >
>> >
>> >
>> > On 10/26/06, ChuckDeal <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I am defining a panel, which is visible only if at least one of its
>> >> children
>> >> is visible.  So, it's isVisble() method calls visitChildren() with a
>> >> visitor
>> >> that returns true as soon as it finds a visible child or null
>> otherwise.
>> >> This worked until I started using an AuthorizationStrategy, now I also
>> >> need
>> >> to check isRenderAllowed(), but it is protected.  I looked at
>> >> isVisibleInHierarchy(), but it goes through the component's ancestors
>> >> and,
>> >> in my case, causes an infinite loop.
>> >>
>> >> So, why is isRenderAllowed() protected when isEnabledAllowed() is
>> public?
>> >>
>> >> or maybe a better question
>> >>
>> >> Is there a better way to do this visibility check?
>> >>
>> >> Thanks
>> >> Chuck
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/why-is-isRenderAllowed%28%29-protected--tf2514044.html#a7011351
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> -------------------------------------------------------------------------
>> >> Using Tomcat but need to do more? Need to support web services,
>> security?
>> >> Get stuff done quickly with pre-integrated technology to make your job
>> >> easier
>> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> >> Geronimo
>> >>
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> >> _______________________________________________
>> >> Wicket-user mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >
>> >
>> -------------------------------------------------------------------------
>> > Using Tomcat but need to do more? Need to support web services,
>> security?
>> > Get stuff done quickly with pre-integrated technology to make your job
>> > easier
>> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> >
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> > _______________________________________________
>> > Wicket-user mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/why-is-isRenderAllowed%28%29-protected--tf2514044.html#a7011723
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/why-is-isRenderAllowed%28%29-protected--tf2514044.html#a7017919
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to