[ 
https://issues.apache.org/jira/browse/TAP5-1400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014290#comment-13014290
 ] 

Howard M. Lewis Ship commented on TAP5-1400:
--------------------------------------------

Seems like something that could be done with a Mixin.

> Change AbstractLink (and its subclasses) to optionally surround rendered text 
> with a tag (e.g. span) when disabled
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1400
>                 URL: https://issues.apache.org/jira/browse/TAP5-1400
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: nillehammer
>            Priority: Minor
>
> I frequently use Tapetry's Link components (PageLink, EventLink, ActionLink) 
> to build up vertical menus. I like to style the rendered a-Tags with 
> "display:block" by assigning an appropriate css-Class. This expands the area 
> where the link is clickeable and makes a line break after the rendered link. 
> The latter spares me from surrounding the a-Tags with an additional div. When 
> using the disabled-Parameter of the Link compontents the text in the body is 
> rendered as is, leaving me without any tags to apply styles to. So to ensure 
> the line break I would have to insert tags myself into the template.
> I was wondering, if it were possible to add an optional parameter to the Link 
> compontents to make them render a tag around the text and apply the informal 
> parameters "style" and "class" to them. I can think of a boolean value or a 
> String value
> /**
>   * When set to true, this parameter causes Link to render a a span-Tag 
> around the text that is rendered when link is disabled. When set to false 
> (default), the text will be rendered as is.
>  **/
> @Parameter(defaultPrefix = BindingConstants.LITERAL, required = false, 
> allowNull = true)
> private boolean renderSpan;
> Or second alternative
> /**
>   * When set to a non null value, the provided string will be used as a tag 
> that is rendered around the text that is rendered when link is disabled. When 
> set to null (default) or empty String, the text will be rendered as is.
>   **/
> @Parameter(defaultPrefix = BindingConstants.LITERAL, required = false, 
> allowNull = true)
> private String disabledTag;
> This way the change would be backwards compatible.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to