tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fritz Pröbstle (JIRA) <...@tapestry.apache.org>
Subject [jira] Updated: (TAPESTRY-2470) Wrong error message: [ERROR] Uebersicht Embedded component(s) kopf are defined within component class .....pages.Uebersicht, but are not present in the component template.
Date Fri, 20 Jun 2008 09:15:45 GMT

     [ https://issues.apache.org/jira/browse/TAPESTRY-2470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Fritz Pröbstle updated TAPESTRY-2470:
-------------------------------------

    Description: 
Abstract: Error message not correct
Workaround: Specify t:id for the component
Problem: Wrong error message confuses user

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 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));
-------------------



> 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
>
> Abstract: Error message not correct
> Workaround: Specify t:id for the component
> Problem: Wrong error message confuses user
> 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));
> -------------------
>  

-- 
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


Mime
View raw message