No need to mess with renderComponent as there is a handy prebuilt component for such tasks...
PageLink A will render if someExpression evaluates to true (or any non null value). <li> <span jwcid="@Conditional" condition="ognl:someExpression"> <PageLink A> </span> <PageLink B></li> Geoff On 8/19/05, Waimun Yeow <[EMAIL PROTECTED]> wrote: > Thank you so much! > > I have another question related to super.renderComponent. It's actually not a > problem in my application right now, but I am anticipating that the following > scenario might occur some time later: > > Let's suppose: > > 1) there are two PageLink components defined in the component spec > > 2) in the component template, we have <li><PageLink A><PageLink B></li> > > Therefore, a call to super.renderComponent will render all these tags. If I > wanted to add a logic that selectively render <PageLink A> and also the > enclosing <li> tag, I would getComponent for <PageLink A> and invoke > render(). But what about the <li> or the other static stuff (if exists) in > the component template? > > What would be a correct way of doing this? > > Thanks again. > > -- > waimun > > On 8/19/05, Geoff Longman <[EMAIL PROTECTED]> wrote: > > override renderComponent, do your checks, then call super.renderComponent > > > > Geoff > > > > On 8/18/05, Waimun Yeow <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I am subclassing BaseComponent, and in the class renderComponent() > > > method, I would like to render the contents of the component's template > > > after some logic checks are performed and determined that the component > > > should render. > > > > > > How do I do that? I tried to use render() method but I get > > > stackoverflow exception. > > > > > > Please advise. > > > > > > Thanks. > > > > > > -- > > > waimun > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- The Spindle guy. http ://spindle.sf.net Get help with Spindle: http://lists.sourceforge.net/mailman/listinfo/spindle-user Announcement Feed: http://www.jroller.com/rss/glongman?catname=/Announcements Feature Updates: http://spindle.sf.net/updates --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
