[
https://issues.apache.org/jira/browse/TAP5-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269309#comment-14269309
]
Nourredine K. commented on TAP5-2423:
-------------------------------------
I think I got you. Actually, my use case was working in 5.3.7 because I was
using the
[UNKNOWN_COMPONENT_ID_CHECK_ENABLED|http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/SymbolConstants.html#UNKNOWN_COMPONENT_ID_CHECK_ENABLED]
symbol. But, now, as this symbol is ignored, my issue has been highlighted and
the
[ComponentIdValidator|https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java;h=c640158666493ebc669ff561de25b62a9236f54a;hb=HEAD#l72]
became fully operational. The component id check is done from the current
component/page's ComponentResources and not on its potential parents.
Don't you think that the
[ComponentResources#getEmbeddedComponent(String)|http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/ComponentResources.html#getEmbeddedComponent%28java.lang.String%29]
called in
[ComponentIdValidator|https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java;h=c640158666493ebc669ff561de25b62a9236f54a;hb=HEAD#l88](l.88),
or the
[ComponentIdValidator|https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java;h=c640158666493ebc669ff561de25b62a9236f54a;hb=HEAD#l72]
itself should also seek in parent's resource ?
> Wrong component id check for inherited pages/components
> -------------------------------------------------------
>
> Key: TAP5-2423
> URL: https://issues.apache.org/jira/browse/TAP5-2423
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Nourredine K.
> Labels: easytest
> Attachments: sample.zip
>
>
> When page B inherits page A (providing its own template) and A implements
> some event handler methods on some components, displaying page B throws an
> TapestryException that claims page B does not contain those components in its
> template.
> I think the pb occurs in the
> [ComponentIdValidator#validate(ComponentResources)|https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java;h=c640158666493ebc669ff561de25b62a9236f54a;hb=HEAD#l91]
> method because, we only check in the current ComponentResource and never in
> its parents if they exist.
> Remarks :
> - Occurs with tapestry 5.4-beta-22
> - Symbol tapestry.compatibility.unknown-component-id-check-enabled can't be
> used (no more used in 5.4-beta-22)
> Regards,
> Nourredine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)