Re: Basic question about URL rewriting and Tapestry 5
I find Tuckey's Url Rewrite Filter a good option for simple rewrites: http://www.tuckey.org/urlrewrite/ Steve. -- Steve Eynon --- If at first you don't succeed, so much for skydiving! On 8 May 2012 04:23, Julien Martin bal...@gmail.com wrote: Thanks Thiago! 2012/5/7 Julien Martin bal...@gmail.com Thanks Thiago! I was not aware of that. J. 2012/5/7 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 07 May 2012 14:19:24 -0300, Julien Martin bal...@gmail.com wrote: Hi all! Hi! @Thiago: My only concern is about SEO optimization. Can you provide any guideline about LinkTransformer usage? I read Igor's blog entry but I am still not sure how to use the LinkTransformer for my specific use case... For SEO optimization, as far as I know, the event URLs are irrelevant, as the crawlers (bots) follow redirects. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Basic question about URL rewriting and Tapestry 5
Thanks Steve. I was also considering: http://ocpsoft.org/rewrite/ Julien. 2012/5/8 Steve Eynon steve.ey...@alienfactory.co.uk I find Tuckey's Url Rewrite Filter a good option for simple rewrites: http://www.tuckey.org/urlrewrite/ Steve. -- Steve Eynon --- If at first you don't succeed, so much for skydiving! On 8 May 2012 04:23, Julien Martin bal...@gmail.com wrote: Thanks Thiago! 2012/5/7 Julien Martin bal...@gmail.com Thanks Thiago! I was not aware of that. J. 2012/5/7 Thiago H. de Paula Figueiredo thiag...@gmail.com On Mon, 07 May 2012 14:19:24 -0300, Julien Martin bal...@gmail.com wrote: Hi all! Hi! @Thiago: My only concern is about SEO optimization. Can you provide any guideline about LinkTransformer usage? I read Igor's blog entry but I am still not sure how to use the LinkTransformer for my specific use case... For SEO optimization, as far as I know, the event URLs are irrelevant, as the crawlers (bots) follow redirects. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issues in a page having multiple forms in tapestry 4
Hi Howard, Can you please advise me on how to configure tapestry to accept large sized requests . Currently im using Tapestry 4.0. In which file do I need to change the settings so as to resolve above issue. Regards Nazar -- View this message in context: http://tapestry.1045711.n5.nabble.com/Issues-in-a-page-having-multiple-forms-in-tapestry-4-tp5675264p5693226.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: tapestry5-jquery simple sample not working
Fixed and released. Yep, that deserves a schooner. Thanks. On 07/05/2012, at 11:23 PM, Chris Mylonas wrote: does this mean i win the schooner question geoff ;) may be a typo for AppModule.java http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/jquery Source code: Appmodule.java The file was not found. Path given was /WEB-INF/sourcecode/web/src/main/java/jumpstart/web/services/Appmodule.java On 07/05/2012, at 9:48 PM, Geoff Callender wrote: I've added a JQuery example to JumpStart. If you guys can see nothing wrong with it I'll make the general announcement tomorrow. Geoff On 04/04/2012, at 7:27 PM, Emmanuel DEMEY wrote: From the source code, and by using the JavaScript console of Google Chrome 2012/4/4 Chris Mylonas ch...@opencsta.org COOOL! Is this a common problem with people that don't know jquery/js ? (me) How did you notice - from d/l the src? Or from the log snippet? Or did you just take a guess? Thank you so much! On 04/04/2012, at 7:18 PM, Emmanuel DEMEY wrote: Hi Your JavaScript code look to be called before the rendering of your page. Sourroung your jQuery by a $(document).ready(function(){ //your mouse handlers }); Manu 2012/4/4 Chris Mylonas ch...@opencsta.org Manu - you sound like a gentleman! Cheers On the Index page of clean quickstart - ajax increment working [18:47:27.047] Error in parsing value for 'filter'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/core/default.css:370 [18:47:27.051] Unknown property '-moz-opacity'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/core/default.css:371 [18:47:27.068] Error in parsing value for 'font'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/core/default.css:483 [18:47:27.075] Error in parsing value for 'filter'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/jquery/themes/ui-lightness/jquery-ui-1.8.15.custom.css:22 [18:47:27.086] Unknown property 'zoom'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/jquery/themes/ui-lightness/jquery-ui-1.8.15.custom.css:330 And the sample below [18:56:38.326] Error in parsing value for 'filter'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/core/default.css:370 [18:56:38.329] Unknown property '-moz-opacity'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/core/default.css:371 [18:56:38.332] Error in parsing value for 'font'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/core/default.css:483 [18:56:38.335] Error in parsing value for 'filter'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/jquery/themes/ui-lightness/jquery-ui-1.8.15.custom.css:22 [18:56:38.360] Unknown property 'zoom'. Declaration dropped. @ http://localhost:8080/jquerytest/assets/1.0-SNAPSHOT-DEV/jquery/themes/ui-lightness/jquery-ui-1.8.15.custom.css:330 My sources are here: http://sandpaper.mrvoip.com.au/jquerytest.zip , mvn clean jetty:run should get the same output. Do those errors mean anything to you? On 04/04/2012, at 5:57 PM, Emmanuel DEMEY wrote: Hi First, I will ask Do you have any JavaScript errors ? Manu 2012/4/4 Chris Mylonas ch...@opencsta.org Well if someone could relay this into the google group that would be great. I'm logged into google but cannot create a new topic :( pfft! Thanks Chris On 04/04/2012, at 4:12 PM, Chris Mylonas wrote: Hi All, I'll post this in the google groups linked to the tapestry5-jquery project as well. To repeat what I have done: 1) Create a package under pages called test. 2) Create class JQuery.java with this in it. package org.example.jquerytest.pages.test; import org.apache.tapestry5.annotations.Import; @Import(stylesheet=context:layout/mouseover.css,library={context:js/mouseover.js}) @ImportJQueryUI(jquery.ui.mouse) public class JQuery { } 3. Create src/main/webapp/layout/mouseover.css with this in it. div.out { width:40%; height:120px; margin:0 15px; background-color:#D6EDFC; float:left; } div.in { width:60%; height:60%; background-color:#FFCC00; margin:10px auto; } p { line-height:1em; margin:0; padding:0; } 4. Create src/main/webapp/js/mouseover.js with this in it. var i = 0; $(div.overout).mouseover(function() { i += 1; $(this).find(span).text( mouse over x + i ); }).mouseout(function(){ $(this).find(span).text(mouse out ); }); var n = 0; $(div.enterleave).mouseenter(function() { n += 1; $(this).find(span).text( mouse enter x + n ); }).mouseleave(function() { $(this).find(span).text(mouse leave); }); 5. Create the template for the pages/test/JQuery.java file calling it
[ANN] JumpStart gets JQuery and File Upload examples
Hi all, JumpStart 5.9.1 is out. The big ticket items in it are: * Example of JQuery, using Tapestry5-jQuery. * Example of File Upload, with some JavaScript included to improve the user experience. It's in the usual place: http://jumpstart.doublenegative.com.au/jumpstart/ And, as always, your critiques and suggestions are very welcome. Cheers, Geoff - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [ANN] JumpStart gets JQuery and File Upload examples
Congrats !!! Thanks a for all your samples Le 8 mai 2012 13:21, Geoff Callender geoff.callender.jumpst...@gmail.com a écrit : Hi all, JumpStart 5.9.1 is out. The big ticket items in it are: * Example of JQuery, using Tapestry5-jQuery. * Example of File Upload, with some JavaScript included to improve the user experience. It's in the usual place: http://jumpstart.doublenegative.com.au/jumpstart/ And, as always, your critiques and suggestions are very welcome. Cheers, Geoff - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone refresh in form fragment 'wizard'
On Tue, 08 May 2012 10:48:38 -0300, Chris Cureau cmcur...@gmail.com wrote: Hi Thiago! Hi! Thanks for the quick response. I put together a smaller version of my page to save some space. It exhibits the same problems. No exceptions are thrown in the console, but I can see my page going through onSuccess properly because of a printf I put in there. What exactly is happening? Are you sure the isInSubmit() returns true when you're rendering the FormFragment? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone refresh in form fragment 'wizard'
I've just added a few more debugging statements... isInSubmit() is getting called before each fragment rendering phase. It returns false on the first two fragments and true on the last. What I see is this: The first and second fragments work as expected...the first just presenting text, and the second accepting input with beaneditor. The third fragment (submit) shows everything EXCEPT for the zone that is set in it. I am returning the block in onSuccess() when I change the fragment from General to Submit (fragment 2 to 3). No exceptions are shown. It is almost as if Tapestry is ignoring the block altogether. On Tue, May 8, 2012 at 8:57 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 08 May 2012 10:48:38 -0300, Chris Cureau cmcur...@gmail.com wrote: Hi Thiago! Hi! Thanks for the quick response. I put together a smaller version of my page to save some space. It exhibits the same problems. No exceptions are thrown in the console, but I can see my page going through onSuccess properly because of a printf I put in there. What exactly is happening? Are you sure the isInSubmit() returns true when you're rendering the FormFragment? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br
Re: Zone refresh in form fragment 'wizard'
On Tue, 08 May 2012 11:19:02 -0300, Chris Cureau cmcur...@gmail.com wrote: I've just added a few more debugging statements... isInSubmit() is getting called before each fragment rendering phase. It returns false on the first two fragments and true on the last. What I see is this: The first and second fragments work as expected...the first just presenting text, and the second accepting input with beaneditor. The third fragment (submit) shows everything EXCEPT for the zone that is set in it. I am returning the block in onSuccess() when I change the fragment from General to Submit (fragment 2 to 3). No exceptions are shown. It is almost as if Tapestry is ignoring the block altogether. Have you checked what Tapestry is returning in Firebug or some similar tool? Are you sure you're returning a non-null block? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone refresh in form fragment 'wizard'
I've looked at the form fragments in firebug. It doesn't appear that the form fragment is being changed at all except the visible attribute. I've pasted the output from firebug below: Before fragment 3: div id=formfragment_1 class=t-invisible tapestry-formfragment input id=formfragment_1-hidden type=hidden name=t:formdata value=H4sIAFvzloG1XI5BJjElNzNPPzW3ICe/MjVVPyS1uMSquDQpN7Mk3rC4iMEhvyhdL7EgMTkjVa8ksQAoW1RpqpecX5Sak5kEpHML8vNS80qK9YLBelQCivKTU4uLwbzi4sz8vJnBnyS3bmlxZmJg8mHgSM7JBKr2TClhEPLJSixL1M9JzEvXDy4pysxLt/Zh4E7NSc0FKvBLzE0tZKhjYKwoKGHggDrHCIkJAH81VIC+ h2That's all we need!/h2 p/p Please verify the following information: p/p div id=summaryZone class=t-zone tapestry-zone/div p/p To complete this employee, press the emFinish/em button. p/p On fragment 3: div id=formfragment_1 class=tapestry-formfragment input id=formfragment_1-hidden type=hidden name=t:formdata value=H4sIAFvzloG1XI5BJjElNzNPPzW3ICe/MjVVPyS1uMSquDQpN7Mk3rC4iMEhvyhdL7EgMTkjVa8ksQAoW1RpqpecX5Sak5kEpHML8vNS80qK9YLBelQCivKTU4uLwbzi4sz8vJnBnyS3bmlxZmJg8mHgSM7JBKr2TClhEPLJSixL1M9JzEvXDy4pysxLt/Zh4E7NSc0FKvBLzE0tZKhjYKwoKGHggDrHCIkJAH81VIC+ h2That's all we need!/h2 p/p Please verify the following information: p/p div id=summaryZone class=t-zone tapestry-zone/div p/p To complete this employee, press the emFinish/em button. p/p On May 8, 2012 10:15 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 08 May 2012 11:19:02 -0300, Chris Cureau cmcur...@gmail.com wrote: I've just added a few more debugging statements... isInSubmit() is getting called before each fragment rendering phase. It returns false on the first two fragments and true on the last. What I see is this: The first and second fragments work as expected...the first just presenting text, and the second accepting input with beaneditor. The third fragment (submit) shows everything EXCEPT for the zone that is set in it. I am returning the block in onSuccess() when I change the fragment from General to Submit (fragment 2 to 3). No exceptions are shown. It is almost as if Tapestry is ignoring the block altogether. Have you checked what Tapestry is returning in Firebug or some similar tool? Are you sure you're returning a non-null block? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
private final DateFormat in PropertyDisplayBlocks (BUG)
Hi, in class org.apache.tapestry5.corelib.pages.PropertyDisplayBlocks the DateFormat is declared as : private final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); Which is not correct because DateFormat is not thread safe and pages aren't pooled any more. Regards, Luca PS: I'm not prividing a patch because the fix is trivial
Re: private final DateFormat in PropertyDisplayBlocks (BUG)
Please add an issue in JIRA and this will be fixed. Good catch. On Tue, May 8, 2012 at 10:03 AM, Luca Menegus luca.mene...@dbmsrl.com wrote: Hi, in class org.apache.tapestry5.corelib.pages.PropertyDisplayBlocks the DateFormat is declared as : private final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); Which is not correct because DateFormat is not thread safe and pages aren't pooled any more. Regards, Luca PS: I'm not prividing a patch because the fix is trivial -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: private final DateFormat in PropertyDisplayBlocks (BUG)
https://issues.apache.org/jira/browse/TAP5-1926 Thanks, luca - Original Message - From: Howard Lewis Ship hls...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Tuesday, 8 May, 2012 8:36:12 PM Subject: Re: private final DateFormat in PropertyDisplayBlocks (BUG) Please add an issue in JIRA and this will be fixed. Good catch. On Tue, May 8, 2012 at 10:03 AM, Luca Menegus luca.mene...@dbmsrl.com wrote: Hi, in class org.apache.tapestry5.corelib.pages.PropertyDisplayBlocks the DateFormat is declared as : private final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.MEDIUM, locale); Which is not correct because DateFormat is not thread safe and pages aren't pooled any more. Regards, Luca PS: I'm not prividing a patch because the fix is trivial -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.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: Best place to initialize form data
Should be easy enough to verify, Thiago ( BTW, total control edit is Jumpstart lingo). Case 1: Total control, create will fail. Case 2: BeanEditor, create will work. You are right, though, about person being null in both cases - verified. I was thinking just total control did that. Both do. However, total control seems to need the person=new Person in onPrepareForSubmit. Beaneditor seams to work with or without that null check. So, bottom line, there is a difference. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5695743.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: private final DateFormat in PropertyDisplayBlocks (BUG)
On Tue, 08 May 2012 15:49:07 -0300, Luca Menegus luca.mene...@dbmsrl.com wrote: https://issues.apache.org/jira/browse/TAP5-1926 Thanks! By the way, DateFormats not being thread-safe is a huge WTF. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
On Tue, 08 May 2012 16:44:10 -0300, netdawg net.d...@yahoo.com wrote: You are right, though, about person being null in both cases - verified. I was thinking just total control did that. Both do. However, total control seems to need the person=new Person in onPrepareForSubmit. Yes. No component knows which is the object being edited and, in addition, a Form could be editing many objects at the same time. Beaneditor seams to work with or without that null check. So, bottom line, there is a difference. Oops, you're right in this case. BeanEditor does instance the object if it's null when rendering or handling a form submission. Thanks for the correction. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Thanks for verifying. Which brings me back to...the basic misunderstanding I seem to have on using persistence What is the best practice to HANDLE a parameter (say person) between pages or even the page submitting to itself? That is, if not through some form form of session persistence? Is it through intricate knowledge of these event handlers like onPrepareXxxx...? Environment push/pop? Right now, if page1 submits person to page2. I am doing the following in Page1.class @Inject Page2 page2 onSuccess method 1. page2.setPerson(person) 2. return page2; Within Page2.class @Persist (PersistenceConstants.FLASH) private Person person; provide setter for person, needed in page1 It works, of course, but is there a better way? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5695818.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: private final DateFormat in PropertyDisplayBlocks (BUG)
Thanks! By the way, DateFormats not being thread-safe is a huge WTF. IMHO the whole Date, Calendar and DateFormat stuff are not really usable (or at least are REALLY error prone). What do you think about implementing first class support for joda-time [1] in tapestry? Cons: * That would introduce a new dependency on the joda-time library Pros: * provide and easy and proper way to handle time related data to every tapestry user * provide advanced integration with the hibernate ORM framework [3] * be a little ahead of times as the next java time spec is largely based on the joda experience [4] (Will it ever see the light?!) * spring already supports joda (Have a look at [5], but also their validation framework and spring-data-jpa use/support joda) BTW it is true that it is not so difficult to plug joda into your T5 app (and Jumpstart already has an example integration [2]) [1] http://joda-time.sourceforge.net/ [2] http://jumpstart.doublenegative.com.au/jumpstart/examples/jodatime/1 [3] http://usertype.sourceforge.net/ [4] http://jcp.org/en/jsr/detail?id=310 [5] http://static.springsource.org/spring/docs/3.0.x/javadoc-api/index.html?org/springframework/format/datetime/joda/package-summary.html - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Favour using the activation context. If person has been persisted to the database then pass the id in the activation context. Otherwise go with the technique you've suggested below. http://jumpstart.doublenegative.com.au/jumpstart/examples/state/passingdatabetweenpages And yes, in my earlier response I forgot to instantiate a person in onPrepareForSubmit() when the mode is create, not update. Geoff On 09/05/2012, at 6:28 AM, netdawg wrote: Thanks for verifying. Which brings me back to...the basic misunderstanding I seem to have on using persistence What is the best practice to HANDLE a parameter (say person) between pages or even the page submitting to itself? That is, if not through some form form of session persistence? Is it through intricate knowledge of these event handlers like onPrepareXxxx...? Environment push/pop? Right now, if page1 submits person to page2. I am doing the following in Page1.class @Inject Page2 page2 onSuccess method 1. page2.setPerson(person) 2. return page2; Within Page2.class @Persist (PersistenceConstants.FLASH) private Person person; provide setter for person, needed in page1 It works, of course, but is there a better way? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5695818.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: Best place to initialize form data
Why does BeanEditor do that? To me it sounds like a recipe for confusion! Geoff On 09/05/2012, at 5:49 AM, Thiago H. de Paula Figueiredo wrote: On Tue, 08 May 2012 16:44:10 -0300, netdawg net.d...@yahoo.com wrote: You are right, though, about person being null in both cases - verified. I was thinking just total control did that. Both do. However, total control seems to need the person=new Person in onPrepareForSubmit. Yes. No component knows which is the object being edited and, in addition, a Form could be editing many objects at the same time. Beaneditor seams to work with or without that null check. So, bottom line, there is a difference. Oops, you're right in this case. BeanEditor does instance the object if it's null when rendering or handling a form submission. Thanks for the correction. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - 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: Best place to initialize form data
Got it. Thanks, Geoff. Sounds right, I was reaching the same conclusion. As for instantiating person, I guess it is the best practice - even though beaneditor covers the null case. Most likely the user will start with beaneditor in dev mode, transitioning to total control in production - which is when those two event handlers become necessary - so might as well provide from the get go. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5696047.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: Best place to initialize form data
On Tue, 08 May 2012 17:28:19 -0300, netdawg net.d...@yahoo.com wrote: Thanks for verifying. Which brings me back to...the basic misunderstanding I seem to have on using persistence What is the best practice to HANDLE a parameter (say person) between pages or even the page submitting to itself? Page activation context (if you have one or couple parameters) or query parameters (otherwise). Of course, page activation context will only work if the object is store somewhere. If not, you'll need session persistence, flash or not. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: private final DateFormat in PropertyDisplayBlocks (BUG)
On Tue, 08 May 2012 17:34:29 -0300, Luca Menegus luca.mene...@dbmsrl.com wrote: Thanks! By the way, DateFormats not being thread-safe is a huge WTF. IMHO the whole Date, Calendar and DateFormat stuff are not really usable (or at least are REALLY error prone). Date and Calendar are the worst design classes in Java. A lesson in how not to write OOP code. What do you think about implementing first class support for joda-time [1] in tapestry? I think it would be a very nice idea. JIRA please! :) Cons: * That would introduce a new dependency on the joda-time library We can provide it as a separate package. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: private final DateFormat in PropertyDisplayBlocks (BUG)
Pros: ASL On 09/05/2012, at 6:34 AM, Luca Menegus wrote: Thanks! By the way, DateFormats not being thread-safe is a huge WTF. IMHO the whole Date, Calendar and DateFormat stuff are not really usable (or at least are REALLY error prone). What do you think about implementing first class support for joda-time [1] in tapestry? Cons: * That would introduce a new dependency on the joda-time library Pros: * provide and easy and proper way to handle time related data to every tapestry user * provide advanced integration with the hibernate ORM framework [3] * be a little ahead of times as the next java time spec is largely based on the joda experience [4] (Will it ever see the light?!) * spring already supports joda (Have a look at [5], but also their validation framework and spring-data-jpa use/support joda) BTW it is true that it is not so difficult to plug joda into your T5 app (and Jumpstart already has an example integration [2]) [1] http://joda-time.sourceforge.net/ [2] http://jumpstart.doublenegative.com.au/jumpstart/examples/jodatime/1 [3] http://usertype.sourceforge.net/ [4] http://jcp.org/en/jsr/detail?id=310 [5] http://static.springsource.org/spring/docs/3.0.x/javadoc-api/index.html?org/springframework/format/datetime/joda/package-summary.html - 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: Best place to initialize form data
I would think JIRA ... . Form event handling to be consistent with beaneditor: preferably upgrade form tag to have an objects property. All form objects should be null proof, by default, during render, submit. This will reduce code in page class...especially for the simple case of choosing between pageActivationContext(s) and empty object(s). -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5696218.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: Best place to initialize form data
Or perhaps more elegant: have beaneditor recognize/allow plain HTML customization within its tags. Right now (I tested this) if you enclose a form with bean editor tags - it simply ignores its enclosed contents. Instead it should render only fields not customized within its open and close tags. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5696224.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
Getting Session State Object from another servlet alongside Tapestry
Hi, I've got another servlet running alongside tapestry. I would like to get a sessionstate object from Tapestry to find out the currently logged in user (And probably a few other things too eventually). I've accessed the Service registry and can build the ApplicationStateManager service, but on requesting an object I get the exception below. Which makes perfect sense, because the request hasn't gone through the tapestry pipeline (I'm using a tapestry ignorefilter to ignore requests to the other servlet). So my question is, can I somehow inject the request information into tapestry so I can access the tapestry session state object?. Or is there a better way to integrate the other framework to use some more tapestry features? I understand session objects integrate with the tapestry page lifecycle, so it might not be so straight forward, but if I could just access the objects and later work on setting them, then that would be great :). My goal is to embed a few Vaadin pages into my tapestry application. So far so good, I can access services, but it would be great to access the session related objects too. Thanks, Ryan java.lang.NullPointerException: Unable to delegate method invocation to property 'request' of Proxy for RequestGlobals(org.apache.tapestry5.services.RequestGlobals), because the property is null. at $Request_ab8a69b42eedd.readProperty(Unknown Source) at $Request_ab8a69b42eedd.getSession(Unknown Source) at $Request_ab8a69b42eea3.getSession(Unknown Source) at org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.getSession(SessionApplicationStatePersistenceStrategy.java:38) at org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.getOrCreate(SessionApplicationStatePersistenceStrategy.java:49) at org.apache.tapestry5.internal.services.SessionApplicationStatePersistenceStrategy.get(SessionApplicationStatePersistenceStrategy.java:44) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Getting-Session-State-Object-from-another-servlet-alongside-Tapestry-tp5696382.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: Getting Session State Object from another servlet alongside Tapestry
Found a similar post here. Any advice? :) http://osdir.com/ml/users-tapestry-apache/2009-12/msg00140.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Getting-Session-State-Object-from-another-servlet-alongside-Tapestry-tp5696382p5696398.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: Getting Session State Object from another servlet alongside Tapestry
Using the code in that post (and updating it for T5.3) seems to work. But I don't know why... am I going to create a memory leak?. In my other servlet I can call registry.cleanUpThread() at the end of every request. Now just the fun of trying to kinda link a page based framework like tapestry with more of a desktop style framework like vaadin. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Getting-Session-State-Object-from-another-servlet-alongside-Tapestry-tp5696382p5696405.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