You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Steve Eynon (JIRA)" <ji...@apache.org> on 2012/07/01 12:41:43 UTC
[jira] [Updated] (TAP5-1932) Exposing the Link in the EventLink
component
[ https://issues.apache.org/jira/browse/TAP5-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Eynon updated TAP5-1932:
------------------------------
Attachment: Link.patch
I'm just asking for the link field in AbstractLink to be set *before* it is written out. That way I can alter it.
The LinkTransformer API is not appropriate in this case for I need to target a particular link component, not a sweeping set of URLs. A mixin would be perfect as the intent would be clear and documented in the .tml.
> In addition, protected fields are source of problems
Easy, I was just trying to be helpful!
Here, the attached patch uses a setter instead. It's not the prettiest solution, but one with the least amount of changes (~3 lines). I think the code around the AbstractLink could be a bit cleaner as a whole, i.e. the way the link field is set as a by-product of the writeLink() function isn't too clear.
> Exposing the Link in the EventLink component
> --------------------------------------------
>
> Key: TAP5-1932
> URL: https://issues.apache.org/jira/browse/TAP5-1932
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.3.3
> Reporter: Steve Eynon
> Priority: Trivial
> Attachments: Link.patch
>
>
> I would like to alter the Link in an EventLink via a Mixin - specifically, remove the LoopBack parameter.
> To do this, the "AbstractLink.link" field needs to be set *before* the link is rendered and a simple change to org.apache.tapestry5.corelib.base.AbstractComponentEventLink would accomplish this:
> protected void setupRender() {
> super.link = createLink(context);
> }
> AbstractLink.link would also need to become protected.
> I believe the above to be a small yet useful enhancement to the Link Component API.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira