You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Craig McIlwee (JIRA)" <ji...@apache.org> on 2007/12/04 15:36:43 UTC

[jira] Created: (WICKET-1206) Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]

Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]
------------------------------------------------------------------------------

                 Key: WICKET-1206
                 URL: https://issues.apache.org/jira/browse/WICKET-1206
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.3.0-rc1
            Reporter: Craig McIlwee
            Priority: Minor
             Fix For: 1.4.0-alpha


When using the org.apache.wicket.markup.repeater.data.DataView, each row in the table has the same wicket:id.  I am trying to use the TagTester to ensure that each <tr> tag has the correct attributes, in this case class="odd" and class="even".  Since getTagByWicketId and getTagById only return a single TagTester, a tester for the same markup tag is returned each time, making it impossible to test any row other than the first.

Example HTML output:

<table>
	<tr class="even" wicket:id="table">   <--------- TagTester returned is always for this tag
	</tr>
        <tr class="odd" wicket:id="table">
	</tr>
        <tr class="even" wicket:id="table">
	</tr>
        <tr class="odd" wicket:id="table">
	</tr>
        <tr class="even" wicket:id="table">
	</tr>
</table>


Proposed solution:  change the return value to TagTester[] so that one call will return all of the tags with that wicket:id

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


[jira] Updated: (WICKET-1206) Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]

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

Frank Bille Jensen updated WICKET-1206:
---------------------------------------

    Fix Version/s:     (was: 1.4-M1)
                   1.5-M1

> Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-1206
>                 URL: https://issues.apache.org/jira/browse/WICKET-1206
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Craig McIlwee
>            Assignee: Frank Bille Jensen
>            Priority: Minor
>             Fix For: 1.5-M1
>
>         Attachments: MultipleTagTester.java
>
>
> When using the org.apache.wicket.markup.repeater.data.DataView, each row in the table has the same wicket:id.  I am trying to use the TagTester to ensure that each <tr> tag has the correct attributes, in this case class="odd" and class="even".  Since getTagByWicketId and getTagById only return a single TagTester, a tester for the same markup tag is returned each time, making it impossible to test any row other than the first.
> Example HTML output:
> <table>
> 	<tr class="even" wicket:id="table">   <--------- TagTester returned is always for this tag
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
> </table>
> Proposed solution:  change the return value to TagTester[] so that one call will return all of the tags with that wicket:id

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


[jira] Assigned: (WICKET-1206) Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]

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

Frank Bille Jensen reassigned WICKET-1206:
------------------------------------------

    Assignee: Frank Bille Jensen

> Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-1206
>                 URL: https://issues.apache.org/jira/browse/WICKET-1206
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Craig McIlwee
>            Assignee: Frank Bille Jensen
>            Priority: Minor
>             Fix For: 1.4.0-M1
>
>
> When using the org.apache.wicket.markup.repeater.data.DataView, each row in the table has the same wicket:id.  I am trying to use the TagTester to ensure that each <tr> tag has the correct attributes, in this case class="odd" and class="even".  Since getTagByWicketId and getTagById only return a single TagTester, a tester for the same markup tag is returned each time, making it impossible to test any row other than the first.
> Example HTML output:
> <table>
> 	<tr class="even" wicket:id="table">   <--------- TagTester returned is always for this tag
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
> </table>
> Proposed solution:  change the return value to TagTester[] so that one call will return all of the tags with that wicket:id

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


[jira] Resolved: (WICKET-1206) Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]

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

Juergen Donnerstag resolved WICKET-1206.
----------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.5-M1)
                   1.4-RC2
         Assignee: Juergen Donnerstag  (was: Frank Bille Jensen)

applied. Thanks

> Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-1206
>                 URL: https://issues.apache.org/jira/browse/WICKET-1206
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Craig McIlwee
>            Assignee: Juergen Donnerstag
>            Priority: Minor
>             Fix For: 1.4-RC2
>
>         Attachments: MultipleTagTester.java
>
>
> When using the org.apache.wicket.markup.repeater.data.DataView, each row in the table has the same wicket:id.  I am trying to use the TagTester to ensure that each <tr> tag has the correct attributes, in this case class="odd" and class="even".  Since getTagByWicketId and getTagById only return a single TagTester, a tester for the same markup tag is returned each time, making it impossible to test any row other than the first.
> Example HTML output:
> <table>
> 	<tr class="even" wicket:id="table">   <--------- TagTester returned is always for this tag
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
> </table>
> Proposed solution:  change the return value to TagTester[] so that one call will return all of the tags with that wicket:id

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


[jira] Updated: (WICKET-1206) Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]

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

Craig McIlwee updated WICKET-1206:
----------------------------------

    Attachment: MultipleTagTester.java

This may help...  Shortly after posting this issue I created a class to do what I needed.  It's basically just a copy of the createTagsByAttribute method with a few changes to get all tags.  I imagine you can probably just copy/paste this into the TagTester class.

> Change BaseWicketTester.getTagByXXX return value from TagTester to TagTester[]
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-1206
>                 URL: https://issues.apache.org/jira/browse/WICKET-1206
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Craig McIlwee
>            Assignee: Frank Bille Jensen
>            Priority: Minor
>             Fix For: 1.4.0-M1
>
>         Attachments: MultipleTagTester.java
>
>
> When using the org.apache.wicket.markup.repeater.data.DataView, each row in the table has the same wicket:id.  I am trying to use the TagTester to ensure that each <tr> tag has the correct attributes, in this case class="odd" and class="even".  Since getTagByWicketId and getTagById only return a single TagTester, a tester for the same markup tag is returned each time, making it impossible to test any row other than the first.
> Example HTML output:
> <table>
> 	<tr class="even" wicket:id="table">   <--------- TagTester returned is always for this tag
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
>         <tr class="odd" wicket:id="table">
> 	</tr>
>         <tr class="even" wicket:id="table">
> 	</tr>
> </table>
> Proposed solution:  change the return value to TagTester[] so that one call will return all of the tags with that wicket:id

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