You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org> on 2007/04/25 22:44:15 UTC

[jira] Created: (WICKET-502) Handle

Handle <button> in Button#onComponentTag()
------------------------------------------

                 Key: WICKET-502
                 URL: https://issues.apache.org/jira/browse/WICKET-502
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.3
            Reporter: Jean-Baptiste Quenot


With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Commented: (WICKET-502) Handle

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492004 ] 

Johan Compagner commented on WICKET-502:
----------------------------------------

shouldn't a <button> have a Label component inside it that has the body value?
Because a <button> is the same as a <a> in html
and links must have a label inside them to display the body.
I find it perfectly fine that the button is direclty also the label (i never really liked the extra label inside a link but i know there are also pro's for that, but a own LabelLink is also good) 

Also why must skipToMatchingCloseTag() be public?? Why isn't that the case with a Label?? (which also just writes a body tag and i guess replacing what is as an example in html..)


> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Assigned To: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Assigned: (WICKET-502) Handle

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

Jean-Baptiste Quenot reassigned WICKET-502:
-------------------------------------------

    Assignee: Jean-Baptiste Quenot

> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Assigned To: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Resolved: (WICKET-502) Handle

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

Jean-Baptiste Quenot resolved WICKET-502.
-----------------------------------------

    Resolution: Won't Fix

Button is for <input> only

> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Assigned To: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Updated: (WICKET-502) Handle

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

Jean-Baptiste Quenot updated WICKET-502:
----------------------------------------

    Component/s: wicket

> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Assigned To: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Updated: (WICKET-502) Handle

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

Jean-Baptiste Quenot updated WICKET-502:
----------------------------------------

    Attachment: 20070425-WICKET-502-Button-onComponentTag.txt

This patch fixes the issue, but requires to change method visibility of MarkupStream#skipToMatchingCloseTag() from private to public

> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Commented: (WICKET-502) Handle

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492048 ] 

Jean-Baptiste Quenot commented on WICKET-502:
---------------------------------------------

I used Link instead.

> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Assigned To: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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


[jira] Commented: (WICKET-502) Handle

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492007 ] 

Johan Compagner commented on WICKET-502:
----------------------------------------

try
+		{
+			String value = getModelObjectAsString();
+			if (! openTag.getName().equals("input") && value != null && !"".equals(value))
+			{
+				getResponse().write(value);
+			}
+		}
+		catch (Exception e)
+		{
+			// ignore.
+		}
 
+		markupStream.skipToMatchingCloseTag(openTag);

can't that be this:

if (openTag.getName().equals("button"))
{
replaceComponentTagBody(markupStream, openTag, getModelObjectAsString());
}



> Handle <button> in Button#onComponentTag()
> ------------------------------------------
>
>                 Key: WICKET-502
>                 URL: https://issues.apache.org/jira/browse/WICKET-502
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3
>            Reporter: Jean-Baptiste Quenot
>         Assigned To: Jean-Baptiste Quenot
>         Attachments: 20070425-WICKET-502-Button-onComponentTag.txt
>
>
> With the <button> tag, the button label must be expressed as a child node, not as a "value" attribute.

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