Re: [T5.1] How do you advise ClassNameLocator?
Hi Steve, that is not true. Of course you can override ClasspathURLConverter as any service in Tapestry. On Wed, May 6, 2009 at 6:49 PM, Steve Eynon steve.ey...@alienfactory.co.ukwrote: Arr, yes, thanks Igor. The JavaDocs for ClasspathURLConverter even states it exists for OSGi (Eclipse) apps: This is a hook for supporting OSGi, allowing bundleresource and bundleentry protocols to be converted to jar: or file:. The default implementation currently returns the URLs unchanged. But alas, this service again is defined in the TapestryIOCModule meaning it too can't be overridden or advised. I'll override it in my current classpath fudgey way... To overcome overriding issues, maybe rather than providing one class to convert all urls we could contribute UrlConverters to handle different protocols? Steve. -- Steve Eynon www.bushmasters.co.uk mobie: (+592) 6784236 2009/5/6 Igor Drobiazko igor.drobia...@gmail.com: Hi Steve, the problem is the protocol bundleresource. You should override ClasspathURLConverter which is used by ClassNameLocator. This service was introduced to be able to handle URLs which are not common in Java. I provide for example my own implementition of this service in an OSGi environment, where the URL start with bundleresource. So you have the same issue. -- Best regards, Igor Drobiazko - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Best regards, Igor Drobiazko
Re: t5: usual practice for page test
Mostly our pages are kept quite clean and simple, so we write unit tests for business logic mostly, I use JUnit and sometimes Easymock for that. using test driven development for pages? No, (although thinking of looking at PageTester at some point) but we do some black box testing using Selenium currently just write the code, write a test after it is done for SVN commit? Nobody likes to admit this, but I confess to have done it on occasion :) just write the code, manually test the page? We see development with manual testing as a normal part of the development process (we don't even call it testing). I guess how much testing you can afford to do lends itself to how much time you have to meet your deadline, what has really helped though IMHO is developing and following best practices for Java and Tapestry, which generally improves the reliability of pages, readability (predictability) of the code, and is easier to maintain as you know what to expect. Some might argue that its not deal to work this way but if you re-factor your code a lot, the quality also dramatically improves. regards, Peter - Original Message - From: Angelo Chen angelochen...@yahoo.com.hk To: users@tapestry.apache.org Sent: Friday, 8 May, 2009 02:02:40 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: t5: usual practice for page test Hi, I'd like to know how others do the test for page? what I'm doing now is, write the code, manually test it until it works, that's the end. how you guys do this task: 1) using test driven development for pages? 2) just write the code, write a test after it is done for SVN commit? 3) just write the code, manually test the page? thoughts? -- View this message in context: http://www.nabble.com/t5%3A-usual-practice-for-page-test-tp23437084p23437084.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Encoding with exceptions
Is html input mandatory? Id not, how about using bbcode or some wiki markup language? 2009/5/7 Christian Edward Gruber christianedwardgru...@gmail.com Yeah - I don't, at least not yet. I probably will use such an editor later, but I need a protected output system so I'm not using t:outputRaw / since that's quite dangerous when writing from a database. I want ot make sure that even if bad data got in, it can't come out as an XSS attack or something. But I need to let out a titch of markup. Christian. On 7-May-09, at 17:28 , Martin Strand wrote: If you need to parse html input, from a rich text editor, a remote website, uploaded documents, etc, I would recommend nekohtml: http://nekohtml.sourceforge.net/ It cleans up broken html and you can easily add a filter to only allow certain tags: http://nekohtml.sourceforge.net/filters.html Martin On Thu, 07 May 2009 22:58:56 +0200, Howard Lewis Ship hls...@gmail.com wrote: I'd tend to do this on the other end, if possible; parse user input (or RSS feed, or whatever) into XML and transform out the content you don't like, then store that in DB or render it raw. On Thu, May 7, 2009 at 1:26 PM, Christian Edward Gruber christianedwardgru...@gmail.com wrote: Hi, I was considering how to write a minimal markup component - that is a component which can handle encoding raw text into safe text much the same way MarkupWriterImpl passes to a Text node which encodes html entities, etc., but in this case, letting a few of them pass. One simple way is just to create an t:output/ like component which pre-encodes before passing on the text to the MarkupWriter, but I think that's sort of a cheap hack. Can I contribute an alternate MarkupWriter implementation with a marker annotation that I can obtain for beginRender()? The use case I'm trying to solve (without doing a lot of extra code/storage, is to allow extremely minimal markup through - specifically p,strong,em, ul, dl, ol, li, tabletrthtd. It would disallow all other markup, and strip out any style, class, or id attributes. It's to allow a bit of (safe) data entry that can include some rendering hints. Probably my first go will be to create a component that pre-encodes and does a MarkupWriter.writewRaw() with the results, but it feels like a bad hack. cheers, Christian. Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pause after successfull authentication
Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. Unfortunately I can't help you, you have not given sufficient information, please post your code and explain clearly what you are trying to do. If this is a spring configuration issue then you are more likely to get a better answer by posting to the appropriate list. Kind regards, Peter - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 8 May, 2009 07:58:17 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Pause after successfull authentication First sorry peter for late reply. Actually i have done almost same by adding dummy loop but that work randomly. Sometime it works and sometime not. Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. thanks Peter Stavrinides wrote: How about: while(taskInProgress){ Thread.sleep(SLEEP_INTERVAL); } - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 27 February, 2009 15:45:35 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Pause after successfull authentication I have a application with acegi configured through spring. It uses Spring, Tapestry, Hivemodule. I do manul authentication in tapestry java file by ProcessingFilterClassObject.attemptAuthentication( username, password ). Everything works good, and after successfull authentication user is redirected to URL defined for defaultTargetUrl property. After successfull authentication i need to do some processing and set the things in session before control goes to defaultTargetUrl. Is it possible to hold to control and release it manually after my processing is completed. -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2395702.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2843603.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t5: use image for submit
Another option: input type=image src= / DH - Original Message - From: Ulrich Stärk u...@spielviel.de To: Tapestry users users@tapestry.apache.org Sent: Thursday, May 07, 2009 6:01 PM Subject: Re: t5: use image for submit Am 07.05.2009 11:57 schrieb Angelo Chen: Hi, Is there a way to use image for submit? seems, we have only input t:type=submit value=111/ a t:type=linksubmit t:id=somethingimg src=path/to/image alt=image //a - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Solving the T5 Documentation Dilemma
-1 for forums +1 for wiki Wiki is much better to create persistent knowledge, imho. We can try it open for guests thus it would be easier to start for occasional users. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
t5: model with same entry got two 'selected'
Hi, In a drop down list using select, I have a list of countries, to make it easier, I put some common countries in the top, rest at bottom, the common countries got repeated as well, now when Tapestry 5 generates the html code, it generates two 'selected' entries in the html list, this is logical, but when clicked, browser will select the one at the bottom, instead at the common countries area, is there a way to generate only one 'selected' entry? or any good idea in dropping down a long list like countries and give user option to choose from common ones? Thanks, Angelo input t:type=select t:id=country model=countries t:value=country / option selected=selected value=USUS/option option value=PNPitcairn/option option value=PLPoland/option option value=PTPortugal/option option selected=selected value=USUS/option // any way to remove 'selected' attribute? -- View this message in context: http://www.nabble.com/t5%3A-model-with-same-entry-got-two-%27selected%27-tp23442499p23442499.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [ANNOUNCE] Apache Tapestry 5.1.0.5 (stable release)
Hi, a number of links including http://tapestry.apache.org/tapestry5.1/apidocs/ does not work Regards, Sergey - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t5: model with same entry got two 'selected'
You could try with option groups. See http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/SelectModel.html Uli Am 08.05.2009 11:02 schrieb Angelo Chen: Hi, In a drop down list using select, I have a list of countries, to make it easier, I put some common countries in the top, rest at bottom, the common countries got repeated as well, now when Tapestry 5 generates the html code, it generates two 'selected' entries in the html list, this is logical, but when clicked, browser will select the one at the bottom, instead at the common countries area, is there a way to generate only one 'selected' entry? or any good idea in dropping down a long list like countries and give user option to choose from common ones? Thanks, Angelo input t:type=select t:id=country model=countries t:value=country / option selected=selected value=USUS/option option value=PNPitcairn/option option value=PLPoland/option option value=PTPortugal/option option selected=selected value=USUS/option // any way to remove 'selected' attribute? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pause after successfull authentication
Ok let me try to explain my scenario in detail: I have custom filter extending AuthenticationProcessingFilter. So as user tries to logon i call attemptAuthentication method of custome class. After user is authenticated SUCCESSFULLY i have to: 1- made extra checks based upon roles assigned to user. and have to send user back to login page. 2- Need to set lots of extra info in session and logg events i DB So as soon as user was authenticated successfully control transfers to targetUrl defined without extra checks i need. This is main problem. Now i override the onSuccessfullAuthentication method and put all extra role checking and other stuff in it. It works. Howeever if if find some problem in role i have to send user back to login page now with custom error messages. Peter Stavrinides wrote: Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. Unfortunately I can't help you, you have not given sufficient information, please post your code and explain clearly what you are trying to do. If this is a spring configuration issue then you are more likely to get a better answer by posting to the appropriate list. Kind regards, Peter - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 8 May, 2009 07:58:17 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Pause after successfull authentication First sorry peter for late reply. Actually i have done almost same by adding dummy loop but that work randomly. Sometime it works and sometime not. Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. thanks Peter Stavrinides wrote: How about: while(taskInProgress){ Thread.sleep(SLEEP_INTERVAL); } - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 27 February, 2009 15:45:35 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Pause after successfull authentication I have a application with acegi configured through spring. It uses Spring, Tapestry, Hivemodule. I do manul authentication in tapestry java file by ProcessingFilterClassObject.attemptAuthentication( username, password ). Everything works good, and after successfull authentication user is redirected to URL defined for defaultTargetUrl property. After successfull authentication i need to do some processing and set the things in session before control goes to defaultTargetUrl. Is it possible to hold to control and release it manually after my processing is completed. -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2395702.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2843603.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2844516.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pause after successfull authentication
Peter Stavrinides wrote: Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. Unfortunately I can't help you, you have not given sufficient information, please post your code and explain clearly what you are trying to do. If this is a spring configuration issue then you are more likely to get a better answer by posting to the appropriate list. Kind regards, Peter - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 8 May, 2009 07:58:17 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Pause after successfull authentication First sorry peter for late reply. Actually i have done almost same by adding dummy loop but that work randomly. Sometime it works and sometime not. Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. thanks Peter Stavrinides wrote: How about: while(taskInProgress){ Thread.sleep(SLEEP_INTERVAL); } - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 27 February, 2009 15:45:35 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Pause after successfull authentication I have a application with acegi configured through spring. It uses Spring, Tapestry, Hivemodule. I do manul authentication in tapestry java file by ProcessingFilterClassObject.attemptAuthentication( username, password ). Everything works good, and after successfull authentication user is redirected to URL defined for defaultTargetUrl property. After successfull authentication i need to do some processing and set the things in session before control goes to defaultTargetUrl. Is it possible to hold to control and release it manually after my processing is completed. -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2395702.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2843603.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2844521.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pause after successfull authentication
This is not an uncommon scenario, but surely this is a question for the Spring - Aecgi forums. you will get a better answer there. Now i override the onSuccessfullAuthentication method and put all extra role checking and other stuff in it I don't use Aecgi, but I don't think thats the correct approach, there is a big message in the API that says (Do not use this class directly), you are also overriding an event method as well, which may explain why you are having trouble controlling redirection, instead you should probably look at using the appropriate service i.e.: Use / provide a custom AuthenticationProvider, or at least use an AthenticationManager implementation that is suited. Kind regards, Peter - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 8 May, 2009 13:10:18 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Pause after successfull authentication Ok let me try to explain my scenario in detail: I have custom filter extending AuthenticationProcessingFilter. So as user tries to logon i call attemptAuthentication method of custome class. After user is authenticated SUCCESSFULLY i have to: 1- made extra checks based upon roles assigned to user. and have to send user back to login page. 2- Need to set lots of extra info in session and logg events i DB So as soon as user was authenticated successfully control transfers to targetUrl defined without extra checks i need. This is main problem. Now i override the onSuccessfullAuthentication method and put all extra role checking and other stuff in it. It works. Howeever if if find some problem in role i have to send user back to login page now with custom error messages. Peter Stavrinides wrote: Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. Unfortunately I can't help you, you have not given sufficient information, please post your code and explain clearly what you are trying to do. If this is a spring configuration issue then you are more likely to get a better answer by posting to the appropriate list. Kind regards, Peter - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 8 May, 2009 07:58:17 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Pause after successfull authentication First sorry peter for late reply. Actually i have done almost same by adding dummy loop but that work randomly. Sometime it works and sometime not. Is there any configuration in acegi/spring to wait until request fwded manually or adding some delay. thanks Peter Stavrinides wrote: How about: while(taskInProgress){ Thread.sleep(SLEEP_INTERVAL); } - Original Message - From: aahsanJamshaid ahsan.jamsh...@techno-soft.com To: users@tapestry.apache.org Sent: Friday, 27 February, 2009 15:45:35 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Pause after successfull authentication I have a application with acegi configured through spring. It uses Spring, Tapestry, Hivemodule. I do manul authentication in tapestry java file by ProcessingFilterClassObject.attemptAuthentication( username, password ). Everything works good, and after successfull authentication user is redirected to URL defined for defaultTargetUrl property. After successfull authentication i need to do some processing and set the things in session before control goes to defaultTargetUrl. Is it possible to hold to control and release it manually after my processing is completed. -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2395702.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2843603.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://n2.nabble.com/Pause-after-successfull-authentication-tp2395702p2844516.html Sent from
Re: Encoding with exceptions
That's also possible. I could do that and then render... hmm... Christian. On 8-May-09, at 03:18 , Otho wrote: Is html input mandatory? Id not, how about using bbcode or some wiki markup language? 2009/5/7 Christian Edward Gruber christianedwardgru...@gmail.com Yeah - I don't, at least not yet. I probably will use such an editor later, but I need a protected output system so I'm not using t:outputRaw / since that's quite dangerous when writing from a database. I want ot make sure that even if bad data got in, it can't come out as an XSS attack or something. But I need to let out a titch of markup. Christian. On 7-May-09, at 17:28 , Martin Strand wrote: If you need to parse html input, from a rich text editor, a remote website, uploaded documents, etc, I would recommend nekohtml: http://nekohtml.sourceforge.net/ It cleans up broken html and you can easily add a filter to only allow certain tags: http://nekohtml.sourceforge.net/filters.html Martin On Thu, 07 May 2009 22:58:56 +0200, Howard Lewis Ship hls...@gmail.com wrote: I'd tend to do this on the other end, if possible; parse user input (or RSS feed, or whatever) into XML and transform out the content you don't like, then store that in DB or render it raw. On Thu, May 7, 2009 at 1:26 PM, Christian Edward Gruber christianedwardgru...@gmail.com wrote: Hi, I was considering how to write a minimal markup component - that is a component which can handle encoding raw text into safe text much the same way MarkupWriterImpl passes to a Text node which encodes html entities, etc., but in this case, letting a few of them pass. One simple way is just to create an t:output/ like component which pre-encodes before passing on the text to the MarkupWriter, but I think that's sort of a cheap hack. Can I contribute an alternate MarkupWriter implementation with a marker annotation that I can obtain for beginRender()? The use case I'm trying to solve (without doing a lot of extra code/storage, is to allow extremely minimal markup through - specifically p,strong,em, ul, dl, ol, li, tabletrthtd. It would disallow all other markup, and strip out any style, class, or id attributes. It's to allow a bit of (safe) data entry that can include some rendering hints. Probably my first go will be to create a component that pre- encodes and does a MarkupWriter.writewRaw() with the results, but it feels like a bad hack. cheers, Christian. Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t5: use image for submit
Another option, using css: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/styling/linksandsubmits1 Geoff On 08/05/2009, at 5:54 PM, DH wrote: Another option: input type=image src= / DH - Original Message - From: Ulrich Stärk u...@spielviel.de To: Tapestry users users@tapestry.apache.org Sent: Thursday, May 07, 2009 6:01 PM Subject: Re: t5: use image for submit Am 07.05.2009 11:57 schrieb Angelo Chen: Hi, Is there a way to use image for submit? seems, we have only input t:type=submit value=111/ a t:type=linksubmit t:id=somethingimg src=path/to/image alt=image //a - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [ANNOUNCE] Apache Tapestry 5.1.0.5 (stable release)
I'm re-running the site build now. On Fri, May 8, 2009 at 1:04 AM, Sergey Didenko sergey.dide...@gmail.com wrote: Hi, a number of links including http://tapestry.apache.org/tapestry5.1/apidocs/ does not work Regards, Sergey - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.1] Custom component now causes NullPointerException
After upgrading from 5.0.18 to 5.1.0.5, custom components on my page now cause the following exception: 2009-05-08 11:08:15,184, ERROR, [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler], line 62, Processing of request failed with uncaught exception: Exception assembling root component of page CreatePortfolio: Exception assembling embedded component 'compSelectStudy' (of type com.db.grade.web.tapestry.components.SelectStudy, within CreatePortfolio): java.lang.NullPointerException java.lang.RuntimeException: Exception assembling root component of page CreatePortfolio: Exception assembling embedded component 'compSelectStudy' (of type com.db.grade.web.tapestry.components.SelectStudy, within CreatePortfolio): java.lang.NullPointerException at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:110) at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159) at $PageLoader_12120c10d8e.loadPage($PageLoader_12120c10d8e.java) at org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) at org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) at $PagePool_12120c10d8d.checkout($PagePool_12120c10d8d.java) at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) at $RequestPageCache_12120c10d8c.get($RequestPageCache_12120c10d8c.java) at $RequestPageCache_12120c10d74.get($RequestPageCache_12120c10d74.java) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:52) at org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.java:1943) at $PageRenderRequestHandler_12120c10d77.handle($PageRenderRequestHandler_12120c10d77.java) at $PageRenderRequestHandler_12120c10d63.handle($PageRenderRequestHandler_12120c10d63.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) at $ComponentRequestHandler_12120c10d67.handlePageRender($ComponentRequestHandler_12120c10d67.java) at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) at $Dispatcher_12120c10d69.dispatch($Dispatcher_12120c10d69.java) at $Dispatcher_12120c10d5c.dispatch($Dispatcher_12120c10d5c.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) at com.db.grade.web.acegi.user.WebSsoAuthenticatingFilter.service(WebSsoAuthenticatingFilter.java:98) at $RequestFilter_12120c10d5b.service($RequestFilter_12120c10d5b.java) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at com.db.grade.web.tapestry.services.AppModule$1.service(AppModule.java:109) at $RequestFilter_12120c10d5a.service($RequestFilter_12120c10d5a.java) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWrapper$1.doFilter(RequestFilterWrapper.java:60) at nu.localhost.tapestry5.springsecurity.services.internal.SpringSecurityExceptionTranslationFilter.doFilterHttp(SpringSecurityExceptionTranslationFilter.java:100) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWrapper.service(RequestFilterWrapper.java:55) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at
Re: [T5.1] Custom component now causes NullPointerException
No guesses, not without seeing some code. You're doing something in an initializer that's odd. On Fri, May 8, 2009 at 8:14 AM, Eric Ma eric...@db.com wrote: After upgrading from 5.0.18 to 5.1.0.5, custom components on my page now cause the following exception: 2009-05-08 11:08:15,184, ERROR, [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler], line 62, Processing of request failed with uncaught exception: Exception assembling root component of page CreatePortfolio: Exception assembling embedded component 'compSelectStudy' (of type com.db.grade.web.tapestry.components.SelectStudy, within CreatePortfolio): java.lang.NullPointerException java.lang.RuntimeException: Exception assembling root component of page CreatePortfolio: Exception assembling embedded component 'compSelectStudy' (of type com.db.grade.web.tapestry.components.SelectStudy, within CreatePortfolio): java.lang.NullPointerException at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:110) at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159) at $PageLoader_12120c10d8e.loadPage($PageLoader_12120c10d8e.java) at org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210) at org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99) at $PagePool_12120c10d8d.checkout($PagePool_12120c10d8d.java) at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51) at $RequestPageCache_12120c10d8c.get($RequestPageCache_12120c10d8c.java) at $RequestPageCache_12120c10d74.get($RequestPageCache_12120c10d74.java) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:52) at org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.java:1943) at $PageRenderRequestHandler_12120c10d77.handle($PageRenderRequestHandler_12120c10d77.java) at $PageRenderRequestHandler_12120c10d63.handle($PageRenderRequestHandler_12120c10d63.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) at $ComponentRequestHandler_12120c10d67.handlePageRender($ComponentRequestHandler_12120c10d67.java) at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) at $Dispatcher_12120c10d69.dispatch($Dispatcher_12120c10d69.java) at $Dispatcher_12120c10d5c.dispatch($Dispatcher_12120c10d5c.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) at com.db.grade.web.acegi.user.WebSsoAuthenticatingFilter.service(WebSsoAuthenticatingFilter.java:98) at $RequestFilter_12120c10d5b.service($RequestFilter_12120c10d5b.java) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at com.db.grade.web.tapestry.services.AppModule$1.service(AppModule.java:109) at $RequestFilter_12120c10d5a.service($RequestFilter_12120c10d5a.java) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWrapper$1.doFilter(RequestFilterWrapper.java:60) at nu.localhost.tapestry5.springsecurity.services.internal.SpringSecurityExceptionTranslationFilter.doFilterHttp(SpringSecurityExceptionTranslationFilter.java:100) at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) at nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWrapper.service(RequestFilterWrapper.java:55) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_12120c10d5d.service($RequestHandler_12120c10d5d.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at
Re: [T5.1] Custom component now causes NullPointerException
It looks like your base component class invokes Component.getPage() inside its constructor. Am I right? Could you post its code here? -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
FW: Tapestry upgrade
Hi I think this is a bug. I’ve had no response from you, should I just raise it as a bug? Any advice would be appreciated. Regards Howard -- This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates (Algorithmics). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory. -- ---BeginMessage--- Hi I’m trying to upgrade from tapestry 4.0.2 to 4.1.6 and am seeing some strange behaviour. Basically we have our own implementation of org.apache.hivemind.Messages which extends org.apache.hivemind.impl.AbstractMessages now in our implementation we have a method called getMessage(org.springframework.context.MessageSourceResolvable key) and in our tapestry pages we’re using ognl:messages.getMessage(request.getAttribute(‘message’)) which worked fine in 4.0.2 because ognl called the .apache.hivemind.impl.AbstractMessages.getMessage(String key) which is what we want but in 4.1.6 it’s trying to convert the String ‘welcome.problem.session.expired’ into org.springframework.context.MessageSourceResolvable. I guess because it’s trying to call getMessage(org.springframework.context.MessageSourceResolvable key) in our implementation. I also have the same problem with a component of ours that has a parameter named key to which we pass in ‘literal:welcome.username’ and in the component we call messages.getMessage(key) which results in the same error. ‘Unable to read OGNL expression: Unable to convert type java.lang.String of welcome.username to type of org.springframework.context.MessageSourceResolvable’. I’m a little confused as to why it doesn’t call the correct method with the String parameter. However if I call messages.getMessage(‘welcome.username’) hard coding the msgkey it works fine. Does that mean that in the new ognl/tapestry implementation we cannot pass a component parameter/object(which is String) to an overloaded method? Any advice on how to rectify this would be greatly appreciated. Regards Howard Kelsey ---End Message--- - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Custom component now causes NullPointerException
Thiago H. de Paula Figueiredo wrote: It looks like your base component class invokes Component.getPage() inside its constructor. Am I right? Could you post its code here? Thiago You are right. Code is in the attached file. Thanks, http://www.nabble.com/file/p23448232/component_code.txt component_code.txt -- View this message in context: http://www.nabble.com/-T5.1--Custom-component-now-causes-NullPointerException-tp23447956p23448232.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Custom component now causes NullPointerException
Try using lazy loading on getPage(), avoing calling resources.getPage() in your field initializer. Something like: public BasePage getPage() { if (page == null) { page = (BasePage) resources.getPage(); } return this.page; } -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Custom component now causes NullPointerException
Thiago H. de Paula Figueiredo wrote: Try using lazy loading on getPage(), avoing calling resources.getPage() in your field initializer. Something like: public BasePage getPage() { if (page == null) { page = (BasePage) resources.getPage(); } return this.page; } Thiago Yes, that did the trick. Thanks for the suggestion. Looks like the lifecycle of a component has changed between T5.1 and T5.0. -- View this message in context: http://www.nabble.com/-T5.1--Custom-component-now-causes-NullPointerException-tp23447956p23449036.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Custom component now causes NullPointerException
Em Fri, 08 May 2009 13:15:21 -0300, Eric Ma eric...@db.com escreveu: Yes, that did the trick. Thanks for the suggestion. Looks like the lifecycle of a component has changed between T5.1 and T5.0. The lifecycle itself hasn't changed, but its internal implementation was optimized by Howard since 5.1 -- Thiago H. de Paula Figueiredo Consultor, desenvolvedor e instrutor em Java http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Building osgi application by using Tapestry-OSGi
Hi, I was just built a new project for osgi solution of tapestry, and the quickstart has posted in tapestry-osgi's google group. Tapestry-OSGi Quickstart: http://groups.google.com/group/tapestry-osgi/web/building-osgi-application-by-using-tapestry-osgi Tapestry-OSGi Google Group: http://groups.google.com/group/tapestry-osgi -- Regards, Donf Yang -- To be surprised,to wonder,is to begin to understand.
Re: FW: Tapestry upgrade
http://jira.opensymphony.com/browse/OGNL but it looks like it's inactive for some time now... I'd say it's fastest to rename getMessage(org.springframework.context.MessageSourceResolvable key) in your base class or write a simple binding prefix that has the request injected to it and that simply returns: component.getMessages().getMessage(getRequest().getAttribute( value )) and in the html use: span jwcid=@Insert value=msgCustom:message / On Fri, May 8, 2009 at 6:05 PM, howard.kel...@algorithmics.com wrote: Hi I think this is a bug. I’ve had no response from you, should I just raise it as a bug? Any advice would be appreciated. Regards Howard This email and any files transmitted with it are confidential and proprietary to Algorithmics Incorporated and its affiliates (Algorithmics). If received in error, use is prohibited. Please destroy, and notify sender. Sender does not waive confidentiality or privilege. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. Algorithmics does not accept liability for any errors or omissions. Any commitment intended to bind Algorithmics must be reduced to writing and signed by an authorized signatory. -- Forwarded message -- From: howard.kel...@algorithmics.com To: users@tapestry.apache.org Date: Mon, 27 Apr 2009 17:03:36 +0100 Subject: Tapestry upgrade Hi I’m trying to upgrade from tapestry 4.0.2 to 4.1.6 and am seeing some strange behaviour. Basically we have our own implementation of org.apache.hivemind.Messages which extends org.apache.hivemind.impl.AbstractMessages now in our implementation we have a method called getMessage(org.springframework.context.MessageSourceResolvable key) and in our tapestry pages we’re using ognl:messages.getMessage(request.getAttribute(‘message’)) which worked fine in 4.0.2 because ognl called the .apache.hivemind.impl.AbstractMessages.getMessage(String key) which is what we want but in 4.1.6 it’s trying to convert the String ‘welcome.problem.session.expired’ into org.springframework.context.MessageSourceResolvable. I guess because it’s trying to call getMessage(org.springframework.context.MessageSourceResolvable key) in our implementation. I also have the same problem with a component of ours that has a parameter named key to which we pass in ‘literal:welcome.username’ and in the component we call messages.getMessage(key) which results in the same error. ‘Unable to read OGNL expression: Unable to convert type java.lang.String of welcome.username to type of org.springframework.context.MessageSourceResolvable’. I’m a little confused as to why it doesn’t call the correct method with the String parameter. However if I call messages.getMessage(‘welcome.username’) hard coding the msgkey it works fine. Does that mean that in the new ognl/tapestry implementation we cannot pass a component parameter/object(which is String) to an overloaded method? Any advice on how to rectify this would be greatly appreciated. Regards Howard Kelsey - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Loop in javascript?
Thiago H. de Paula Figueiredo wrote: One way of doing it: in your page or component class, @Inject RenderSupport and generate Javascript through RenderSupport.addScript(). I made the loop in javascript, then added an Ajax.Request to get json data from an onEvent in my component. The ajax request sends an index which gives it the appropirate element from a List. I use it to put markers on a Google map that's created in my tml file. A friend helped me figure it out :-) dagdag Christine - dagdag is just a two-character rotation of byebye. smime.p7s Description: S/MIME Cryptographic Signature
T5: Passing named/structured-type params in URLs?
Hi, I've been using T5 to develop a scientific database Web frontend, and a requirement is that Web visitors need to be able to bookmark pages, i.e. the parameters of what paper, dataset, etc. have to be in the URL. Having looked at the Web documentation and the Packt book, it seemed that PageLinks are the way to do this... and that works very well for passing a single parameter of simple type (I tried Integer and String) via the URL. But it's passed in an unnamed way, i.e. PageLink'ing a parameter of value 1234 makes a URL like .../linkedpage/1234. I need to be able to pass a) one of several roughly equivalent single parameters (because the name of the parameter determines which of the bibliographic key schemes to use when looking up the paper in the database) b) optional extra parameters, to allow specifying only one particular dataset or even data axis in the paper to be viewed c) it would be good to be able to specify multiple datasets, e.g. to construct a bookmarkable URL which displays datasets 1, 2 and 4 of a given paper. I'd naively expect to be able to do this by passing a Collection of the values to PageLink, but haven't even tested if this works as I wanted to get your collective advice first! I can do these things by hand, and in fact am doing so at the moment, but it's by using normal URL query strings which is not really the Tapestry way. It also means that life is rather awkward as I have to manually do the URL encoding and getting the query params and context path by accessing the Request. Yuck. In short, I'd like to employ the Tapestry way of having a single page where various ways of slicing the data are accessed via a sort of URL API scheme semantically similar to this: .../view?p=1234 .../view?irn=12349876 (these first two are two ways to access all the data in the same paper) .../view?p=1234d=1 (view one dataset only) .../view?p=1234d=1y=2 (view one axis of one axis of one dataset only) .../view?p=1234d=1,2,4y=1,3 (view specific axes of specific datasets only... I wouldn't provide links like this, but users who want specific data might construct them themselves --- hence why I called the URL scheme an API) So, is there a Tapestry meachnism for doing something like this? I can do it right now, but I'd rather not have to fight the system. I would expect Tapestry to do it a bit prettier than what I've shown, maybe *something* like .../view/irn/12349876/d/1,2,4 (yes, there are issues with telling what's a param name and what's a value... I just mean this schematically) But right now I don't even know where to start looking! Help, please!? ;) Thanks in advance... Andy - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Passing named/structured-type params in URLs?
Em Fri, 08 May 2009 17:39:07 -0300, Andy Buckley andy.buck...@durham.ac.uk escreveu: So, is there a Tapestry meachnism for doing something like this? I can do it right now, but I'd rather not have to fight the system. I would expect Tapestry to do it a bit prettier than what I've shown, maybe *something* like .../view/irn/12349876/d/1,2,4 (yes, there are issues with telling what's a param name and what's a value... I just mean this schematically) But right now I don't even know where to start looking! Help, please!? ;) Just use a List as the activation context value. For each named parameter one want, add the name first, the value second. The above URL would be constructed by Tapestry if you returned a List populated like this: List list = new ArrayList(); list.add(irn); list.add(1245569); list.add(d); list.add(1,2,4); Then, declare a onActivate(EventContext context) method and reconstruct the pairs: for (int i = 0; i context.getCount() / 2; i++) { String name = context.get(String.class, i * 2); String value = context.get(String.class, i * 2 + 1) // instead of String, you could use any type here } I have not tested this code, but I guess you get the idea. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem running Tap 5.1.0.4 on Jboss 5.0.1.GA
Thanks for the reply! I have tried your suggestion, but I still have the same error. After some debugging, I am not convinced that ClassNameLocatorImpl.scanURL(String, CollectionString, URL) line: 117 caters for URL like org.jboss.virtual.plugins.vfs.VirtualFileURLConnection:vfszip:/home/matmsh/installed/jbosses/jboss-5.0.1.GA/server/default/deploy/testApp.war/WEB-INF/lib/tapestry-core-5.1.0.5.jar/org/apache/tapestry5/corelib/pages Shing --- On Fri, 8/5/09, Eric Ma eric...@db.com wrote: From: Eric Ma eric...@db.com Subject: Re: Problem running Tap 5.1.0.4 on Jboss 5.0.1.GA To: users@tapestry.apache.org Date: Friday, 8 May, 2009, 5:37 AM Shing Hing Man wrote: When I deploy a simple Tap 5.1.0.4 application on JBoss 5.0.1.GA and access the index page, I get the following error. java.lang.IllegalArgumentException: Unable to resolve 'ExceptionReport' to a known page name. Available page names: (blank), About, Contact, Index. I wonder if someone else has encountered the same problem and has a solution for it. Thanks in advance for any assistance! Shing I ran into the same problem when I used T5.0.18, JBoss 5.0.1.GA, and JDK1.6.0 (both compile and runtime). If I compile with Java 1.5 compliance and run under JDK1.6.0, the problem goes away. With T5.1.0.3, I had an issue with nbsp; in my .tml. Will try to spend sometime to resolve it. -- View this message in context: http://www.nabble.com/Problem-running-Tap-5.1.0.4-on-Jboss-5.0.1.GA-tp23368295p23435800.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Problem running Tap 5.1.0.4 on Jboss 5.0.1.GA
Em Fri, 08 May 2009 18:33:28 -0300, Shing Hing Man mat...@yahoo.com escreveu: After some debugging, I am not convinced that ClassNameLocatorImpl.scanURL(String, CollectionString, URL) line: 117 caters for URL like org.jboss.virtual.plugins.vfs.VirtualFileURLConnection:vfszip:/home/matmsh/installed/jbosses/jboss-5.0.1.GA/server/default/deploy/testApp.war/WEB-INF/lib/ tapestry-core-5.1.0.5.jar/org/apache/tapestry5/corelib/pages I guess this is related to another recent discussion in this mailing list (http://www.nabble.com/-T5.1--How-do-you-advise-ClassNameLocator--to23396992s302.html). Short answer: Tapestry does not handle these vfszip URLs. You can, however, override the ClasspathURLConverter service to map these URLs to normal (not JBOss speficic like file: and jar:) ones. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Passing named/structured-type params in URLs?
That should work. I think it could be interesting, though, if tapestry provided an additional persistence mechanism, ala: @Persist(PersistenceConstants.QUERY_PARAMETER) private String p; @Persist(PersistenceConstants.QUERY_PARAMETR) private Integer irn; which would then take the values in p and irn and stash them in the url, like: p=valueEncodedValueirn=valueEncodedValue Obviously this wouldn't be appropriate to use everywhere; if you're concerned about users tampering with URLs, you'd want to avoid it. But in cases like that presented below, where you expressly want users to be able to muck about with parameters, it would be useful. Note that this is similar to the current client-side persistence mechanism, except that mechanism a) rolls all persisted values into a single parameter and b) base64 encodes the parameter. As long as you've got the basic mechanism for doing the above, you could translate it into a pretty url via url rewriting without too much trouble. Thoughts? Robert On May 8, 2009, at 5/83:59 PM , Thiago H. de Paula Figueiredo wrote: Em Fri, 08 May 2009 17:39:07 -0300, Andy Buckley andy.buck...@durham.ac.uk escreveu: So, is there a Tapestry meachnism for doing something like this? I can do it right now, but I'd rather not have to fight the system. I would expect Tapestry to do it a bit prettier than what I've shown, maybe *something* like .../view/irn/12349876/d/1,2,4 (yes, there are issues with telling what's a param name and what's a value... I just mean this schematically) But right now I don't even know where to start looking! Help, please!? ;) Just use a List as the activation context value. For each named parameter one want, add the name first, the value second. The above URL would be constructed by Tapestry if you returned a List populated like this: List list = new ArrayList(); list.add(irn); list.add(1245569); list.add(d); list.add(1,2,4); Then, declare a onActivate(EventContext context) method and reconstruct the pairs: for (int i = 0; i context.getCount() / 2; i++) { String name = context.get(String.class, i * 2); String value = context.get(String.class, i * 2 + 1) // instead of String, you could use any type here } I have not tested this code, but I guess you get the idea. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Clarification on discardPersistentFieldChanges
Hi, I have a question about ComponentResources discardPersistentFieldChanges. The page in question is a configuration page and contains a large number of components that each have some persisted state and I'm currently calling discardPersistentFieldChanges on the page onSubmit.. I want to make sure that all persisted state is discarded for the page as well as for all components used in that page. The documentation for this function says: Discards all persistent field changes for the page containing the component. My reading of this is that I can call discardPersistentFieldChanges on any component on the page and it will discard all persistent field changes on the page and on all components used in the page. Is this true or do I need to explicitly call discardPersistentFieldChanges on each component? Thanks. Chuck Kring - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Apache Tapestry on Google Maps
've shared a map with you called Apache Tapestry Users: You can view and edit this map at http://maps.google.com/maps/ms?source=s_qhl=engeocode=ie=UTF8oe=UTF8msa=0msid=106662057515738259524.0004696f8216ba268b74a Note: To edit this map, you'll need to sign into Google with this email address. To use a different email address, just reply to this message and ask me to invite your other one. If you don't have a Google account, you can create one at http://www.google.com/accounts/newaccount?reqemail=hls...@comcast.net. Simply log into Google Maps and click the Edit button; you can then add a marker for your (approximate) location and your name. Add a few details if you like. It'll be fun to see just exactly who is using Tapestry and where! -- Howard Lewis Ship Creator: Apache Tapestry and Apache HiveMind
Re: Apache Tapestry on Google Maps
btw, there's also this map: http://www.ohloh.net/p/4017 On Sat, May 9, 2009 at 3:11 AM, Howard Lewis Ship hls...@comcast.net wrote: 've shared a map with you called Apache Tapestry Users: You can view and edit this map at http://maps.google.com/maps/ms?source=s_qhl=engeocode=ie=UTF8oe=UTF8msa=0msid=106662057515738259524.0004696f8216ba268b74a Note: To edit this map, you'll need to sign into Google with this email address. To use a different email address, just reply to this message and ask me to invite your other one. If you don't have a Google account, you can create one at http://www.google.com/accounts/newaccount?reqemail=hls...@comcast.net. Simply log into Google Maps and click the Edit button; you can then add a marker for your (approximate) location and your name. Add a few details if you like. It'll be fun to see just exactly who is using Tapestry and where! -- Howard Lewis Ship Creator: Apache Tapestry and Apache HiveMind -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Passing named/structured-type params in URLs?
Have you tried Request Parameters. They do the job well. See: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/passingdatabetweenpages1 Geoff http://jumpstart.doublenegative.com.au On 09/05/2009, at 8:29 AM, Robert Zeigler wrote: That should work. I think it could be interesting, though, if tapestry provided an additional persistence mechanism, ala: @Persist(PersistenceConstants.QUERY_PARAMETER) private String p; @Persist(PersistenceConstants.QUERY_PARAMETR) private Integer irn; which would then take the values in p and irn and stash them in the url, like: p=valueEncodedValueirn=valueEncodedValue Obviously this wouldn't be appropriate to use everywhere; if you're concerned about users tampering with URLs, you'd want to avoid it. But in cases like that presented below, where you expressly want users to be able to muck about with parameters, it would be useful. Note that this is similar to the current client-side persistence mechanism, except that mechanism a) rolls all persisted values into a single parameter and b) base64 encodes the parameter. As long as you've got the basic mechanism for doing the above, you could translate it into a pretty url via url rewriting without too much trouble. Thoughts? Robert On May 8, 2009, at 5/83:59 PM , Thiago H. de Paula Figueiredo wrote: Em Fri, 08 May 2009 17:39:07 -0300, Andy Buckley andy.buck...@durham.ac.uk escreveu: So, is there a Tapestry meachnism for doing something like this? I can do it right now, but I'd rather not have to fight the system. I would expect Tapestry to do it a bit prettier than what I've shown, maybe *something* like .../view/irn/12349876/d/1,2,4 (yes, there are issues with telling what's a param name and what's a value... I just mean this schematically) But right now I don't even know where to start looking! Help, please!? ;) Just use a List as the activation context value. For each named parameter one want, add the name first, the value second. The above URL would be constructed by Tapestry if you returned a List populated like this: List list = new ArrayList(); list.add(irn); list.add(1245569); list.add(d); list.add(1,2,4); Then, declare a onActivate(EventContext context) method and reconstruct the pairs: for (int i = 0; i context.getCount() / 2; i++) { String name = context.get(String.class, i * 2); String value = context.get(String.class, i * 2 + 1) // instead of String, you could use any type here } I have not tested this code, but I guess you get the idea. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Passing named/structured-type params in URLs?
Right. You can certainly use request parameters, and the poster, in fact, / is/ using request parameters currently. But that's painful. You have to manage the parameters and wrangle type coercion manually. If you're doing this a lot, that's a lot of repetitive boiler-plate code. Which sounds exactly like something tapestry should be able to take care of for you. Sort of like how the @PageActivationContext makes life a lot easier for the pages out there with a single activation context. Robert On May 9, 2009, at 5/912:06 AM , Geoff Callender wrote: Have you tried Request Parameters. They do the job well. See: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/passingdatabetweenpages1 Geoff http://jumpstart.doublenegative.com.au On 09/05/2009, at 8:29 AM, Robert Zeigler wrote: That should work. I think it could be interesting, though, if tapestry provided an additional persistence mechanism, ala: @Persist(PersistenceConstants.QUERY_PARAMETER) private String p; @Persist(PersistenceConstants.QUERY_PARAMETR) private Integer irn; which would then take the values in p and irn and stash them in the url, like: p=valueEncodedValueirn=valueEncodedValue Obviously this wouldn't be appropriate to use everywhere; if you're concerned about users tampering with URLs, you'd want to avoid it. But in cases like that presented below, where you expressly want users to be able to muck about with parameters, it would be useful. Note that this is similar to the current client-side persistence mechanism, except that mechanism a) rolls all persisted values into a single parameter and b) base64 encodes the parameter. As long as you've got the basic mechanism for doing the above, you could translate it into a pretty url via url rewriting without too much trouble. Thoughts? Robert On May 8, 2009, at 5/83:59 PM , Thiago H. de Paula Figueiredo wrote: Em Fri, 08 May 2009 17:39:07 -0300, Andy Buckley andy.buck...@durham.ac.uk escreveu: So, is there a Tapestry meachnism for doing something like this? I can do it right now, but I'd rather not have to fight the system. I would expect Tapestry to do it a bit prettier than what I've shown, maybe *something* like .../view/irn/12349876/d/1,2,4 (yes, there are issues with telling what's a param name and what's a value... I just mean this schematically) But right now I don't even know where to start looking! Help, please!? ;) Just use a List as the activation context value. For each named parameter one want, add the name first, the value second. The above URL would be constructed by Tapestry if you returned a List populated like this: List list = new ArrayList(); list.add(irn); list.add(1245569); list.add(d); list.add(1,2,4); Then, declare a onActivate(EventContext context) method and reconstruct the pairs: for (int i = 0; i context.getCount() / 2; i++) { String name = context.get(String.class, i * 2); String value = context.get(String.class, i * 2 + 1) // instead of String, you could use any type here } I have not tested this code, but I guess you get the idea. ;) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org