[ 
https://issues.apache.org/struts/browse/TILES-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45120#action_45120
 ] 

Allan Schweitz commented on TILES-336:
--------------------------------------

Yes that's the way I do it now using <c:if> and <c:choose>, but if you have 
quite a few putAttribute tags that will be a lot of <c:if> or <c:choose>. In 
the past I have worked with Zope/Plone where they have templating mechanism 
similar to tiles. They have this default value mechanism and it's soo 
convenient keeping the pages very clean. However, even if it just gets 
implemented for insertAttribute, I would already be a happy camper.

> The ability to assign some default value if an attribute is not present
> -----------------------------------------------------------------------
>
>                 Key: TILES-336
>                 URL: https://issues.apache.org/struts/browse/TILES-336
>             Project: Tiles
>          Issue Type: New Feature
>          Components: tiles-jsp (jsp support)
>         Environment: Any
>            Reporter: Allan Schweitz
>            Priority: Minor
>
> When I use the putAttribute tag in a jsp page I would like to give it a 
> default value if it cannot find the specified attribute. This could be done 
> by maybe place the default content in the body of the tag or by having a 
> special default attribute added to the tag. Of course we could use some 
> conditional statements to achieve the same, but if it could be automatically 
> handled by the tag that would result in much cleaner code.
> Thanks,
> Allan

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to