[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (2) {toc} {children} {include:General Questions} {include:Templating and Markup FAQ} {include:Page And Component Classes FAQ} {include:Forms and Form Components} {include:Link Components FAQ} {include:_javascript_ FAQ} {include:Ajax Components FAQ} {include:Injection FAQ} {include:Tapestry Inversion of Control FAQ} {include:Integration with existing applications} {include:Specific Errors FAQ} {include:Limitations} {include:Hibernate Support FAQ} {include:Maven Support FAQ} {htmlcomment}Update here after adding new headings to child pages. Forces a rebuild of the main TOC. ... Full Content General QuestionsTemplating and Markup FAQPage And Component Classes FAQForms and Form ComponentsLink Components FAQ_javascript_ FAQAjax Components FAQInjection FAQTapestry Inversion of Control FAQIntegration with existing applicationsLimitationsSpecific Errors FAQHibernate Support FAQMaven Support FAQ Change Notification Preferences View Online | View Changes
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (2) {toc} {children} {include:General Questions} {include:Templating and Markup FAQ} {include:Page And Component Classes FAQ} {include:Forms and Form Components} {include:Link Components FAQ} {include:_javascript_ FAQ} {include:Ajax Components FAQ} {include:Injection FAQ} {include:Tapestry Inversion of Control FAQ} {include:Integration with existing applications} {include:Specific Errors FAQ} {include:Limitations} {include:Hibernate Support FAQ} {include:Maven Support FAQ} {htmlcomment}Update here after adding new headings to child pages. Forces a rebuild of the main TOC. ... Full Content General QuestionsTemplating and Markup FAQPage And Component Classes FAQForms and Form ComponentsLink Components FAQ_javascript_ FAQAjax Components FAQInjection FAQTapestry Inversion of Control FAQIntegration with existing applicationsLimitationsSpecific Errors FAQHibernate Support FAQMaven Support FAQ Change Notification Preferences View Online | View Changes
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Ulrich Stärk Changes (3) {toc} {include:General Questions} {include:Limitations} {children} {include:Templating and Markup} {include:Page And Component Classes} {include:Forms and Form Components} {include:Link Components FAQ} {include:Ajax Components} {include:Injection FAQ} {include:Tapestry Inversion of Control Container} {include:Integration with existing applications} {include:Specific Errors} Full Content Ajax ComponentsForms and Form ComponentsGeneral QuestionsInjection FAQIntegration with existing applicationsLimitationsLink Components FAQPage And Component ClassesSpecific ErrorsTapestry Inversion of Control ContainerTemplating and Markup Change Notification Preferences View Online | View Changes
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (2) {children:all=true|excerpt=true} h1. Contents {toc} h1. Frequently Asked Questions {include:Ajax Components} {include:General Questions} {include:Integration with existing applications} {include:Limitations} {include:Page And Component Classes} {include:Specific Errors} {include:Tapestry Inversion of Control Container} {include:Templating and Markup} Full Content Contents Contents Frequently Asked Questions Do I have to specify both id and t:id for Zone components? How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? Why do I need to define an interface for my services? Why can't I just use the class itself? Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? Frequently Asked Questions Do I have to specify both id and t:id for Zone components? The examples for the Zone component (in the Component Reference) consistently specify both id and t:id and this is probably a good idea. Generally speaking, if you don't specify the client-side id (the id attribute), it will be the same as the Tapestry component id (t:id). However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rendering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapestry component ids in nested components may also clash. The point is, to be sure, specify the exact client id. This will be the value for the zone parameter of the triggering component (such as a Form, PageLink, ActionLink, etc.). How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (3) h1. Contents {toc} h1. Frequently Asked Questions {include:Ajax Components} {include:General Questions} ... {include:Tapestry Inversion of Control Container} {include:Templating and Markup} --- {display-footnotes} Full Content Do I have to specify both id and t:id for Zone components? General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? Why do I need to define an interface for my services? Why can't I just use the class itself? Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? Do I have to specify both id and t:id for Zone components? The examples for the Zone component (in the Component Reference) consistently specify both id and t:id and this is probably a good idea. Generally speaking, if you don't specify the client-side id (the id attribute), it will be the same as the Tapestry component id (t:id). However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rendering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapestry component ids in nested components may also clash. The point is, to be sure, specify the exact client id. This will be the value for the zone parameter of the triggering component (such as a Form, PageLink, ActionLink, etc.). General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (2) {toc} {include:Ajax Components} {include:General Questions} {include:Ajax Components} {include:Integration with existing applications} {include:Limitations} ... Full Content General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? Ajax Components Do I have to specify both id and t:id for Zone components? Integration with existing applications How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? Limitations How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up in the rendered markup? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Specific Errors Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? Tapestry Inversion of Control Container Why do I need to define an interface for my services? Why can't I just use the class itself? Templating and Markup Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model (service decorations and advice) Easy modularization Best-of-breed exception reporting Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs. Ajax Components Do I have to specify both id and t:id for Zone components? The examples for the Zone component (in the Component Reference) consistently specify both id and t:id and this is probably a good idea. Generally speaking, if you don't specify the client-side id (the id attribute), it will be the same as the Tapestry component id (t:id). However, there are any number of exceptions to this rule. The
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (1) ... {include:Tapestry Inversion of Control Container} {include:Templating and Markup} --- {display-footnotes} Full Content General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? Ajax Components Do I have to specify both id and t:id for Zone components? Integration with existing applications How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? Limitations How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up in the rendered markup? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Specific Errors Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? Tapestry Inversion of Control Container Why do I need to define an interface for my services? Why can't I just use the class itself? Templating and Markup Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model (service decorations and advice) Easy modularization Best-of-breed exception reporting Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs. Ajax Components Do I have to specify both id and t:id for Zone components? The examples for the Zone component (in the Component Reference) consistently specify both id and t:id and this is probably a good idea. Generally speaking, if you don't specify the client-side id (the id attribute), it will be the same as the Tapestry component id (t:id). However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (6) ... {include:General Questions} {include:Ajax Components} {include:Integration with existing applications} {include:Limitations} {include:Templating and Markup} {include:Page And Component Classes} {include:Specific Errors} {include:Ajax Components} {include:Tapestry Inversion of Control Container} {include:Templating and Markup} {include:Integration with existing applications} {include:Specific Errors} Full Content General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? Limitations How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Templating and Markup Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up in the rendered markup? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Ajax Components Do I have to specify both id and t:id for Zone components? Tapestry Inversion of Control Container Why do I need to define an interface for my services? Why can't I just use the class itself? Integration with existing applications How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? Specific Errors Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model (service decorations and advice) Easy modularization Best-of-breed exception reporting Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs. Footnotes Reference Notes 1
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (1) ... {include:Templating and Markup} {include:Page And Component Classes} {include:Forms and Form Components} {include:Ajax Components} {include:Tapestry Inversion of Control Container} ... Full Content General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? Limitations How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Templating and Markup Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up in the rendered markup? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Ajax Components Do I have to specify both id and t:id for Zone components? Tapestry Inversion of Control Container Why do I need to define an interface for my services? Why can't I just use the class itself? Integration with existing applications How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? Specific Errors Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model (service decorations and advice) Easy modularization Best-of-breed exception reporting Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs. Footnotes Reference Notes 1 Jetty is a well-known high-performance servlet container. Jetty starts up quickly, and implements the official Servlet specification very closely. Limitations How do I add new components to an existing page dynamically? The short answer here is: you
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (1) ... {include:Integration with existing applications} {include:Specific Errors} --- Full Content General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? Limitations How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Templating and Markup Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up in the rendered markup? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Forms and Form Components What is the t:formdata hidden field for? How do I change the label for a field on the fly? Ajax Components Do I have to specify both id and t:id for Zone components? Tapestry Inversion of Control Container Why do I need to define an interface for my services? Why can't I just use the class itself? Integration with existing applications How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? Specific Errors Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model (service decorations and advice) Easy modularization Best-of-breed exception reporting Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs. Footnotes Reference Notes 1 Jetty is a well-known high-performance servlet container. Jetty starts up quickly, and implements the official Servlet specification very closely. Limitations How do I add new components to an existing page dynamically? The short answer here is: you
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (1) ... {include:Integration with existing applications} {include:Specific Errors} --- Full Content General Questions How do I get started with Tapestry? Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? Limitations How do I add new components to an existing page dynamically? Why doesn't my service implementation reload when I change it? Templating and Markup Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Why do some images in my page show up as broken links? What's the difference between id and t:id? Page And Component Classes What's the difference between a page and a component? How do I store my page classes in a different package? Why do my instance variables have to be private? Why don't my informal parameters show up in the rendered markup? Why do I get java.lang.LinkageError when I invoke public methods of my page classes? Forms and Form Components What is the t:formdata hidden field for? How do I change the label for a field on the fly? Ajax Components Do I have to specify both id and t:id for Zone components? Tapestry Inversion of Control Container Why do I need to define an interface for my services? Why can't I just use the class itself? Integration with existing applications How do I make a form on a JSP submit into Tapestry? How do I share information between a JSP application and the Tapestry application? Specific Errors Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? General Questions How do I get started with Tapestry? The easiest way to get started is to use Apache Maven to create your initial project; Maven can use an archetype (a kind of project template) to create a bare-bones Tapestry application for you. One you have Maven installed, execute the command mvn archetype:generate DarchetypeCatalog=http://tapestry.apache.org. Maven will (after performing a large number of one-time downloads) ask you questions about how to create the new project, including a group id (like a package name) and an artifact id for your new project. Once it is created, you can load it into any IDE and start coding, or use mvn jetty:run 1 . Again, more one-time downloads, but then you can open your browser to http://localhost:8080 to run the application. Why does Tapestry use Prototype? Why not insert favorite _javascript_ library here? An important goal for Tapestry is seamless DHTML and Ajax integration. To serve that goal, it was important that the built in components be capable of Ajax operations, such as dynamically re-rendering parts of the page. Because of that, it made sense to bundle a well-known _javascript_ library as part of Tapestry. At the time (this would be 2006-ish), Prototype and Scriptaculous were well known and well documented, and jQuery was just getting started. The intent has always been to make this aspect of Tapestry pluggable. This is work expected in Tapestry 5.3, where a kind of adapter layer will be introduced so that Tapestry can be easily customized to work with any of the major _javascript_ libraries. Why does Tapestry have its own Inversion of Control Container? Why not Spring or Guice? An Inversion of Control Container is the key piece of Tapestry's infrastructure. It is absolutely necessary to create software as robust, performant and extensible as Tapestry. Tapestry IoC includes a number of features that distinguish itself from other containers: Configured in code, not XML Built-in extension mechanism for services: configurations and contributions Built-in aspect oriented programming model (service decorations and advice) Easy modularization Best-of-breed exception reporting Because Tapestry is implemented on top of its IoC container, and because the container makes it easy to extend or replace any service inside the container, it is possible to make the small changes to Tapestry needed to customize it to any project's needs. Footnotes Reference Notes 1 Jetty is a well-known high-performance servlet container. Jetty starts up quickly, and implements the official Servlet specification very closely. Limitations How do I add new components to an existing page dynamically? The short answer here is: you
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (2) ... h1. Limitations h2. How do I add new components to an existing page dynamically? The short answer here is: *you dont*. The long answer here is *you dont have to, to get the behavior you desire*. One of Tapestry basic values is high scalability: this is expressed in a number of ways, reflecting scalability concerns within a single server, and within a cluster of servers. Although you code Tapestry pages and components as if they were ordinary POJOs{footnote}Plain Old Java Object. Tapestry does not require you to extend any base classes or implement any special interfaces.{footnote}, as deployed by Tapestry they are closer to a traditional servlet: a single instance of each page services requests from multiple threads. Behind the scenes, Tapestry transforms you code, rewriting it on the fly. What this means is that _any_ incoming request must be handled by a _single page instance_. Therefore, Tapestry enforces the concept of *static structure, dynamic behavior*. Tapestry provides quite a number of ways to vary what content is rendered, well beyond simple conditionals and loops. It is possible to drag in components from other pages when rendering a page (other FAQs will expand on this concept). The point is, that although a Tapestry pages structure is very rigid, the order in which the components of the page render does not have to be top to bottom. h1. Specific Errors ... Full Content Break up these top level items into individual child pages. General Questions Specific Errors Why do I get a SAXParseException when I use an HTML entity, such as nbsp; in my template? Tapestry uses a standard SAX parser to read your templates. This means that your templates must be well formed: open and close tags must balance, attribute values must be quoted, and entities must be declared. The easiest way to accomplish this is to add a DOCTYPE to your the top of your template: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" Part of the DOCTYPE is the declaration of entities such as nbsp;. Alternately, you can simply use the numeric version: #160; This is the exact same character and will render identically in the browser. Why do I get the exception "No service implements the interface org.apache.tapestry5.internal.InternalComponentResources" when trying to use the BeanEditForm component? This can occur when you choose the wrong package for your data object, the object edited by the BeanEditForm component. If you place it in the same package as your pages, Tapestry will treat it like a page, and perform a number of transformation on it, including adding a new constructor. Only component classes should go in the Tapestry-controlled packages (pages, components, mixins and base under your application's root package). By convention, simple data objects should go in a data package, and Hibernate entities should go in an entities package. Footnotes Reference Notes Change Notification Preferences View Online | View Changes
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (1) ... h1. General Questions h1. Specific Errors h2. Why do I get a SAXParseException when I use an HTML entity, such as {{amp;nbsp;}} in my template? Tapestry uses a standard SAX parser to read your templates. This means that your templates must be _well formed_: open and close tags must balance, attribute values must be quoted, and entities must be declared. The easiest way to accomplish this is to add a DOCTYPE to your the top of your template: {code:xml} !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd {code} Part of the DOCTYPE is the declaration of entities such as {{amp;nbsp;}}. Alternately, you can simply use the numeric version: {{amp;#160}}; This is the exact same character and will render identically in the browser. h2. Why do I get the exception No service implements the interface org.apache.tapestry5.internal.InternalComponentResources when trying to use the BeanEditForm component? This can occur when you choose the wrong package for your data object, the object edited by the BeanEditForm component. If you place it in the same package as your pages, Tapestry will treat it like a page, and perform a number of transformation on it, including adding a new constructor. Only component classes should go in the Tapestry-controlled packages ({{pages}}, {{components}}, {{mixins}} and {{base}} under your applications root package). By convention, simple data objects should go in a {{data}} package, and Hibernate entities should go in an {{entities}} package. --- {display-footnotes} Full Content Break up these top level items into individual child pages. General Questions Change Notification Preferences View Online | View Changes
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (3) {note}Break up these top level items into individual child pages.{note} {children:all=true} h1. General Questions Full Content General QuestionsLimitationsSpecific Errors Change Notification Preferences View Online | View Changes
[CONF] Apache Tapestry Frequently Asked Questions
Frequently Asked Questions Page edited by Howard M. Lewis Ship Changes (2) {children:all=true} {children:all=true|excerpt=true} Full Content General QuestionsLimitationsSpecific Errors Change Notification Preferences View Online | View Changes