T5: Custom 404 Page
Hi, we have the following problem with our tapestry5 application: We already have a custom ExceptionReport page which is displayed when an exception is thrown in the application. However, when the user enters a non-existing page name, the exception page is not shown, but the standard tomcat 404 page instead. We want the ExceptionReport page for both exceptions and page-not-found errors. The problem is that I apparently can't set a tapestry page as the tomcat 404-page in the web.xml. When I try it, an empty page is returned as 404 page. Does anybody know how I can use a tapestry page as 404-error-page? Thank in advance, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t:type="loop" problem
On Monday 17 September 2007 10:03:21 Davor Hrg wrote: > shouldn't it be: > > > , > Yes, exactly, this will work. I just wanted to make clear that the problem is not with expansions in general, but only when they are given to components as parameters. You are right, the solution to this problem is just not to do that. Cheers, Michael > On 9/17/07, Michael Gottschalk <[EMAIL PROTECTED]> wrote: > > On Monday 17 September 2007 08:42:46 Davor Hrg wrote: > > > I had no problem using expansions in a loop, (T5.0.5) > > > > > > > > > ${value}, > > > > > > > Expansions in a loop are only a problem if they are given as parameters > > to components. E.g. your example will work, but the following will not: > > > > > > , > > > > > > > > Cheers, > > Michael > > > > > On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > > > It's mentioned somewhere (maybe in the source) that expansions are > > > > treated as literals, and therefore cached and never re-evaluated. > > > > > > > > The result is quite non-intuitive in a loop, which has irked me for > > > > some time, and I'm beginning to consider it a bug. It's also one > > > > reason I still value the Any component. > > > > > > > > I'll log a JIRA. > > > > > > > > Cheers, > > > > Nick. > > > > > > > > Michael Gottschalk wrote: > > > > > Hi Leon, > > > > > > > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > > > > >> I have a problem with the t:type="loop" component in my Menu > > > > Component > > > > > > >> [...] > > > > >> Every categoryId is 1. (and it generates to much tags). > > > > >> [...] > > > > >> This is what is in Menu.html > > > > >> > > > > >> > > > > >> > > > > >>> > > >> context="${category.id}">${category.name} | ${category.id > > > > > > > > } > > > > > > > > >> > > > > >> > > > > > > > > > > it will work if you don't use the expansion in the actionLink > > > > context > > > > > > > parameter: > > > > > > > > > > > > > > > Never use the ${}-notation when giving parameters to a component. I > > > > > > > > don't know > > > > > > > > > why, but it will not work as expected. > > > > > > > > > > Regards, > > > > > Michael > > > > - > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t:type="loop" problem
On Monday 17 September 2007 08:42:46 Davor Hrg wrote: > I had no problem using expansions in a loop, (T5.0.5) > > > ${value}, > Expansions in a loop are only a problem if they are given as parameters to components. E.g. your example will work, but the following will not: , Cheers, Michael > On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > It's mentioned somewhere (maybe in the source) that expansions are > > treated as literals, and therefore cached and never re-evaluated. > > > > The result is quite non-intuitive in a loop, which has irked me for > > some time, and I'm beginning to consider it a bug. It's also one > > reason I still value the Any component. > > > > I'll log a JIRA. > > > > Cheers, > > Nick. > > > > Michael Gottschalk wrote: > > > Hi Leon, > > > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > > >> I have a problem with the t:type="loop" component in my Menu Component > > >> > > >> [...] > > >> Every categoryId is 1. (and it generates to much tags). > > >> [...] > > >> This is what is in Menu.html > > >> > > >> > > >> > > >>> >> context="${category.id}">${category.name} | ${category.id > > > > } > > > > >> > > >> > > > > > > it will work if you don't use the expansion in the actionLink context > > > parameter: > > > > > > > > > Never use the ${}-notation when giving parameters to a component. I > > > > don't know > > > > > why, but it will not work as expected. > > > > > > Regards, > > > Michael > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t:type="loop" problem
Hi Leon, On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > I have a problem with the t:type="loop" component in my Menu Component > > [...] > Every categoryId is 1. (and it generates to much tags). > [...] > This is what is in Menu.html > > > >context="${category.id}">${category.name} | ${category.id} > > it will work if you don't use the expansion in the actionLink context parameter: Never use the ${}-notation when giving parameters to a component. I don't know why, but it will not work as expected. Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Problem with Decoding of Activation Parameters
Hi, we have the following problem with Tapestry 5: In onActivate methods, the parameter array always seems to be decoded once too often. That means that correctly encoded parameters in URLs will result in broken parameters in the onActivate method. Only double-encoded URLs result in correct parameters. For example, if we have the page "Search" and the following request URL: http://localhost:8080/search/k%C3%BCche then the first parameter of the onActivate method in Search will be "k?che". However, this has to be "küche" (with an umlaut). Only the following, double encoded request URL will lead to the correct result: http://localhost:8080/search/k%25C3%25BCche Btw, we use the UTF-8-patch described in http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding. I looked through the tapestry source code and found that the following location could be the problem: In ComponentActionDispatcher, there is a method decodeContext, in which every context parameter is URL-decoded. The context parameters are read from the String returned by request.getPath(). However, request.getPath() already seems to be the decoded version of the URL-path. Does anyone have the same problem or an explanation for the double-decoding of the context parameters? Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 XHTML strict conformance
Hi, I have some questions in addition to the issue with non-well-formed XML generation. In order to be XHTML strict compliant, some standard components also need to be changed in tapestry 5, I think. Should I open bug reports for all problems I find? Or is XHTML strict conformance not currently an issue in the development? Until now, I found the following problems: - form-tags always have a "name"-attribute when generated with t:form. The name attribute is not allowed for forms in xhtml strict. - tapestry sometimes places the attribute space="preserve" in script-tags - In the error message generated above a form ("You must correct the following errors before you may continue"), there is a tag without items if there are no errors in the form. This is not allowed in XHTML. - There are several components that place tags incorrectly according to XHTML strict. Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Problem with browser cache
On Thursday 21 June 2007 17:41:21 Michael Gottschalk wrote: > I have problems with my web application using Tapestry 5 when the > back/forward buttons of the browser are used. The internal page state seems > to be out of sync with the actual state in the browser then. I get strange > behaviour and exceptions in some cases. > [...] I already solved the problem myself. Sorry for the question, since the solution was very easy. I just needed to add the product-ID to the form's context parameters and then reload the product from the database in the action handler instead of using the already loaded product from the session. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Problem with browser cache
Hi, I have problems with my web application using Tapestry 5 when the back/forward buttons of the browser are used. The internal page state seems to be out of sync with the actual state in the browser then. I get strange behaviour and exceptions in some cases. I'll give an example: I have a page displaying a list of products and another page displaying the details of one product. On the details page, products can be added to a shopping cart (this includes a form submission). The details page also has a link back to the list page. The following steps lead to an error: 1. From the list page, I click on a product so that I see the details page 2. On the details page, I click on the link back to the list page (not the back button of the browser) 3. On the list page, I click on a different product so that I see this product's details page 4. I click on the back button of the browser twice so that I see the details page of the first product. 5. I try to add this product to the shopping cart. Now the problem occurs: the second product is added to the shopping cart, and not the first. Moreover, I see the details page of the second product. This problem can also lead to an exception if I follow some other steps: 1. I click on a product in the list so that I see the details page 2. I click on the back-link to the list page (not using the browser's back-button) 3. I click on the browser's back-button so that I see the details page again. 4. I try to add the product to the shopping cart. Now an exception is thrown. I suppose that the page context still is the list page, which can not handle the shopping-cart action and thus the exception is thrown. Does anyone know a solution or a workaround for this problem? Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]