RE: Rendering Bug?
Jacob Kjome <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Kirk, What version of Barracuda did you say you were using? Have you tried 1.2.0 or even the latest CVS? I think you will find a lot of bugs have been fixed and some things have been improved. I would try the upgrade and see if it fixes any of your issues. If it does, well, there you go. Don't need to worry about those things anymore. Jake At 05:32 PM 6/20/2003 +0200, you wrote: >Hi Christian, > >Will consider using the custom model approach... >Will report if this works or not. > >Thanx >Regards >KD > >-----Original Message----- >From: Christian Cryder [mailto:[email protected]] >Sent: 20 June 2003 05:01 >To: [email protected] >Subject: RE: [Barracuda] Rendering Bug? > > >Hmmm...this is quite odd. I wonder if that particular element is actually >getting rendered twice? Might be interesting to stick a debug line in place >and then see if the model is getting called multiple times for the same >element. > >Another thing to consider is whether XMLC is somehow mucking with the >structure (that's something of a longshot, since <div>s can be nested). > >One other thing to consider...while the approach you've outlined (returning >null to control visibility) _should_ work, I personally prefer a different >approach where you use a custom directive to control visibility. For >instance, > ><div id="portlet_CallDesk" >class="Dir::IsVisible.GetPage.p_has_access_calldesk_portal_calldesk"> > >What this requires you to do is implement the process_Directive method in >your model: > > //process any custom directives > public boolean processDirective(TemplateDirective td) { > if (td.getCommand().equals(IS_VISIBLE)) { > ...return true or false... > } else { > return true; > } > } > >THe advantage of this approach is that if you return false, no nodes below >this are processed (whereas in the approach where you return null or an >invisible component from getItem(), child nodes ARE still processed. So >there are obvious performance advantages in taking this approach. > >Let us know if that helps... > >Christian >---------------------------------------------- >Christian Cryder >Internet Architect, ATMReports.com >Project Chair, BarracudaMVC - http://barracudamvc.org >---------------------------------------------- >"Coffee? I could quit anytime, just not today" > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]]On Behalf Of Kirk Daries > > Sent: Friday, June 20, 2003 8:31 AM > > To: [email protected] > > Subject: [Barracuda] Rendering Bug? > > > > > > Hi Guys, > > > > I've come across a strange bug when one of my pages is rendered? > > > > Note the 'Dir::Get_Data.GetPage.p_has_access_calldesk_portal_calldesk' > > directive. > > This returns a BComponent if a user has rights to view the 'Div'. > > It returns null when validation fails. > > > > Now..onto the bug. > > > > If validation is successful... processing continues until the next > > directive. > > Namely, 'Dir::Get_Data.GetPage.p_has_access_calldesk_anonymous_call_log' > > This also evaluates based on the users security rights. > > However, if I return null, to prevent the node from rendering, Barracuda > > still > > renders the node? > > > > Anyone got any clue as to why this is happening? > > > > Regards > > KD > > > > <div id="portlet_CallDesk" class="portletTable > > Dir::Get_Data.GetPage.p_has_access_calldesk_portal_calldesk"> > > <div align="center" class="td_4">CallDesk</div> > > <div > > class="Dir::Get_Data.GetPage.p_has_access_calldesk_anonymous_call_log"> > > <span class="td_2"><a class="hlink" > > href="/barraframework/GetRequestPage.event?p_application=CallDesk">Log a > > Call</a></span> > > </div> > > > > <div > > class="Dir::Get_Data.GetPage.p_has_access_calldesk_my_calls_calculations" > > style="width: 75%;float:left;"> > > <span class="td_2 > > Dir::Get_Data.CallDeskEntry.p_mycalls_link">My > > Calls</span> > > </div> > > <div class="Transparent > > Dir::Get_Data.GetPage.p_has_access_calldesk_my_calls_calculations"> > > <span > > class="Dir::Get_Data.CallDeskEntry.p_mycalls_count">###</span> > > </div> > > </div> > > _______________________________________________ > > Barracuda mailing list > > [email protected] > > http://barracudamvc.org/lists/listinfo/barracuda > >_______________________________________________ >Barracuda mailing list >[email protected] >http://barracudamvc.org/lists/listinfo/barracuda >_______________________________________________ >Barracuda mailing list >[email protected] >http://barracudamvc.org/lists/listinfo/barracuda