You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Aleksey Baranyuk (JIRA)" <de...@tapestry.apache.org> on 2008/08/01 08:36:31 UTC
[jira] Created: (TAPESTRY-2546) Duplicate client id generation in
"Any" component
Duplicate client id generation in "Any" component
-------------------------------------------------
Key: TAPESTRY-2546
URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
Project: Tapestry
Issue Type: Bug
Components: Core Components
Affects Versions: 5.0.13
Reporter: Aleksey Baranyuk
Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
<div t:type="any" t:mixins="myMixin1">
some content
<div>
And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
<div t:type="any" t:mixins="myMixin2">
some content
<div>
<div t:type="any" t:mixins="myMixin2">
some content
<div>
<div t:type="any" t:mixins="myMixin2">
some content
<div>
Mixins are like this:
@InjectContainer
private ClientElement element;
...
String id=element.getClientId();
This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
<div id="any">
</div>
<div id="any">
</div>
<div id="any_0">
</div>
<div id="any_1">
</div>
I've found how "Any" component generated id for div element. And i think the solution is:
Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
===================================================================
--- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
+++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
@@ -72,7 +72,7 @@
if (uniqueId == null)
{
uniqueId = renderSupport.allocateClientId(clientId);
- anyElement.forceAttributes("id", clientId);
+ anyElement.forceAttributes("id", uniqueId);
}
return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2546) Duplicate client id generation in
"Any" component
Posted by "Aleksey Baranyuk (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Baranyuk updated TAPESTRY-2546:
---------------------------------------
Attachment: (was: Any.java.patch)
> Duplicate client id generation in "Any" component
> -------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2546) Duplicate client id generation in
"Any" component
Posted by "Aleksey Baranyuk (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Baranyuk updated TAPESTRY-2546:
---------------------------------------
Comment: was deleted
> Duplicate client id generation in "Any" component
> -------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
> Attachments: Any.java.patch
>
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2546) Duplicate client id generation in
"Any" component
Posted by "Aleksey Baranyuk (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Baranyuk updated TAPESTRY-2546:
---------------------------------------
Attachment: Any.java.patch
This is patch I have generated by svn
> Duplicate client id generation in "Any" component
> -------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
> Attachments: Any.java.patch
>
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-2546) Any component always outputs the
same id attribute, rather than a unique id attribute for each render
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-2546.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.15
> Any component always outputs the same id attribute, rather than a unique id attribute for each render
> -----------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
> Assignee: Howard M. Lewis Ship
> Fix For: 5.0.15
>
> Attachments: Any.java.patch
>
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2546) Any component always outputs the
same id attribute, rather than a unique id attribute for each render
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAPESTRY-2546:
-------------------------------------------
Summary: Any component always outputs the same id attribute, rather than a unique id attribute for each render (was: Duplicate client id generation in "Any" component)
> Any component always outputs the same id attribute, rather than a unique id attribute for each render
> -----------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
> Assignee: Howard M. Lewis Ship
> Fix For: 5.0.15
>
> Attachments: Any.java.patch
>
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Updated: (TAPESTRY-2546) Duplicate client id generation in
"Any" component
Posted by "Aleksey Baranyuk (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aleksey Baranyuk updated TAPESTRY-2546:
---------------------------------------
Attachment: Any.java.patch
this is patch I have generated by svn
> Duplicate client id generation in "Any" component
> -------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
> Attachments: Any.java.patch
>
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Assigned: (TAPESTRY-2546) Duplicate client id generation in
"Any" component
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-2546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAPESTRY-2546:
----------------------------------------------
Assignee: Howard M. Lewis Ship
> Duplicate client id generation in "Any" component
> -------------------------------------------------
>
> Key: TAPESTRY-2546
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2546
> Project: Tapestry
> Issue Type: Bug
> Components: Core Components
> Affects Versions: 5.0.13
> Reporter: Aleksey Baranyuk
> Assignee: Howard M. Lewis Ship
> Attachments: Any.java.patch
>
>
> Hello! I've found a problem in component "Any". If I use "Any" component in different components i get duplicate client id. For example, I have component "Header". And I use "Any" in tml like:
> <div t:type="any" t:mixins="myMixin1">
> some content
> <div>
> And I have a component "Dashboard". It contains "Header" and uses "Any" component like:
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> <div t:type="any" t:mixins="myMixin2">
> some content
> <div>
> Mixins are like this:
> @InjectContainer
> private ClientElement element;
> ...
> String id=element.getClientId();
> This id is realy inique, but generated Ids for div element in "Any" component are duplicate. I have output html like this:
> <div id="any">
> </div>
> <div id="any">
> </div>
> <div id="any_0">
> </div>
> <div id="any_1">
> </div>
> I've found how "Any" component generated id for div element. And i think the solution is:
> Index: tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java
> ===================================================================
> --- tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (revision 681375)
> +++ tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Any.java (working copy)
> @@ -72,7 +72,7 @@
> if (uniqueId == null)
> {
> uniqueId = renderSupport.allocateClientId(clientId);
> - anyElement.forceAttributes("id", clientId);
> + anyElement.forceAttributes("id", uniqueId);
> }
>
> return uniqueId;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org