T4.1 friendly URLs and session restart

2008-01-14 Thread spot_
Hello all I configured my T4.1 for friendly URLs (http://tapestry.apache.org/tapestry4.1/usersguide/friendly-urls.html). Everything works perfect, except a session restart as a result of time out. In this case Tomcat (?) renders a page with the message, that the session was timed out and with a l

Re: T5: decode URL with non english symbols

2008-01-14 Thread Dapeng
please refer to http://java.sun.com/docs/books/tutorial/i18n/text/string.html for text encoding basically it can be down in two statements byte[] utf8Bytes = original.getBytes("UTF8"); String roundTrip = new String(utf8Bytes, "UTF8"); or even shorter public String decode(S

[T4] escaping text for Javascript

2008-01-14 Thread Kalle Korhonen
I needed to escape some strings pulled from database for Javascript, and it turned out to be surprisingly difficult. AFAIK, none of the Tapestry/Tacos markup writers/character translators escapes a single quote ', so I found myself writing: public class JavascriptCharacterTranslator extends Mar

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Howard Lewis Ship
, ${item} On Jan 14, 2008 9:03 AM, Chris Lewis <[EMAIL PROTECTED]> wrote: > Out of curiosity and within the scope of markup rendering in a looping > context, what would one do with with isFirst/isLast knowledge, apart > from using it to insert a delimiter? > > > Josh Canfield wrote: > >

Re: _$resources.queueRender($2);

2008-01-14 Thread Howard Lewis Ship
On Jan 14, 2008 8:21 AM, Bret Gregory <[EMAIL PROTECTED]> wrote: > I think I should provide some of the code since I will trying to achieve > that you suggested. The menu has the list of MenuItems provided in the > code. But when it renders I want the component to use the correct > component base

Re: Loops in .tml calls Java calls components

2008-01-14 Thread Josh Canfield
All of the components that you are going to render need to be referenced in your page's .tml file. You can wrap your PageLinks component in an to conditionally render it. If you have multiple blocks you want to chose from consider using and with a method in your page.javathat returns the appropr

RE: Injecting LibraryMapping to "core"

2008-01-14 Thread Bret Gregory
Sorry, wrong thread. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: _$resources.queueRender($2);

2008-01-14 Thread Bret Gregory
Here is some more information on the problem: It seems almost like an ordering issue, like the objects are created and added, but that Tapestry doesn't know that they are components despite having transformed the classes already. Below is the log from Tapestry for the class transformations and al

RE: Injecting LibraryMapping to "core"

2008-01-14 Thread Bret Gregory
Here is some more information on the problem: It seems almost like an ordering issue, like the objects are created and added, but that Tapestry doesn't know that they are components despite having transformed the classes already. Below is the log from Tapestry for the class transformations and al

[ANN] Tapestry/Seam integration

2008-01-14 Thread Igor Drobiazko
Hi all, Seam integration for Tapestry 4 is now available as Tacos subproject: http://tacos.sourceforge.net/tacos4.1/tacos-seam/index.html Read how get the latest snapshots here: http://tacos.sourceforge.net/tacos4.1/tacos-seam/download.html The demo sources can be found here: http://tacos.svn.so

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Christian Edward Gruber
I think that isEven or isOdd probably has enough common usage to be worth exposing to child components too. Christian. On 14-Jan-08, at 13:10 , Robert Zeigler wrote: Insert css class attributes for first/last. :) Incidentally, regarding my earlier suggestion of making your own component,

Loops in .tml calls Java calls components

2008-01-14 Thread Szemere Szemere
How can Tapestry 5 handle a scenario where I have a loop in a .tml file that calls method in the page.java which then calls components to render (e.g. PageLinks)? Can someone point me towards example code? Tks

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Robert Zeigler
Insert css class attributes for first/last. :) Incidentally, regarding my earlier suggestion of making your own component, you're absolutely right that loop would be difficult to duplicate. But you don't need to duplicate it, per se. Just composite it. Make your own component with the same

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Josh Canfield
Hmm... output optional content or an entirely different rendering for the first object or last object? In my case (www.thedailytube.com) the first object rendered is highlighted with a bigger image and more text of the description displayed. In an email application your thread page you might only w

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Chris Lewis
Out of curiosity and within the scope of markup rendering in a looping context, what would one do with with isFirst/isLast knowledge, apart from using it to insert a delimiter? Josh Canfield wrote: Adding delimiter to the loop component sounds like a poor design choice to me. It seems like the

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Josh Canfield
Adding delimiter to the loop component sounds like a poor design choice to me. It seems like the right thing to do would be to make isFirst/isLast type attributes available from the loop. Sent from my iPhone On Jan 14, 2008, at 7:41 AM, Chris Lewis <[EMAIL PROTECTED]> wrote: Thanks for

RE: _$resources.queueRender($2);

2008-01-14 Thread Bret Gregory
I think I should provide some of the code since I will trying to achieve that you suggested. The menu has the list of MenuItems provided in the code. But when it renders I want the component to use the correct component based on its type. I saw another message in the forum that outputted apples/

Re: Injecting LibraryMapping to "core"

2008-01-14 Thread Howard Lewis Ship
That's a feature. You can remove the ambiguity by injecting them into a non-core folder, say "/common". You'd then reference them as or On Jan 14, 2008 12:33 AM, Harald Geritzer <[EMAIL PROTECTED]> wrote: > > hi all, > > i am building a webapp consisting of serveral plugins each having a set o

Re: Use System ClassLoader with Tapestry5

2008-01-14 Thread Howard Lewis Ship
Tricky. The class loader Tapestry uses does two different things: - Transforms the class (for injections, parameters, and lots of other stuff) - Handles reloading of classes when they change When a .class file on the disk changes, Tapestry will actually discard the class loader and create a new o

Re: _$resources.queueRender($2);

2008-01-14 Thread Howard Lewis Ship
You mentioned "provided dynamically"? You can't just instantiate components, only Tapestry can do that, once it has transformed the class. What you can do is place the components, in the template, inside a element. On Jan 14, 2008 7:42 AM, Bret Gregory <[EMAIL PROTECTED]> wrote: > I am running

_$resources.queueRender($2);

2008-01-14 Thread Bret Gregory
I am running into a problem with a custom component that I am attempting to write. The component is a dropdown menu. Inside the menu there are menu items which are components that are provided dynamically. These components are then looped over and each menu item component is to be rendered based

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Chris Lewis
Thanks for the reminder. As a note to others interested in this thread, I created a JIRA suggesting the addition of a delimiter parameter in the Loop. https://issues.apache.org/jira/browse/TAPESTRY-2043 chris Howard Lewis Ship wrote: I have been keeping the nightly documentation up to date w

Re: Antw: Re: T5: regexp for commas

2008-01-14 Thread Michael Courcy
well I wonder if the comma is not playing a role in the interpretation of the annotation ? did you try to replace the comma by its unicode value : \u002C Thomas Zenglein a écrit : Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args)

Re: Re: T5: regexp for commas

2008-01-14 Thread Sven Homburg
i'm not sure, but have you tried this: @Validate("required,regexp=prop:myRegExpCheck") public String getMyRegExpCheck() { return "[<>a-z\\,A-ZöäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+"; } 2008/1/14, Thomas Zenglein <[EMAIL PROTECTED]>: > > Hello Michael, > > I've just tried following lines. > > public

Custom ValidationDecorator

2008-01-14 Thread Harald Geritzer
hi all, is there a way to find out, which validators are assigned to a field. I'd like to write a custom ValidationDecorator decorating all fields containing a required validator. ty - To unsubscribe, e-mail: [EMAIL PROTECTED

Antw: Re: T5: regexp for commas

2008-01-14 Thread Thomas Zenglein
Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args) { String foo = ","; if (foo.matches("[<>a-zA-Z,öäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+")){ System.out.println(":)"); } else { System.out.

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Kevin Menard
I'm not sure this would gain him much. He'd still need to know how to figure out if the list item is the last one in the iteration. Of course, it would address his whitespace problem. I think what Chris wants is something that I've been advocating for for a little while now. That's something qu

Re: T5: regexp for commas

2008-01-14 Thread Michael Courcy
Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate("required,regexp=[<>a-zA-ZöäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+") public void setName(String name) {

Re: T5: 5.0.8 whitespace

2008-01-14 Thread Chris Lewis
Perhaps idealistic CSS, but not realistic - at least for my browser support matrix. If I'm not mistaken not even IE 6 supports these pseudo selectors, and I can't see how one can hope to fare well without supporting it. Of course I see this as annoying and unfortunate, as I agree with you in th

T5: regexp for commas

2008-01-14 Thread Thomas Zenglein
Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate("required,regexp=[<>a-zA-ZöäüÖÄÜß0-9\\.\"\'?!§$%&\\-+*:/ ]+") public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend

T5: decode URL with non english symbols

2008-01-14 Thread Foror
I have changed a method public String decode(String pString, String charset) for fix problem: public String decode(String pString, String charset) throws DecoderException, UnsupportedEncodingException { if (pString == null) { return null; } Stri

Re: Antwort: Re[4]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
KM> now i see what you want... it is not possible KM> you can only use ASCII characters in URLs, KM> any other character has to be encoded. Firefox URL: tag/%D0%BD%D0%BE%D0%B2%D1%8B%D0%B9+%D0%BA%D1%83 (word = "новый") After click this link, and begin tapestry debug in CODEC.codec(input) input =

RE: [T5] Override GridColumn template?

2008-01-14 Thread Joost Schouten (mailing lists)
I agree there should be a parameter to tell the Grid to use the icon or not. But in the mean time; what about adding the following to your css? .t-sort-icon{ display:none; } Cheers, Joost -Original Message- From: Otho [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 9:

StreamResponse in Tapestry 4.1

2008-01-14 Thread munich
Is there an alternative way for outputting binary data in Tapestry 4.1 without the T5 specific StreamResponse? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: decode URL with non english symbols

2008-01-14 Thread Dapeng
Foror wrote: D> is ur page.tml using the same encoding ?? D> juz my 2c D> if so .. u may need to test ur CODEC.decode All in UTF-8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Antwort: Re[4]: T5: decode URL with non english symbols

2008-01-14 Thread Kristian Marinkovic
now i see what you want... it is not possible you can only use ASCII characters in URLs, any other character has to be encoded. please read: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm http://www.ietf.org/rfc/rfc1738.txt Foror <[EMAIL PROTECTED]> 14.01.2008 11:29 Bitte antw

Re: PrivateAsset example please

2008-01-14 Thread munich
IAsset image = getEngine().getInfrastructure().getAssetFactory().createAbsoluteAsset( "z\\0001.JPG", getLocale(), getLocation() ); This results in: java.lang.IllegalArgumentException C

Re[4]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
F> Testing in Opera9, IE6 and FireFox2 on Tomcat 5.5 Tomcat 5.5 with URIEncoding="UTF-8" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re[3]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
KM> have you tried this: KM> http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding It does not work. In URLCodec (commons-codec-1.3) method public String decode(String pString, String charset) throws DecoderException, UnsupportedEncodingException { if (pString == null) {

Use System ClassLoader with Tapestry5

2008-01-14 Thread Yeeswara Nadapana (HCL Financial Services)
Hi, I am building a Tapestry 5 application. It is using a Tapestry specific ClassLoader called "org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl$P ackageAwareLoader" to load all the classes. I am trying to use an DWR call to method on my Page class, where its using System

Re[2]: T5: decode URL with non english symbols

2008-01-14 Thread Kristian Marinkovic
have you tried this: http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding g, kris Foror <[EMAIL PROTECTED]> 14.01.2008 11:06 Bitte antworten an "Tapestry users" An "Tapestry users" Kopie Thema Re[2]: T5: decode URL with non english symbols D> is ur page.tml using the same encodin

Re[2]: T5: decode URL with non english symbols

2008-01-14 Thread Foror
D> is ur page.tml using the same encoding ?? D> juz my 2c D> if so .. u may need to test ur CODEC.decode All in UTF-8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

T5: TextStreamResponse charset

2008-01-14 Thread Foror
new TextStreamResponse("application/json;charset=UTF-8", json.toString()); In browser response header "Content-Type application/json;charset=UTF-8" but content in "windows-1251" charset (because locale="ru_RU"?). Testing on Tomcat 5.5

Re: T5: decode URL with non english symbols

2008-01-14 Thread Dapeng
Foror wrote: In this method public static String urlDecode(String input) // input = "новый" (russian word) { try { return CODEC.decode(input); // return "?" after call this method } catch (DecoderException ex) { throw n

Re: [T5] Persistent field strategy and Hibernate

2008-01-14 Thread Ted Steen
We still got this problem. Is there anyone who know anything about this? If I read persistent fields from one page, why do persistent fields (with the same type) from other pages get read from the session aswell? This is a problem when working with hibernate. Thanks! /Ted 2007/11/27, Olof Næssén

Beaneditor default date format

2008-01-14 Thread Davor Hrg
Is there to set date format globaly ? or at least for BeanEditor ? Davor Hrg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Injecting LibraryMapping to "core"

2008-01-14 Thread Harald Geritzer
hi all, i am building a webapp consisting of serveral plugins each having a set of pages which should be injected into the "core" of the webapp. e.g webapp context: /testapp plugin1 : /testapp/pluginpage1 /testapp/subdir/page1 plugin2 : /testapp/pluginpage2 i fou