Wrong charset in strange conditions
Hi, I have a Tapestry 4.0.2 website which works fine since months. Today I realized that the charset of the site was not consistent: the webserver returned charset=UTF-8 while the html code was charset=ISO-8859-1 The pages themselves are in UTF-8 and were displayed correctly. So I changed the BorderComponent (which is put around each page at renderinig time) to return charset=UTF-8 It works OK for all pages except in *one* situation. If I get a given page directly with a URL like my.site.com/servlet/MyPage.html (whch get page MyPage.page/html) the charset is UTF-8 and OK. But if I get the page through a PageRedirectException(MyPage) then the charset is wrong. The code in html say charset=UTF-8, the web server also, but the page itself seems to have been converted to 8859-1 and so the browser displays it badly... Any idea what happens? Thanks -jec - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrong charset in strange conditions
I would add that it appears if I use: MyPage myPage = ... throw new PageRedirectException(myPage); and: throw new PageRedirectException(MyPage); Also, after the RedirectException, the URL is not .../MyPage.html but .../OtherPage.html where OtherPage is where the Redirect occurs. Is that normal? Thanks a lot -jec Jean-Eric Cuendet (RPT) wrote: Hi, I have a Tapestry 4.0.2 website which works fine since months. Today I realized that the charset of the site was not consistent: the webserver returned charset=UTF-8 while the html code was charset=ISO-8859-1 The pages themselves are in UTF-8 and were displayed correctly. So I changed the BorderComponent (which is put around each page at renderinig time) to return charset=UTF-8 It works OK for all pages except in *one* situation. If I get a given page directly with a URL like my.site.com/servlet/MyPage.html (whch get page MyPage.page/html) the charset is UTF-8 and OK. But if I get the page through a PageRedirectException(MyPage) then the charset is wrong. The code in html say charset=UTF-8, the web server also, but the page itself seems to have been converted to 8859-1 and so the browser displays it badly... Any idea what happens? Thanks -jec - 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: Order of rendering components
- enumerating all FaqItem components in the page (or in the body of FaqSummary), and getting the title values from their parameters? This solution is somewhat easier to implement if you do not need fully flexible component hierarchy (I mean for example FaqItems are rendered from multiple pages). This is indeed a good solution! Could you send me a snippet of code for enumerating all FaqItems? Thanks -jec - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DirectLink / PageLink in a Translated message
Hi, Is there a way to translate a text that contains a Component? Ex: span key=this_is_a_stringThis is a string that should be translated to French linking to a jwcid=@PageLink page=...that page/a and helping you getting there/span Thanks for ideas. -jec -- Best regards / Salutations. Jean-Eric Cuendet Senior developer / Technical support Riskpro Technologies SA Av. Louis-Ruchonnet 2 CH-1003 Lausanne Switzerland Direct: +41 21 637 0123 Principal : +41 21 637 0110 Fax : +41 21 637 0111 Skype : jec.rptec Web : http://www.rptec.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Order of rendering components
In such advanced cases you can use IMarkupWriter.getNestedWriter(): When rendering the page: - render all FaqItems to a nested writer - render the FaqSummary itself - close() the nested writer (which implicitly commits its content to the main writer) Thanks a lot, that makes sense. But where do I put what? I'll have something like: span jwcid=@FaqSummary/ span jwcid=@FaqItem title=title1 Body of FAQ #1 /span span jwcid=@FaqItem title=title2 Body of FAQ #2 /span Where do I put the Nested thing? -jec - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@Persist documentation?
Hi, I'm unable to find @Persist annotation doc... Could someone point me to some? Thanks. -jec -- Best regards / Salutations. Jean-Eric Cuendet Senior developer / Technical support Riskpro Technologies SA Av. Louis-Ruchonnet 2 CH-1003 Lausanne Switzerland Direct: +41 21 637 0123 Principal : +41 21 637 0110 Fax : +41 21 637 0111 Skype : jec.rptec Web : http://www.rptec.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with @Persist
Hi, I have 2 pages, one with a list of Users (UsersPage) and another with Details for a given User (DetailsPage). In UsersPage, I have a onEditUser() listener, which do: page = getDetailsPage() // = With @InjectPage page.setUserId(selectedId); return page; And in DetailsPage, I have: @Persist getUserId(); setUserId(id); But as soon as I have called *one* *time* the DetailsPage with a User (I clicked on onEditUser() DirectLink), the DetailsPage appears with the *first* user I selected, no matter if I go to UsersPage and select another user. It seems that the getUserId() method always return the first ID the page got the first time I used it. This behaviour appears only in production, not on my DevMachine... A... Does anyone have a quick idea on what could caus that prolem? Thanks a lot for any help. -jec - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]