Re: [T5] Reminder: Tapestry 5 is Alpha
Gabriel, actually now is possible to have a paypal account in colombia :) On 6/5/07, Gabriel Lozano [EMAIL PROTECTED] wrote: I would like to help support Howard. I think it is a very good idea allthough I dont have too much money ( for now, I hope ). I have a problem. I'm in Bogota, Colombia, and I think that I would not be able to pay via payPal 'cause it is not enabled here so If there is any other way it would be ok. 2007/6/5, Patrick Yip [EMAIL PROTECTED]: Just wabt to ask if anyone out there would like to support Howard in Tappestry development. I think if everyone give a little, it could become a significant source of income to allow him to spend more of his time on this amazing framework. Howard, if you have a Paypal account, please let me know. -Patrick On 6/1/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Just wanted to inject a simple reminder: Tapestry 5 is still an alpha-level product. It's still evolving. There are gaps in the functionality and in the documentation. I'm very heartened by so many people wanting to preview Tapestry 5 but just remember it is a preview and an early one. It's coming together rapidly but the realities of open source development is that I have responsibilities outside of Tapestry that have to come first *. The same goes for all the other developers. It is a difficult balance for me, because I want to answer more questions on the mailing list, but the way to best help the community is to keep my nose down in the code. Keep having fun, and try to stay patient, Howard * Unless someone is interested in funding part of the T5 development effort. Just asking. -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Patrick Y. Yip
Re: org.apache.tapestry:tapestry-core:jar:5.0.4-SNAPSHOT
you have to add the following maven repository: repository snapshotsenabledtrue/enabled/snapshots idtapestry-snapshots/id url http://people.apache.org/~hlship/tapestry-snapshot-repository//url /repository On 6/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have tried to install 2 different Tapestry 5 examples using maven. Always when I do the final mvn jetty:run I get: Missing: 1) org.apache.tapestry:tapestry-core:jar:5.0.4-SNAPSHOT Why is it missing and where do I get it from ? Toby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Localization of validation messagges and their css
To override you need to add the css styles u want to override in u r own style sheet. For example, if u want to override the tapestry style: div.t-error you create: newStyles.css div.t-error { border: 1px solid red; padding: 0px; margin: 4px 0px; } then u include the css in ur page and that's all :) On 5/31/07, Otho [EMAIL PROTECTED] wrote: Hi all, is there a better/more standard way to localize validation errors than to create org.apache.tapestry.internal.ValidationMessages_xx_XX.propertiesand org.apache.tapestry.corelib.components.Errors_xx_XX.properties in resources package? And where do I override the css? Regards, Otho
Re: Lehky_SPAM: Re: T5 Decoupling a Template From its Component Class
yes, that;s still supported and documented here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/localization.html On 5/31/07, Jiri Mares [EMAIL PROTECTED] wrote: Hi Howard, I would like to ask, whether there is still possibility to have localized templates? eg. org/example/myapp/components/CClamp.html org/example/myapp/components/CClamp_en.html org/example/myapp/components/CClamp_en_US.html org/example/myapp/components/CClamp_de.html Thanks Howard Lewis Ship napsal(a): There are internal services that can be overridden to handle those kinds of situations. The goal is to create something that works amazingly well for all the more typical cases, then start going after these others. Often it will involve moving a private interface out into the public space ... but once that's done, its very hard to change the interface in the future without breaking backwards compatibility, so we're pretty conservative about pulling back the curtain until we know the interface is full and complete. On 5/30/07, David Kendall [EMAIL PROTECTED] wrote: I am a Tapestry newbie getting up to speed on Tap 5. I am working on an application with extensive co-branding requirements. As I understand things, there is - by default - a tight coupling between a component class name and its template path. For example - if a component has a FQCN of... org.example.myapp.components.CClamp ...then the template has to be on the classpath as org/example/myapp/components/CClamp.html It would be very helpful if the mapping between the component and the template could be decoupled - this would allow me to pull in component templates that have been tweaked for a particular co-brand. For example - I might want to have a template on the class path as org/example/myapp/override/cobrand1/components/CClamp.html Is there any way to do this? Thanks in advance. David Kendall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jiří Mareš (mailto:[EMAIL PROTECTED]) ČSAD SVT Praha, s.r.o. (http://www.svt.cz) Czech Republic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5: Date input component
Here is the DateInput component for t5: http://juanemaya.blogspot.com/2007/05/tapestry-5-date-input-component.html I am not sure if that's the best way to do it. I think that building the date in the year set is not the best way but well, i am learning slowly :) Thanks a lot for ur help! On 5/29/07, Juan Maya [EMAIL PROTECTED] wrote: Thanks Alexander! I have used your idea and i have component already working! :) I just need to add a validator and that's it. Hopefully i will have time to finish it tomorrow so i will post the code to show the t5 way (And it's quiet easy!:) On 5/29/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: Well, here is the code. If you need comments, the whole issue will be published soon, hopefully on the next week. That will be #14, and there are three other issues to be published before it: #11: DatePicker and Shell #12: PropertySelection and IPropertySelectionModel #13: Autocompleter and InlineEditBox Cheers, Alexander *** Template: html head titleDateInput Template/title /head body jwcid=$content$ select jwcid=month optionJanuary/option optionFebruary/option /select select jwcid=day option1/option option2/option /select, select jwcid=year option2005/option option2006/option /select /body /html Specification: ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.devshed.tapestry.celebrities.DateInput descriptionComponent for choosing a date/description component id=day type=PropertySelection binding name=model value=daysModel/ binding name=value value=day/ /component component id=month type=PropertySelection binding name=model value=monthsModel/ binding name=value value=month/ /component component id=year type=PropertySelection binding name=model value=yearsModel/ binding name=value value=year/ /component /component-specification Class: public abstract class DateInput extends BaseComponent implements PageBeginRenderListener { @Parameter(required = true) public abstract Date getDate(); public abstract void setDate(Date d); private Calendar c = Calendar.getInstance(); public void pageBeginRender(PageEvent event) { c.setTime(getDate() == null ? new Date() : getDate()); } public IPropertySelectionModel getDaysModel() { return new DayModel(); } public IPropertySelectionModel getMonthsModel() { return new LocalisedMonthsModel(getPage().getLocale()); } public IPropertySelectionModel getYearsModel() { return new YearModel(); } public int getDay() { return c.get(Calendar.DATE); } public void setDay(int day) { c.set(Calendar.DATE, day); } public int getMonth() { return c.get(Calendar.MONTH); } public void setMonth(int month) { c.set(Calendar.MONTH, month); } public int getYear() { return c.get(Calendar.YEAR); } public void setYear(int year) { c.set(Calendar.YEAR, year); setDate(c.getTime()); } } Models: public class DayModel implements IPropertySelectionModel { public String getLabel(int index) { return + (index + 1); } public Object getOption(int index) { return index + 1; } public int getOptionCount() { return 31; } public String getValue(int index) { return + index; } public Object translateValue(String value) { return Integer.parseInt(value) + 1; } } public class YearModel implements IPropertySelectionModel { private final static int START_YEAR = 1900; private final static int END_YEAR = new GregorianCalendar().get(Calendar.YEAR); public String getLabel(int index) { return Integer.toString(index + START_YEAR); } public Object getOption(int index) { return index + START_YEAR; } public int getOptionCount() { return END_YEAR - START_YEAR + 1; } public String getValue(int index) { return + index; } public Object translateValue(String value) { return Integer.parseInt(value) + START_YEAR; } } public class LocalisedMonthsModel implements IPropertySelectionModel { private String[] months; public LocalisedMonthsModel(Locale locale) { DateFormatSymbols symbols = new DateFormatSymbols(locale); months = symbols.getMonths(); } public String
Re: t5: Date input component
Hi Matt. Yes, i am already aware of this problem and reading how to do it in T5. If anybody has any suggestions i will appreciate it. On 5/30/07, Matt Kerr [EMAIL PROTECTED] wrote: Hey Juan - umm ... 2 cents.. if you have a minute, maybe let me know what i'm missing .. (thanks!) Here is the DateInput component for t5: http://juanemaya.blogspot.com/2007/05/tapestry-5-date-input-component.html I am not sure if that's the best way to do it. I think that building the date in the year set is not the best way but well, i am learning slowly :) I'd have to check the T5 docs(?), but I thought in T4 (and prior?) .. that you were *not* guaranteed to have your set'ers called in any specific order (e.g Year, Month, Day .. or Day, Month, Year, .. or whatever) So, if this works, it's just by chance. ~~ public void setYear(String year) { this.year = year; setValue(DateUtils.buildDate(Integer.parseInt(month), Integer.parseInt(day), Integer.parseInt(year))); } ~~ Can anyone confirm or deny ? It's also kind of unsavory -- since, well, it's kind of subtle hidden there in setYear(). Isn't there a well-defined point in time (e.g. a callback method) which is invoked by the framework to let you know .. Hey! The request has been process .. and your Component's ivars are set now .. so, go ahead and perform your Component's action, like setValue() Versus .. always placing the Component's *real* beahiovor in the bottom half of the last accessor ? Doesn't that seem strange - ? If that's the case .. there seems little separation between the .html and the .java code :-(( (E.g you can change the order of your .html (Year/Month/Day - Month/Day/Year) .. and that will *break* your component :-O !!) That's the complete opposite of why you separate out presentation from logic -- they're not supposed to affect each other. I think you need a listener method or some such. I'm reading through the Tap4 docs - http://tapestry.apache.org/tapestry4/UsersGuide/ But where's the section on Request Processing? eg. what happens when someone submits a FORM? Or examples of simple form processing .. Thanks,sl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5: Date input component
sorry marcus. I just added the code to the blog. Anyway this is the link: http://www.geocities.com/jmayaalv/DateInput.zip ClientElement is T5 interface. On 5/30/07, Marcus [EMAIL PROTECTED] wrote: Hi Juan, First, Good job. after, some questions: Where can i download? com.dodo.community.web.util.SelectModelUtil com.dodo.util.DateUtils What about ClientElement interface? Thanks Marcus
Re: t5: Date input component
:) I created a Callback registered @afterRender inside DateInput.java and that did the trick! thanks a lot for your suggestions Mark! (the post and code in my blog already has all changes) On 5/30/07, Juan Maya [EMAIL PROTECTED] wrote: Hi Matt. Yes, i am already aware of this problem and reading how to do it in T5. If anybody has any suggestions i will appreciate it. On 5/30/07, Matt Kerr [EMAIL PROTECTED] wrote: Hey Juan - umm ... 2 cents.. if you have a minute, maybe let me know what i'm missing .. (thanks!) Here is the DateInput component for t5: http://juanemaya.blogspot.com/2007/05/tapestry-5-date-input-component.html I am not sure if that's the best way to do it. I think that building the date in the year set is not the best way but well, i am learning slowly :) I'd have to check the T5 docs(?), but I thought in T4 (and prior?) .. that you were *not* guaranteed to have your set'ers called in any specific order (e.g Year, Month, Day .. or Day, Month, Year, .. or whatever) So, if this works, it's just by chance. ~~ public void setYear(String year) { this.year = year; setValue(DateUtils.buildDate(Integer.parseInt(month), Integer.parseInt(day), Integer.parseInt(year))); } ~~ Can anyone confirm or deny ? It's also kind of unsavory -- since, well, it's kind of subtle hidden there in setYear(). Isn't there a well-defined point in time (e.g. a callback method) which is invoked by the framework to let you know .. Hey! The request has been process .. and your Component's ivars are set now .. so, go ahead and perform your Component's action, like setValue() Versus .. always placing the Component's *real* beahiovor in the bottom half of the last accessor ? Doesn't that seem strange - ? If that's the case .. there seems little separation between the .html and the .java code :-(( (E.g you can change the order of your .html (Year/Month/Day - Month/Day/Year) .. and that will *break* your component :-O !!) That's the complete opposite of why you separate out presentation from logic -- they're not supposed to affect each other. I think you need a listener method or some such. I'm reading through the Tap4 docs - http://tapestry.apache.org/tapestry4/UsersGuide/ But where's the section on Request Processing? eg. what happens when someone submits a FORM? Or examples of simple form processing .. Thanks,sl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5: Date input component
Done. Thanks. On 5/30/07, Marcus [EMAIL PROTECTED] wrote: Juan, Don't forget to complete, in your blog: You can use the component like this: .
Re: t5: Date input component
Thanks Alexander! I have used your idea and i have component already working! :) I just need to add a validator and that's it. Hopefully i will have time to finish it tomorrow so i will post the code to show the t5 way (And it's quiet easy!:) On 5/29/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: Well, here is the code. If you need comments, the whole issue will be published soon, hopefully on the next week. That will be #14, and there are three other issues to be published before it: #11: DatePicker and Shell #12: PropertySelection and IPropertySelectionModel #13: Autocompleter and InlineEditBox Cheers, Alexander *** Template: html head titleDateInput Template/title /head body jwcid=$content$ select jwcid=month optionJanuary/option optionFebruary/option /select select jwcid=day option1/option option2/option /select, select jwcid=year option2005/option option2006/option /select /body /html Specification: ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification class=com.devshed.tapestry.celebrities.DateInput descriptionComponent for choosing a date/description component id=day type=PropertySelection binding name=model value=daysModel/ binding name=value value=day/ /component component id=month type=PropertySelection binding name=model value=monthsModel/ binding name=value value=month/ /component component id=year type=PropertySelection binding name=model value=yearsModel/ binding name=value value=year/ /component /component-specification Class: public abstract class DateInput extends BaseComponent implements PageBeginRenderListener { @Parameter(required = true) public abstract Date getDate(); public abstract void setDate(Date d); private Calendar c = Calendar.getInstance(); public void pageBeginRender(PageEvent event) { c.setTime(getDate() == null ? new Date() : getDate()); } public IPropertySelectionModel getDaysModel() { return new DayModel(); } public IPropertySelectionModel getMonthsModel() { return new LocalisedMonthsModel(getPage().getLocale()); } public IPropertySelectionModel getYearsModel() { return new YearModel(); } public int getDay() { return c.get(Calendar.DATE); } public void setDay(int day) { c.set(Calendar.DATE, day); } public int getMonth() { return c.get(Calendar.MONTH); } public void setMonth(int month) { c.set(Calendar.MONTH, month); } public int getYear() { return c.get(Calendar.YEAR); } public void setYear(int year) { c.set(Calendar.YEAR, year); setDate(c.getTime()); } } Models: public class DayModel implements IPropertySelectionModel { public String getLabel(int index) { return + (index + 1); } public Object getOption(int index) { return index + 1; } public int getOptionCount() { return 31; } public String getValue(int index) { return + index; } public Object translateValue(String value) { return Integer.parseInt(value) + 1; } } public class YearModel implements IPropertySelectionModel { private final static int START_YEAR = 1900; private final static int END_YEAR = new GregorianCalendar().get(Calendar.YEAR); public String getLabel(int index) { return Integer.toString(index + START_YEAR); } public Object getOption(int index) { return index + START_YEAR; } public int getOptionCount() { return END_YEAR - START_YEAR + 1; } public String getValue(int index) { return + index; } public Object translateValue(String value) { return Integer.parseInt(value) + START_YEAR; } } public class LocalisedMonthsModel implements IPropertySelectionModel { private String[] months; public LocalisedMonthsModel(Locale locale) { DateFormatSymbols symbols = new DateFormatSymbols(locale); months = symbols.getMonths(); } public String getLabel(int index) { return months[index]; } public Object getOption(int index) { return index; } public int getOptionCount() { return 12; } public String getValue(int index) { return + index; } public Object translateValue(String value) { return Integer.parseInt(value); } } -Original Message- From: Juan Maya [mailto:[EMAIL PROTECTED] Sent: 25 May 2007 16:26 To: Tapestry users
Re: t5: Date input component
Hi Kolesnikov, could u please send the link of this tutorial? thanksOn 5/25/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: I am actually writing an issue of Tapestry 4 tutorial on creating a custom component exactly as you want. To be completed tomorrow, but I am not sure whether it will be applicable to T5. -Original Message- From: Juan Maya [mailto:[EMAIL PROTECTED] Sent: 23 May 2007 22:59 To: Tapestry users Subject: t5: Date input component Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do it. Thanks -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5: Date input component
Thank for u help, marcelo, but what i need it's something different The component i want would be use like this: t:date value=date/ and t:date has: select id=month/select id=day/select id=year/ The component renders 3 selects with the day month and year. That's already done, what i don't know is how to create a new java.util.Date() inside my date component and transfer it as the value entered to my page. I could transfer to my page day, month and year and then build the entered Date but it's not a clean solution. On 5/25/07, Marcelo lotif [EMAIL PROTECTED] wrote: Juan, i have an simple component that maybe can help you. It dinamically grabs information from the database and put into a PropertySelection. It's quite simple, but you may have problems because it's not documented --and i'ts in portuguese, but still is java syntax :-). For your information, I followed an example that Warner Onstine put on his book (Tapestry 101), maybe taking a look on it you can get more useful information. 2007/5/24, Juan Maya [EMAIL PROTECTED]: Does any body know the best way to implement this type of component? On 5/23/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do it. Thanks Best Regards, -- Atenciosamente, Marcelo Lotif
Re: t5: Date input component
Thanks! I think translators are way to go. I will try it and tell u how it goes. On 5/25/07, 蝈蝈龙 [EMAIL PROTECTED] wrote: I want to give you a attachement size is not greater than 4k. But SMTP server always give me a error The following is the text I think if you would like to your html look like select id=month/select id=day/select id=year/ It's right way to render 3 selectc component. If you just want to render a component ,the html should look like select t:id=mydate ... Suppose my point is right, you have to know translator concept that is reponsible for the translation between the server-side and client -side 1. Here you first need to create a translator class implment the translation between Date and String see the attached file org/opend/bogo/translator/DateTranslator 2. create you own module for your application see the attached file org/opend/bogo/module/MyAppModule to register the translaor 3. Register the Module to let the module start when staring your application see the attached file MEAT-INF/MANIFEST.MF 4. Open the attached Page class name Login to see how the date be invoked 2007/5/25, 蝈蝈龙 [EMAIL PROTECTED]: I think if you would like to your html look like select id=month/select id=day/select id=year/ It's right way to render 3 selectc component. If you just want to render a component ,the html should look like select t:id=mydate ... Suppose my point is right, you have to know translator concept that is reponsible for the translation between the server-side and client -side 1. Here you first need to create a translator class implment the translation between Date and String see the attached file org/opend/bogo/translator/DateTranslator 2. create you own module for your application see the attached file org/opend/bogo/module/MyAppModule to register the translaor 3. Register the Module to let the module start when staring your application see the attached file MEAT-INF/MANIFEST.MF 4. Open the attached Page class name Login to see how the date be invoked 2007/5/25, Juan Maya [EMAIL PROTECTED] : Thank for u help, marcelo, but what i need it's something different The component i want would be use like this: t:date value=date/ and t:date has: select id=month/select id=day/select id=year/ The component renders 3 selects with the day month and year. That's already done, what i don't know is how to create a new java.util.Date() inside my date component and transfer it as the value entered to my page. I could transfer to my page day, month and year and then build the entered Date but it's not a clean solution. On 5/25/07, Marcelo lotif [EMAIL PROTECTED] wrote: Juan, i have an simple component that maybe can help you. It dinamically grabs information from the database and put into a PropertySelection. It's quite simple, but you may have problems because it's not documented --and i'ts in portuguese, but still is java syntax :-). For your information, I followed an example that Warner Onstine put on his book (Tapestry 101), maybe taking a look on it you can get more useful information. 2007/5/24, Juan Maya [EMAIL PROTECTED]: Does any body know the best way to implement this type of component? On 5/23/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do it. Thanks Best Regards, -- Atenciosamente, Marcelo Lotif
Re: t5: Date input component
My only concern with the Translators is that they only transalate one value and to translate the date i need 3 values (month, day, year) public Double parseClient(String clientValue, Messages messages) throws ValidationException so, is it possible to obtain the 3 values within the translator? On 5/25/07, Juan Maya [EMAIL PROTECTED] wrote: Thanks! I think translators are way to go. I will try it and tell u how it goes. On 5/25/07, 蝈蝈龙 [EMAIL PROTECTED] wrote: I want to give you a attachement size is not greater than 4k. But SMTP server always give me a error The following is the text I think if you would like to your html look like select id=month/select id=day/select id=year/ It's right way to render 3 selectc component. If you just want to render a component ,the html should look like select t:id=mydate ... Suppose my point is right, you have to know translator concept that is reponsible for the translation between the server-side and client -side 1. Here you first need to create a translator class implment the translation between Date and String see the attached file org/opend/bogo/translator/DateTranslator 2. create you own module for your application see the attached file org/opend/bogo/module/MyAppModule to register the translaor 3. Register the Module to let the module start when staring your application see the attached file MEAT-INF/MANIFEST.MF 4. Open the attached Page class name Login to see how the date be invoked 2007/5/25, 蝈蝈龙 [EMAIL PROTECTED]: I think if you would like to your html look like select id=month/select id=day/select id=year/ It's right way to render 3 selectc component. If you just want to render a component ,the html should look like select t:id=mydate ... Suppose my point is right, you have to know translator concept that is reponsible for the translation between the server-side and client -side 1. Here you first need to create a translator class implment the translation between Date and String see the attached file org/opend/bogo/translator/DateTranslator 2. create you own module for your application see the attached file org/opend/bogo/module/MyAppModule to register the translaor 3. Register the Module to let the module start when staring your application see the attached file MEAT-INF/MANIFEST.MF 4. Open the attached Page class name Login to see how the date be invoked 2007/5/25, Juan Maya [EMAIL PROTECTED] : Thank for u help, marcelo, but what i need it's something different The component i want would be use like this: t:date value=date/ and t:date has: select id=month/select id=day/select id=year/ The component renders 3 selects with the day month and year. That's already done, what i don't know is how to create a new java.util.Date() inside my date component and transfer it as the value entered to my page. I could transfer to my page day, month and year and then build the entered Date but it's not a clean solution. On 5/25/07, Marcelo lotif [EMAIL PROTECTED] wrote: Juan, i have an simple component that maybe can help you. It dinamically grabs information from the database and put into a PropertySelection. It's quite simple, but you may have problems because it's not documented --and i'ts in portuguese, but still is java syntax :-). For your information, I followed an example that Warner Onstine put on his book (Tapestry 101), maybe taking a look on it you can get more useful information. 2007/5/24, Juan Maya [EMAIL PROTECTED]: Does any body know the best way to implement this type of component? On 5/23/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do it. Thanks Best Regards, -- Atenciosamente, Marcelo Lotif
Re: t5: Date input component
So i will wait patiently :) Thanks! On 5/25/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: I don't know what will be needed in T5, but in T4 everything is plain and easy. Three PropertySelection components, three simple models for them and a trivial wire-up. You'll see it soon. -Original Message- From: Juan Maya [mailto:[EMAIL PROTECTED] Sent: 25 May 2007 16:01 To: Tapestry users Subject: Re: t5: Date input component My only concern with the Translators is that they only transalate one value and to translate the date i need 3 values (month, day, year) public Double parseClient(String clientValue, Messages messages) throws ValidationException so, is it possible to obtain the 3 values within the translator? On 5/25/07, Juan Maya [EMAIL PROTECTED] wrote: Thanks! I think translators are way to go. I will try it and tell u how it goes. On 5/25/07, 蝈蝈龙 [EMAIL PROTECTED] wrote: I want to give you a attachement size is not greater than 4k. But SMTP server always give me a error The following is the text I think if you would like to your html look like select id=month/select id=day/select id=year/ It's right way to render 3 selectc component. If you just want to render a component ,the html should look like select t:id=mydate ... Suppose my point is right, you have to know translator concept that is reponsible for the translation between the server-side and client -side 1. Here you first need to create a translator class implment the translation between Date and String see the attached file org/opend/bogo/translator/DateTranslator 2. create you own module for your application see the attached file org/opend/bogo/module/MyAppModule to register the translaor 3. Register the Module to let the module start when staring your application see the attached file MEAT-INF/MANIFEST.MF 4. Open the attached Page class name Login to see how the date be invoked 2007/5/25, 蝈蝈龙 [EMAIL PROTECTED]: I think if you would like to your html look like select id=month/select id=day/select id=year/ It's right way to render 3 selectc component. If you just want to render a component ,the html should look like select t:id=mydate ... Suppose my point is right, you have to know translator concept that is reponsible for the translation between the server-side and client -side 1. Here you first need to create a translator class implment the translation between Date and String see the attached file org/opend/bogo/translator/DateTranslator 2. create you own module for your application see the attached file org/opend/bogo/module/MyAppModule to register the translaor 3. Register the Module to let the module start when staring your application see the attached file MEAT-INF/MANIFEST.MF 4. Open the attached Page class name Login to see how the date be invoked 2007/5/25, Juan Maya [EMAIL PROTECTED] : Thank for u help, marcelo, but what i need it's something different The component i want would be use like this: t:date value=date/ and t:date has: select id=month/select id=day/select id=year/ The component renders 3 selects with the day month and year. That's already done, what i don't know is how to create a new java.util.Date() inside my date component and transfer it as the value entered to my page. I could transfer to my page day, month and year and then build the entered Date but it's not a clean solution. On 5/25/07, Marcelo lotif [EMAIL PROTECTED] wrote: Juan, i have an simple component that maybe can help you. It dinamically grabs information from the database and put into a PropertySelection. It's quite simple, but you may have problems because it's not documented --and i'ts in portuguese, but still is java syntax :-). For your information, I followed an example that Warner Onstine put on his book (Tapestry 101), maybe taking a look on it you can get more useful information. 2007/5/24, Juan Maya [EMAIL PROTECTED]: Does any body know the best way to implement this type of component? On 5/23/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do
Re: t5: Date input component
Does any body know the best way to implement this type of component? On 5/23/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do it. Thanks
Re: T5: Obtain Select Component.
Sure.. in the page template i have: select t:id=month model=monthModel value=month / and in tha java file @Component (id=month) private Select monthSelect; /** * @return the monthsModel */ public SelectModel getMonthsModel() { if (this.monthsModel == null){ this.monthsModel = SelectModelUtil.getMonthsModel(messages.get (month-label)); } return this.monthsModel; } and the getters and setters. On 5/23/07, alvaro tovar [EMAIL PROTECTED] wrote: hi juan, i am new user in t5, if you can show your code? alvaro On 5/22/07, Juan Maya [EMAIL PROTECTED] wrote: So i found out that i can change the id of the component with t:id. Pretty obvious. Sorry On 5/22/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am creating a new component that has 3 embedded Select components inside of him. From this component i need to have references to the select components. Any suggestions to do it? For example, in my code i have: @Component(id=???) private Select monthSelect; @Component(id=???) private Select daySelect; @Component(id=???) private Select yearSelect; how can i know or assign the id to a select component? I have already tried to get them using the clientId property in the template but it was useless. Thanks -- Juan
t5: Date input component
Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a ProcessSubmissionAction on my component that would take the values of the select components but i want to be sure that there isn't a cleaner way to do it. Thanks
T5: Obtain Select Component.
Hi all, I am creating a new component that has 3 embedded Select components inside of him. From this component i need to have references to the select components. Any suggestions to do it? For example, in my code i have: @Component(id=???) private Select monthSelect; @Component(id=???) private Select daySelect; @Component(id=???) private Select yearSelect; how can i know or assign the id to a select component? I have already tried to get them using the clientId property in the template but it was useless. Thanks -- Juan
Re: T5: Obtain Select Component.
So i found out that i can change the id of the component with t:id. Pretty obvious. Sorry On 5/22/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am creating a new component that has 3 embedded Select components inside of him. From this component i need to have references to the select components. Any suggestions to do it? For example, in my code i have: @Component(id=???) private Select monthSelect; @Component(id=???) private Select daySelect; @Component(id=???) private Select yearSelect; how can i know or assign the id to a select component? I have already tried to get them using the clientId property in the template but it was useless. Thanks -- Juan
Re: Validation display format not good in IE(Tapestry5.0.4)
it looks fine for me. What kind of problem do u have? On 5/19/07, Allen Guo [EMAIL PROTECTED] wrote: Hi All, Has anyone tried the validation message display in IE I found the validation message display in IE is not good, but it's fine in FireFox. The test is based on Tapestry5.0.4 or Tapestry5.0.3 Allen Guo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: New Validators and server side validation
This weird problem was being caused because my integration with ACEGI. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: I think i am starting to be annoying but i found out that inside a component the first form will not execute server side validation. In the following code the the validators will be executed fine. t:form /t:form t:form input t:type=TextField t:id=username t:validate=required,email/ t:errors/ input type=submit value=Send class=submit/ /t:form However the validators will not be executed if i change the code to look like this: t:form input t:type=TextField t:id=username t:validate=required,email/ t:errors/ input type=submit value=Send class=submit/ /t:form t:form /t:form Could somebody please check this? On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: I found out my problem. For some reason i added an id parameter to the form component and this was causing the problem. Sorry :S On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Really? That's a surprise and a bug if true. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: But none of the basic implementors are executing server side validation. (i tried required and minLength) On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yes, but the magic is built into the validator implementation. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: I Howard, Thank u for the answer. That was what i did. I followed the pattern but i didn't see how to add easily new Javascript. I could modify tapestry.js but i think that's not the best way to do it. I thought the validators were able to execute server and client side validation. According to the documentation Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well. Thanks On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: On 5/14/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am trying to contribute a new Email Validator that would check if an email is valid or not. To do it i created a class Email that implements ValidatorVoid, Object. Then i contributed the Validator in My AppModule: public static void contributeFieldValidatorSource(MappedConfigurationString, Validator configuration){ configuration.add(Email.NAME, new Email()); } My question are: 1. How could i add a client side validation for my email validation? Follow the pattern present in the existing validators. 2. I disabled js in my browser and none of the basic Validators (required, minLegth, etc) worked . Am i a missing something obvious? If JavaScript is disabled, then you don't get client side validation, since it requires JavaScript. That's why you always re-check on the server. Thanks -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: New Validators and server side validation
I Howard, Thank u for the answer. That was what i did. I followed the pattern but i didn't see how to add easily new Javascript. I could modify tapestry.js but i think that's not the best way to do it. I thought the validators were able to execute server and client side validation. According to the documentation Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well. Thanks On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: On 5/14/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am trying to contribute a new Email Validator that would check if an email is valid or not. To do it i created a class Email that implements ValidatorVoid, Object. Then i contributed the Validator in My AppModule: public static void contributeFieldValidatorSource(MappedConfigurationString, Validator configuration){ configuration.add(Email.NAME, new Email()); } My question are: 1. How could i add a client side validation for my email validation? Follow the pattern present in the existing validators. 2. I disabled js in my browser and none of the basic Validators (required, minLegth, etc) worked . Am i a missing something obvious? If JavaScript is disabled, then you don't get client side validation, since it requires JavaScript. That's why you always re-check on the server. Thanks -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
Re: T5: New Validators and server side validation
But none of the basic implementors are executing server side validation. (i tried required and minLength) On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yes, but the magic is built into the validator implementation. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: I Howard, Thank u for the answer. That was what i did. I followed the pattern but i didn't see how to add easily new Javascript. I could modify tapestry.js but i think that's not the best way to do it. I thought the validators were able to execute server and client side validation. According to the documentation Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well. Thanks On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: On 5/14/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am trying to contribute a new Email Validator that would check if an email is valid or not. To do it i created a class Email that implements ValidatorVoid, Object. Then i contributed the Validator in My AppModule: public static void contributeFieldValidatorSource(MappedConfigurationString, Validator configuration){ configuration.add(Email.NAME, new Email()); } My question are: 1. How could i add a client side validation for my email validation? Follow the pattern present in the existing validators. 2. I disabled js in my browser and none of the basic Validators (required, minLegth, etc) worked . Am i a missing something obvious? If JavaScript is disabled, then you don't get client side validation, since it requires JavaScript. That's why you always re-check on the server. Thanks -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
Re: T5: New Validators and server side validation
It doesn't work for me. I am using tapestry 5.0.4. On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Really? That's a surprise and a bug if true. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: But none of the basic implementors are executing server side validation. (i tried required and minLength) On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yes, but the magic is built into the validator implementation. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: I Howard, Thank u for the answer. That was what i did. I followed the pattern but i didn't see how to add easily new Javascript. I could modify tapestry.js but i think that's not the best way to do it. I thought the validators were able to execute server and client side validation. According to the documentation Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well. Thanks On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: On 5/14/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am trying to contribute a new Email Validator that would check if an email is valid or not. To do it i created a class Email that implements ValidatorVoid, Object. Then i contributed the Validator in My AppModule: public static void contributeFieldValidatorSource(MappedConfigurationString, Validator configuration){ configuration.add(Email.NAME, new Email()); } My question are: 1. How could i add a client side validation for my email validation? Follow the pattern present in the existing validators. 2. I disabled js in my browser and none of the basic Validators (required, minLegth, etc) worked . Am i a missing something obvious? If JavaScript is disabled, then you don't get client side validation, since it requires JavaScript. That's why you always re-check on the server. Thanks -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: New Validators and server side validation
Hi Marcus. I am doing exactly the same but using a tapestry validator so it handles server and client validation. the code is something like: public class Email implements ValidatorVoid, Object { public void validate(Field field, Void constraintValue, MessageFormatter formatter, Object value) throws ValidationException { if (value == null || StringUtils.isBlank(value.toString())) throw new ValidationException(buildMessage(formatter, field)); if (!EMAIL_PATTERN.matcher(value.toString()).matches()) throw new ValidationException(buildMessage(formatter, field)); } i still have to add the client side validation (still not so sure how). Once is working i will post it. On 5/15/07, Marcus [EMAIL PROTECTED] wrote: Hi Juan, If u do it, may u share the code with us? On server side, we're using this regular expression. import java.util.regex.Pattern; public class EmailValid { public static boolean isValid(String email) { return Pattern.matches( ([A-Za-z0-9]+[._-]*)+[A-Za-z0-9]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,6}, email); } } Thank's Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: New Validators and server side validation
I found out my problem. For some reason i added an id parameter to the form component and this was causing the problem. Sorry :S On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Really? That's a surprise and a bug if true. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: But none of the basic implementors are executing server side validation. (i tried required and minLength) On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Yes, but the magic is built into the validator implementation. On 5/15/07, Juan Maya [EMAIL PROTECTED] wrote: I Howard, Thank u for the answer. That was what i did. I followed the pattern but i didn't see how to add easily new Javascript. I could modify tapestry.js but i think that's not the best way to do it. I thought the validators were able to execute server and client side validation. According to the documentation Tapestry excels at creating forms and validating input. Input validation is declarative, meaning you simply tell Tapestry what validations to apply to a given field, and it takes care of it on the server and (once implemented) on the client as well. Thanks On 5/15/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: On 5/14/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am trying to contribute a new Email Validator that would check if an email is valid or not. To do it i created a class Email that implements ValidatorVoid, Object. Then i contributed the Validator in My AppModule: public static void contributeFieldValidatorSource(MappedConfigurationString, Validator configuration){ configuration.add(Email.NAME, new Email()); } My question are: 1. How could i add a client side validation for my email validation? Follow the pattern present in the existing validators. 2. I disabled js in my browser and none of the basic Validators (required, minLegth, etc) worked . Am i a missing something obvious? If JavaScript is disabled, then you don't get client side validation, since it requires JavaScript. That's why you always re-check on the server. Thanks -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
T5: New Validators and server side validation
Hi all, I am trying to contribute a new Email Validator that would check if an email is valid or not. To do it i created a class Email that implements ValidatorVoid, Object. Then i contributed the Validator in My AppModule: public static void contributeFieldValidatorSource(MappedConfigurationString, Validator configuration){ configuration.add(Email.NAME, new Email()); } My question are: 1. How could i add a client side validation for my email validation? 2. I disabled js in my browser and none of the basic Validators (required, minLegth, etc) worked . Am i a missing something obvious? Thanks
Tapestry 5: Default Locale
Hi all, Do u know how could i change the default locale for a tapestry 5 app. I already tried: configuration.add(tapestry.supported-locales, es) in my AppModule but it doesn't seem to help. Thanks for u help
Re: T5 - Authentication filter
Hi Eric, i think the best way to do it is to contrib to the Request handler pipilene (http://tapestry.apache.org/tapestry5/tapestry-core/guide/request.html) To contrib to a pipeline do it your AppModule: public RequestFilter buildTimingFilter(final Log log) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { long startTime = System.currentTimeMillis(); try { // The reponsibility of a filter is to invoke the // corresponding method // in the handler. When you chain multiple filters // together, each filter // received a handler that is a bridge to the next // filter. return handler.service(request, response); } finally { long elapsed = System.currentTimeMillis() - startTime; log.info(String.format(Request time: %d ms, Long.valueOf (elapsed))); } } }; } /** * This is a contribution to the RequestHandler service configuration. * This is how we extend Tapestry using the timing filter. A common use * for this kind of filter is transaction management or security. */ public void contributeRequestHandler(OrderedConfigurationRequestFilter configuration, @InjectService(TimingFilter) RequestFilter filter) { // Each contribution to an ordered configuration has a name, When // necessary, you may // set constraints to precisely control the invocation order of the // contributed filter // within the pipeline. configuration.add(Timing, filter); } On 5/11/07, Eric Chatellier [EMAIL PROTECTED] wrote: hi everyone I'm starting using Tapestry 5.0.4 and i'm tying to implement an authentication filter. In some tapestry 4 samples, code was : public abstract class AuthenticatedPage implements PageValidateListener { public void pageValidate(PageEvent event) { if (!isSessionBeanExist() || getSessionBean().getUid()==-1) { Login loginPage = (Login)getRequestCycle() .getPage(Login); loginPage.setCallback(new PageCallback(this)); throw new PageRedirectException(loginPage); } } } public class ProjectList extends AuthenticatedPage { [...] } but i can't find the way to do it in tapestry 5. thanks in advance for help, and sorry for my bad english ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Authentication filter
i think u can only access ur ASOs in pages or components. I am not sure about it :S On 5/11/07, Eric Chatellier [EMAIL PROTECTED] wrote: thanks, it' works I check if user is authenticated and if not redirect to loginForm but now I got a strange error using @ApplicationState @ApplicationState private SessionBean sessionBean; In this form, when I try to log the user sessionBean.setLogged(true), this excepion is thrown : org.package.test.web.tapestry.base.SessionBean cannot be cast to org.package.test.web.tapestry.base.SessionBean The cast done by tapestry seams good, so how this exception can be throw ? 2007/5/11, Juan Maya [EMAIL PROTECTED]: Hi Eric, i think the best way to do it is to contrib to the Request handler pipilene (http://tapestry.apache.org/tapestry5/tapestry-core/guide/request.html) To contrib to a pipeline do it your AppModule: public RequestFilter buildTimingFilter(final Log log) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { long startTime = System.currentTimeMillis(); try { // The reponsibility of a filter is to invoke the // corresponding method // in the handler. When you chain multiple filters // together, each filter // received a handler that is a bridge to the next // filter. return handler.service(request, response); } finally { long elapsed = System.currentTimeMillis() - startTime; log.info(String.format(Request time: %d ms, Long.valueOf (elapsed))); } } }; } /** * This is a contribution to the RequestHandler service configuration. * This is how we extend Tapestry using the timing filter. A common use * for this kind of filter is transaction management or security. */ public void contributeRequestHandler(OrderedConfigurationRequestFilter configuration, @InjectService(TimingFilter) RequestFilter filter) { // Each contribution to an ordered configuration has a name, When // necessary, you may // set constraints to precisely control the invocation order of the // contributed filter // within the pipeline. configuration.add(Timing, filter); } On 5/11/07, Eric Chatellier [EMAIL PROTECTED] wrote: hi everyone I'm starting using Tapestry 5.0.4 and i'm tying to implement an authentication filter. In some tapestry 4 samples, code was : public abstract class AuthenticatedPage implements PageValidateListener { public void pageValidate(PageEvent event) { if (!isSessionBeanExist() || getSessionBean().getUid()==-1) { Login loginPage = (Login)getRequestCycle() .getPage(Login); loginPage.setCallback(new PageCallback(this)); throw new PageRedirectException(loginPage); } } } public class ProjectList extends AuthenticatedPage { [...] } but i can't find the way to do it in tapestry 5. thanks in advance for help, and sorry for my bad english ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Non trivial example application?
To define ur template strategy i recommend u to read this threads: http://www.nabble.com/Templating-with-Tapestry-5-tf3659025.html#a10223765 http://www.nabble.com/T5%3A-Best-page-templating-strategy-tf3551324.html#a9914552 After that is pretty straight forward. On 5/10/07, Otho [EMAIL PROTECTED] wrote: Hi all! I am new to Tapestry as a whole and tried to find my way through Tapestry 5 docs with... mixed results. What I really miss is a non trivial example application which shows specifically how to do templating and component reuse in Tap5. From what I understood about the component orientation of tap it should be relatively easy to achieve something like a block-based setup like in some well known cms (e.g. drupal) where you define which block is to be rendered with which preference in which page element. But... I was unable to get a hold on that from the existing docs unfortunately. So if someone could direct me to a link with codesamples I would be grateful. Regards, Otho
Re: Tapestry 5.0.4 Release
The best way to start is the tutorial ( http://tapestry.apache.org/tapestry5/t5-tutorial.pdf) It still not complete but it give u the basics to start. Then i recommend u the streamcast http://tapestry.apache.org/tapestry5/screencast.html and the tapestry-core docs: http://tapestry.apache.org/tapestry5/tapestry-core/ On 5/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear Community, As I am new to Tapestry, what is the best way to learn Tapestry 5 ? Is going through the source code enough in building say, rich Ajax based web application ??? I am planning to build simple login and crud web application. Best Regards, Eko SE - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Shell Component
Hello everyone, I have been searching on the mailing list and the online documentation but i haven't been able to simulate the Shell component in Tapestry 5. Any help will be appreciated.
Re: T5: Shell Component
sorry..I was trying to find this under the component docs. Just in case somebody else is wondering how to do it i found the solution in http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html Thanks On 5/6/07, Juan Maya [EMAIL PROTECTED] wrote: Hello everyone, I have been searching on the mailing list and the online documentation but i haven't been able to simulate the Shell component in Tapestry 5. Any help will be appreciated.
Tapestry 5 + Acegi
I am starting to develop a new application with Tapestry 5 and i am amazed, I have had such a big productivity bust; now i need to integrate acegi to my app and i was wonder if somebody has explored how to integrate both frameworks. Any help would be appreciated it. I am still a newbie with tapestry 5 and i am not sure where to start. Thanks