tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B.S.Navin" <bsna...@effigent.net>
Subject Re: [T5] If component / else
Date Tue, 16 Jan 2007 11:36:29 GMT
I second Nick's idea. It may have many other uses too - like for  
example - applying granular security becomes easy. Just include the  
condition to check for security in the renderif.

Although, there may still be the need for an elseif, as otherwise,  
the conditions of the previous if may need to be repeated here in the  
negative.

- Navin

On 16-Jan-07, at 4:21 PM, Nick Westgate wrote:

> After rereading the posts on this, my previous post seems redundant.
> Jesse's Java nesting example is sufficient to explain why the nesting
> feels unnatural. (Not to diminish Howard's amazing ability to re- 
> invent!)
>
> Kent's "then" parameter is a great idea, but the nesting seems  
> excessive.
> I still think Tapestry already had this one right, yet again. ;-)
>
> BUT ... speaking of nesting, I was reminded of a thought I've had on
> occasion when adding conditionals into a template. It would be great
> if all components had a conditional attribute - no need to nest more.
>
> eg.
>     <a t:id="deleteLink">...</a>
> ->
>     <a t:id="deleteLink" t:renderif="condition">...</a>
>
> Obviously this is only useful in certain situations, but for complex
> templates the less unnecessary nesting of tags the better.
>
> Just thought I'd bring this up while the pot's on the stove.
> Anyone else ever wish for this, or think it might be practical?
>
> Cheers,
> Nick.
>
>
> Nick Westgate wrote:
> > Jesse's example looks better when you need to add interceding  
> content.
> > The nesting of the else parameter impedes a common use case for  
> else,
> > and if there's no Else component, we end up 'negatively'  
> violating DRY:
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message