Tapestry's Components
Trying to create a small component that handles user login and can be placed anywhere I stumbled into a problem where the Tapestry framework couldn't find "the components' template". Reading and re-reading the documentation assured me that I was doing it fine: A .java file in the package specified in the application specifications, a .html file in my context folder, and since it's still a requirement, a .jwc file in the WEB-INF folder.
The User's guide portion about components didn't specify where to place the templates, and the templates portion it specifies that the templates could be located either in the same location as the specification, or in the web application's context root directory.
Unfortunately, I didn't take note of the warning in paranthesis saying if the page is an application page, not a page from a component library. Why should I? My component was not coming from any library.
Just to show you, terminology in documentation is one of the most important things to prevent mistakes by the stupid users, such as myself. It seems that if the HTML templates are of a component, they need to be put with the .jwc files as well, i.e. the WEB-INF folder.
On a good side, I finally managed to get components work and I'm off the right way with remaking the store. I also wanted to note that my previous note about the store being written in ASP might have been misleading: I have not written it in ASP. I am just re-writing it in Tapestry/Cayenne, as it's highly unmaintainable at its current state.
0 Comments:
Post a Comment
<< Home