[
https://issues.apache.org/jira/browse/TAPESTRY-2470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fritz Pröbstle updated TAPESTRY-2470:
-------------------------------------
Description:
I have a Page Uebersicht with uses a Component "common/kopf" by specifiing
only t:type="common/kopf" with *NO* t:id .
----------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div t:type="common/kopf"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
body_id="literal:startseite"
>
page is empty
</div><!--end page -->
-------------------------------
In the Page-class I reference the "common/Kopf" by type , which works *BUT*
generates the following error:
[ERROR] Uebersicht Embedded component(s) kopf are defined within component
class .....pages.Uebersicht, but are not present in the component template.
----------------
public class Uebersicht {
@Component ( type="common/kopf")
private Kopf kopf;
...
}
---------------
The error generation is emitted by
PageLoaderProcessor.loadTemplateForComponent ( see my comments inside the code
below )
----------------
for (String id : loadingComponentModel.getEmbeddedComponentIds()) //
getEmbeddedComponentIds returns {"kopf"}
// -I expect it to return {"common/kopf" } for a component
in the subpackage "common" of the "tapestry.app-package"
embeddedIds.put(id, true);
idAllocator.clear();
for (String id : template.getComponentIds()) // getComponentIds
returns *ONLY* ids which are explictly set by t:id- implicit id which are
derived from t::type are missing
// in this case I expect "common/kopf" inside the result
{
idAllocator.allocateId(id);
embeddedIds.remove(id);
}
if (!embeddedIds.isEmpty())
logger.error(ServicesMessages.embeddedComponentsNotInTemplate(embeddedIds.keySet(),
componentClassName));
-------------------
was:
I have a Page Uebersicht with uses a Component "common/kopf" by specifieing
only t:type="common/kopf" with *NO* t:id .
----------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div t:type="common/kopf"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
body_id="literal:startseite"
>
page is empty
</div><!--end page -->
-------------------------------
In the Page-class I reference the "common/Kopf" by type , which works *BUT*
generates the following error:
[ERROR] Uebersicht Embedded component(s) kopf are defined within component
class .....pages.Uebersicht, but are not present in the component template.
----------------
public class Uebersicht {
@Component ( type="common/kopf")
private Kopf kopf;
...
}
---------------
The error generation is emitted by
PageLoaderProcessor.loadTemplateForComponent ( see the comments below)
----------------
for (String id : loadingComponentModel.getEmbeddedComponentIds()) //
getEmbeddedComponentIds returns {"kopf"}
// -I expect it to return {"common/kopf" } for a component
in the subpackage "common" of the "tapestry.app-package"
embeddedIds.put(id, true);
idAllocator.clear();
for (String id : template.getComponentIds()) // getComponentIds
returns *ONLY* ids which are explictly set by t:id- implicit id which are
derived from t::type are missing
// in this case I expect "common/kopf" inside the result
{
idAllocator.allocateId(id);
embeddedIds.remove(id);
}
if (!embeddedIds.isEmpty())
logger.error(ServicesMessages.embeddedComponentsNotInTemplate(embeddedIds.keySet(),
componentClassName));
-------------------
> Wrong error message: [ERROR] Uebersicht Embedded component(s) kopf are
> defined within component class .....pages.Uebersicht, but are not present in
> the component template.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAPESTRY-2470
> URL: https://issues.apache.org/jira/browse/TAPESTRY-2470
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.13
> Reporter: Fritz Pröbstle
> Priority: Minor
>
> I have a Page Uebersicht with uses a Component "common/kopf" by specifiing
> only t:type="common/kopf" with *NO* t:id .
> ----------------------------------
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <div t:type="common/kopf"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
> body_id="literal:startseite"
> >
> page is empty
> </div><!--end page -->
> -------------------------------
> In the Page-class I reference the "common/Kopf" by type , which works *BUT*
> generates the following error:
> [ERROR] Uebersicht Embedded component(s) kopf are defined within component
> class .....pages.Uebersicht, but are not present in the component template.
> ----------------
> public class Uebersicht {
>
>
> @Component ( type="common/kopf")
> private Kopf kopf;
> ...
> }
> ---------------
> The error generation is emitted by
> PageLoaderProcessor.loadTemplateForComponent ( see my comments inside the
> code below )
> ----------------
> for (String id : loadingComponentModel.getEmbeddedComponentIds())
> // getEmbeddedComponentIds returns {"kopf"}
>
> // -I expect it to return {"common/kopf" } for a
> component in the subpackage "common" of the "tapestry.app-package"
> embeddedIds.put(id, true);
> idAllocator.clear();
> for (String id : template.getComponentIds()) // getComponentIds
> returns *ONLY* ids which are explictly set by t:id- implicit id which are
> derived from t::type are missing
>
> // in this case I expect "common/kopf" inside the result
> {
> idAllocator.allocateId(id);
> embeddedIds.remove(id);
> }
> if (!embeddedIds.isEmpty())
>
> logger.error(ServicesMessages.embeddedComponentsNotInTemplate(embeddedIds.keySet(),
> componentClassName));
> -------------------
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]