You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Willis Blackburn (JIRA)" <ji...@apache.org> on 2011/01/16 13:18:46 UTC

[jira] Created: (WICKET-3338) Please provide a LabelLink or something similar

Please provide a LabelLink or something similar
-----------------------------------------------

                 Key: WICKET-3338
                 URL: https://issues.apache.org/jira/browse/WICKET-3338
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.5-M3
            Reporter: Willis Blackburn


This pattern occurs so frequently that Wicket should support it directly:

Link myLink = new Link("myLink") { ... }
myLink.add(new Label("my Label", "A Link"));
add(myLink);

becomes:

LabelLink myLink = new Link("myLink", "A Link");

Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.

I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?

I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.



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


[jira] Issue Comment Edited: (WICKET-3338) Provide a way to set Link's label/body without using Label child

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985375#action_12985375 ] 

Martin Grigorov edited comment on WICKET-3338 at 1/24/11 4:32 AM:
------------------------------------------------------------------

AbstractLink.setBody() added with r1062475.
Now all Link implementations can provide this model for their body.

      was (Author: mgrigorov):
    AbstractLink.setBodyModel() added with r1062475.
Now all Link implementations can provide this model for their body.
  
> Provide a way to set Link's label/body without using Label child
> ----------------------------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Willis Blackburn
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC2
>
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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


[jira] Commented: (WICKET-3338) Provide a way to set Link's label/body without using Label child

Posted by "Willis Blackburn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985385#action_12985385 ] 

Willis Blackburn commented on WICKET-3338:
------------------------------------------

That's great, thanks!

Should get rid of "label" from ExternalLink in that case.

W







> Provide a way to set Link's label/body without using Label child
> ----------------------------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Willis Blackburn
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC2
>
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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


[jira] Assigned: (WICKET-3338) Please provide a LabelLink or something similar

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3338:
---------------------------------------

    Assignee: Martin Grigorov

> Please provide a LabelLink or something similar
> -----------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Willis Blackburn
>            Assignee: Martin Grigorov
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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


[jira] Resolved: (WICKET-3338) Please provide a LabelLink or something similar

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3338.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC2

AbstractLink.setBodyModel() added with r1062475.
Now all Link implementations can provide this model for their body.

> Please provide a LabelLink or something similar
> -----------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Willis Blackburn
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC2
>
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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


[jira] Updated: (WICKET-3338) Please provide a LabelLink or something similar

Posted by "Willis Blackburn (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willis Blackburn updated WICKET-3338:
-------------------------------------

    Description: 
This pattern occurs so frequently that Wicket should support it directly:

Link myLink = new Link("myLink") { ... }
myLink.add(new Label("my Label", "A Link"));
add(myLink);

becomes:

LabelLink myLink = new LabelLink("myLink", "A Link");

Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.

I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?

I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.



  was:
This pattern occurs so frequently that Wicket should support it directly:

Link myLink = new Link("myLink") { ... }
myLink.add(new Label("my Label", "A Link"));
add(myLink);

becomes:

LabelLink myLink = new Link("myLink", "A Link");

Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.

I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?

I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.




Corrected a typo.

> Please provide a LabelLink or something similar
> -----------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Willis Blackburn
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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


[jira] Updated: (WICKET-3338) Provide a way to set Link's label/body without using Label child

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3338:
------------------------------------

    Affects Version/s:     (was: 1.5-M3)
                       1.5-RC1
              Summary: Provide a way to set Link's label/body without using Label child  (was: Please provide a LabelLink or something similar)

Update the ticket title to be more clear for the changelog.

> Provide a way to set Link's label/body without using Label child
> ----------------------------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Willis Blackburn
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC2
>
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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


[jira] Commented: (WICKET-3338) Provide a way to set Link's label/body without using Label child

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985517#action_12985517 ] 

Igor Vaynberg commented on WICKET-3338:
---------------------------------------

needs a public setter for the label.


> Provide a way to set Link's label/body without using Label child
> ----------------------------------------------------------------
>
>                 Key: WICKET-3338
>                 URL: https://issues.apache.org/jira/browse/WICKET-3338
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-RC1
>            Reporter: Willis Blackburn
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC2
>
>
> This pattern occurs so frequently that Wicket should support it directly:
> Link myLink = new Link("myLink") { ... }
> myLink.add(new Label("my Label", "A Link"));
> add(myLink);
> becomes:
> LabelLink myLink = new LabelLink("myLink", "A Link");
> Obviously the second parameter could be a string or an iModel<?> that would be converted to a string.
> I see that there have been some discussions about this before;  unfortunately apparently the thread has been deleted.  But whatever arguments there are against LabelLink are IMHO defeated by the fact that ExternalLink *does* have a label model!  So why are labels okay for external links but not for internal links?
> I actually think that ExternalLink should have its label removed;  there are many cases in which external links do not have labels, and this would save several bytes per label.  But there should be a LabelExternalLink as well.

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