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/05/16 05:06:49 UTC

[jira] [Created] (TAP5-1932) Exposing the Link in the EventLink component

Steve Eynon created TAP5-1932:
---------------------------------

             Summary: 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


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

        

Re: [jira] [Created] (TAP5-1932) Exposing the Link in the EventLink component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
> I would like to alter the Link in an EventLink via a Mixin -  
> specifically, remove the LoopBack parameter.

-1 from me. You can use the LinkTransformer API for that or even DOM  
rewriting. In addition, protected fields are source of problems are almost  
never used in Tapestry code.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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


[jira] [Updated] (TAP5-1932) Exposing the Link in the EventLink component

Posted by "Steve Eynon (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Commented] (TAP5-1932) Exposing the Link in the EventLink component

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276666#comment-13276666 ] 

Thiago H. de Paula Figueiredo commented on TAP5-1932:
-----------------------------------------------------


-1 from me. You can use the LinkTransformer API for that or even DOM  
rewriting. In addition, protected fields are source of problems are almost  
never used in Tapestry code.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

                
> 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
>
> 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

       

[jira] [Commented] (TAP5-1932) Exposing the Link in the EventLink component

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276666#comment-13276666 ] 

Thiago H. de Paula Figueiredo commented on TAP5-1932:
-----------------------------------------------------


-1 from me. You can use the LinkTransformer API for that or even DOM  
rewriting. In addition, protected fields are source of problems are almost  
never used in Tapestry code.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

                
> 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
>
> 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

       

[jira] [Updated] (TAP5-1932) Exposing the Link in the EventLink component

Posted by "Steve Eynon (JIRA)" <ji...@apache.org>.
     [ 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