Re: Ant sample project for Tapestry5 application
Yes, there is one. Have a look at jumpstart. You can find the link on the start page of the current T5 documentation. Andy HHB schrieb: Hey, Do you know any Tapestry 5 skeleton project that employs Apache Ant instead of Maven? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Which annotation to be used in page class?
Hi, I want to inject a service in a page with service id,when I use @Inject @Id(serviceid) It seems that does not inject the service with serviceid. Instead of use @Inject @Servcie(serviceid) It works well. Does the @Id annotation can't be used in a page class? Thanks. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Ant sample project for Tapestry5 application
Hey, Do you know any Tapestry 5 skeleton project that employs Apache Ant instead of Maven? Thanks. -- View this message in context: http://www.nabble.com/Ant-sample-project-for-Tapestry5-application-tp20998757p20998757.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Doctype disappearing when deployed on production server
Hi, I'm still battling this problem and am absolutely lost for reasons why this is happening. If someone is out there who give me some pointers why the DOCTYPE might be dropped on resin and not on jetty, it would be highly appreciated. I setup a completely isolated webapp to test this single problem: http://www.jsportal.com/doctest/start The source Start.tml: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3c.org/TR/html4/loose.dtd; html head titletest page/title /head bodytest page/body /html the resulting html: html head link href=assets/5.1.0.0-JS-SNAPSHOT/tapestry/default.css rel=stylesheet type=text/css/link titletest page/title /head bodytest page/body /html Could it be a character encoding problem? If so, which piece of code does any validation that might cut off the DOCTYPE? Thanks very much, Joost On Wed, Dec 10, 2008 at 6:22 PM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: Hi, I've got the strange problem of my DOCTYPE disappearing when I depoly my war (using T5.1.0.0-SNAPSHOT) on a Fedora Core box running resin. Locally all is fine on OSX and jetty. They both run with tapestry.production-mode=false. The component defining the doctype (HtmlHeadBody.tml) is as follows (simplified): DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head title${title}/title /head body t:body/ /body /html Is this a tapestry setting I am missing or is there another problem playing here? Any clues would be highly appreciated. Regards and happy coding, Joost - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] Doctype disappearing when deployed on production server
This is an odd one; I'm not aware of any changes between 5.0 and 5.1 that could account for this. On Sun, Dec 14, 2008 at 6:30 AM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: Hi, I'm still battling this problem and am absolutely lost for reasons why this is happening. If someone is out there who give me some pointers why the DOCTYPE might be dropped on resin and not on jetty, it would be highly appreciated. I setup a completely isolated webapp to test this single problem: http://www.jsportal.com/doctest/start The source Start.tml: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3c.org/TR/html4/loose.dtd; html head titletest page/title /head bodytest page/body /html the resulting html: html head link href=assets/5.1.0.0-JS-SNAPSHOT/tapestry/default.css rel=stylesheet type=text/css/link titletest page/title /head bodytest page/body /html Could it be a character encoding problem? If so, which piece of code does any validation that might cut off the DOCTYPE? Thanks very much, Joost On Wed, Dec 10, 2008 at 6:22 PM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: Hi, I've got the strange problem of my DOCTYPE disappearing when I depoly my war (using T5.1.0.0-SNAPSHOT) on a Fedora Core box running resin. Locally all is fine on OSX and jetty. They both run with tapestry.production-mode=false. The component defining the doctype (HtmlHeadBody.tml) is as follows (simplified): DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head title${title}/title /head body t:body/ /body /html Is this a tapestry setting I am missing or is there another problem playing here? Any clues would be highly appreciated. Regards and happy coding, Joost - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Layout Border component problem
Hi Guys, I just started to use T5 and lately I have hit a problem which I cannot resovle. I created a Border component which contains a navigation menu. I also created some kind of a sub-applications, let's call them MyMode1, MyMode2, MyMode3 etc and palced pagelinks to them in Border navigation. Then I implemented another border-like components MyMode1Border, MyMode2Border, MyMode3Border which are wrapped by Border and contains navigation specific to each Mode. Now, when a new user logs in the Border page, containing pagelinks to each Mode, is being displayed. Then the user chooses some Mode and starts doing some stuff. The problem is that when another user logs in and goes to the same Mode as the prevoius one he is given the same instance of the Mode so when he does some stuff on the page too he overrides what the other guy did. I added System.out.println to the non-argument constructors of each page and here is what I found out: When I restart the server and the first user comes in, clicks login button the following instantiations take place: com.kawecki.wapp.components.bor...@617584 [INFO] AppModule.TimingFilter Request time: 625 ms com.kawecki.wapp.components.mymode1bor...@2d09e0 com.kawecki.wapp.components.bor...@12297d7 com.kawecki.wapp.components.mymode2bor...@11d20d3 com.kawecki.wapp.components.bor...@1562c67 com.kawecki.wapp.components.MyMode3Border com.kawecki.wapp.components.bor...@149249e [INFO] AppModule.TimingFilter Request time: 594 ms Then, when the user clicks on one of the Mode pagelinks new objects are created just like above. But when new user logs in no new object are created and both of them uses the same instance of a MyMode1Border class. I read about page pooling, onPassivate, onActivate but my problem seems to work just opposite. So if anybody could let me know what I do wrong I would appreciate a lot. Hope I was clear enough Thanks in advance -- View this message in context: http://www.nabble.com/Layout-Border-component-problem-tp21004400p21004400.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
Adding additional Textinput fields during runtime
Hi there! Is there a way to add additional Textinput fields during runtime without having specified them all before in Tapestry? I am working on an Admin interface that allows to add configuration values to an object. E.g. you would see a dropdown box with parameters that are available. You can then assign a value to an objectwhich would result in an additional Textfield for that value. There is an entity called Domain and one called Value. A value can be anything - could be the language, the country, the character set or whatever. The meaning of such a value is achieved by a Category that is referenced by a value. E.g. if you want to add an additional configuration parameter to a Domain, you select Country, then a new Value field could be entered (e.g. USA). Then you could choose to add a Value for Language, then a new text field to enter a language would be displayed. The problem is I need to define all Properties in the page beforeso how would you handle such a case? To have unlimited input fieldsthat are not all defined before? Thanks! Toby - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Layout Border component problem
Tapestry pools pages and components, so it is supposed to re-use an available component rather than create a new one, if there is one available. It's a little like a server having a pool of worker threads to service requests. If you are having problem with the state being shared between users, then you have made a mistake in how you are using instance variables or persisting state. If you post your code, I'm sure your mistake can be easily identified. Jonathan -Original Message- From: kawes [mailto:rafal.kawe...@gmail.com] Sent: Sunday, December 14, 2008 15:43 To: users@tapestry.apache.org Subject: Layout Border component problem Hi Guys, I just started to use T5 and lately I have hit a problem which I cannot resovle. I created a Border component which contains a navigation menu. I also created some kind of a sub-applications, let's call them MyMode1, MyMode2, MyMode3 etc and palced pagelinks to them in Border navigation. Then I implemented another border-like components MyMode1Border, MyMode2Border, MyMode3Border which are wrapped by Border and contains navigation specific to each Mode. Now, when a new user logs in the Border page, containing pagelinks to each Mode, is being displayed. Then the user chooses some Mode and starts doing some stuff. The problem is that when another user logs in and goes to the same Mode as the prevoius one he is given the same instance of the Mode so when he does some stuff on the page too he overrides what the other guy did. I added System.out.println to the non-argument constructors of each page and here is what I found out: When I restart the server and the first user comes in, clicks login button the following instantiations take place: com.kawecki.wapp.components.bor...@617584 [INFO] AppModule.TimingFilter Request time: 625 ms com.kawecki.wapp.components.mymode1bor...@2d09e0 com.kawecki.wapp.components.bor...@12297d7 com.kawecki.wapp.components.mymode2bor...@11d20d3 com.kawecki.wapp.components.bor...@1562c67 com.kawecki.wapp.components.MyMode3Border com.kawecki.wapp.components.bor...@149249e [INFO] AppModule.TimingFilter Request time: 594 ms Then, when the user clicks on one of the Mode pagelinks new objects are created just like above. But when new user logs in no new object are created and both of them uses the same instance of a MyMode1Border class. I read about page pooling, onPassivate, onActivate but my problem seems to work just opposite. So if anybody could let me know what I do wrong I would appreciate a lot. Hope I was clear enough Thanks in advance -- View this message in context: http://www.nabble.com/Layout-Border- component-problem-tp21004400p21004400.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: Adding additional Textinput fields during runtime
Hi Toby, http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Loop.html The example Forms and Loops Example might give you, what you are looking for. Cheers nillehammer superoverdr...@gmx.de schrieb: Hi there! Is there a way to add additional Textinput fields during runtime without having specified them all before in Tapestry? I am working on an Admin interface that allows to add configuration values to an object. E.g. you would see a dropdown box with parameters that are available. You can then assign a value to an objectwhich would result in an additional Textfield for that value. There is an entity called Domain and one called Value. A value can be anything - could be the language, the country, the character set or whatever. The meaning of such a value is achieved by a Category that is referenced by a value. E.g. if you want to add an additional configuration parameter to a Domain, you select Country, then a new Value field could be entered (e.g. USA). Then you could choose to add a Value for Language, then a new text field to enter a language would be displayed. The problem is I need to define all Properties in the page beforeso how would you handle such a case? To have unlimited input fieldsthat are not all defined before? Thanks! Toby - 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
integrating T5 a login form with Spring Security?
Hello, I've been trying to integrate T5 and Spring Security (2.0.4, not the older Acegi) but haven't succeeded in making the two work together. The standard way to specify a form login with Spring 2.5 is like below. See the form-login element which specified the login page (Login) and what URL Spring will intercept (the standard j_security_check). b:beans xmlns=http://www.springframework.org/schema/security; http form-login login-page=/Login default-target-url=/Start authentication-failure-url=/Login?login_error=1 login-processing-url=j_security_check / /http I have a typical Login.tml (labels and cosmetic stuff removed for brevity) t:form t:id=loginForm tabletrtdinput type=text t:id=j_username t:type=TextField t:value=j_username//td/tr trtdinput type=text t:id=j_password t:type=PasswordField t:value=j_password//td/tr trinput type=submit value=Log In//td /tr /table /t:form What happens is that the POST that occurs when submitting the form goes to the Login.onSubmit() instead of j_security_check. While it is possible to add code there to call Spring's AuthenticationManager, I would end up duplicating what Spring Security does (the logic to redirect to different pages if the login succeeded or not and so on). I'd like to use Spring since it already implements this. Is it possible to submit the login info to j_security_check instead? Or to forward the request from within Login.onSubmit() to /j_security_check? I went through the Tapestry 5 book by Alexander Kolesnikov, but didn't find this info. Also, I am aware of the tapestry5-acegi extension ( http://www.localhost.nu/java/tapestry5-acegi/) but this one seems under development and for such a simple thing I didn't want to add a dependency on another jar. As you can tell, I'm new to T5. I've had some exposure to T4 and an older version of Spring (2.0) but there things were quite different, both in Tapestry itself and in how Acegi is configured in Spring. Advice is appreciated, JL
Re: integrating T5 a login form with Spring Security?
In your page class inject the check url like this: @Inject @Value(${spring-security.check.url}) private String checkUrl; then on your onSuccessMethod: response.sendRedirect(request.getContextPath() + checkUrl + ?j_username= + username + j_password= + password); where username and password are the bound variables for your username and password text fields on the form. Jean Luc wrote: Hello, I've been trying to integrate T5 and Spring Security (2.0.4, not the older Acegi) but haven't succeeded in making the two work together. The standard way to specify a form login with Spring 2.5 is like below. See the form-login element which specified the login page (Login) and what URL Spring will intercept (the standard j_security_check). b:beans xmlns=http://www.springframework.org/schema/security; http form-login login-page=/Login default-target-url=/Start authentication-failure-url=/Login?login_error=1 login-processing-url=j_security_check / /http I have a typical Login.tml (labels and cosmetic stuff removed for brevity) t:form t:id=loginForm tabletrtdinput type=text t:id=j_username t:type=TextField t:value=j_username//td/tr trtdinput type=text t:id=j_password t:type=PasswordField t:value=j_password//td/tr trinput type=submit value=Log In//td /tr /table /t:form What happens is that the POST that occurs when submitting the form goes to the Login.onSubmit() instead of j_security_check. While it is possible to add code there to call Spring's AuthenticationManager, I would end up duplicating what Spring Security does (the logic to redirect to different pages if the login succeeded or not and so on). I'd like to use Spring since it already implements this. Is it possible to submit the login info to j_security_check instead? Or to forward the request from within Login.onSubmit() to /j_security_check? I went through the Tapestry 5 book by Alexander Kolesnikov, but didn't find this info. Also, I am aware of the tapestry5-acegi extension ( http://www.localhost.nu/java/tapestry5-acegi/) but this one seems under development and for such a simple thing I didn't want to add a dependency on another jar. As you can tell, I'm new to T5. I've had some exposure to T4 and an older version of Spring (2.0) but there things were quite different, both in Tapestry itself and in how Acegi is configured in Spring. Advice is appreciated, JL - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: integrating T5 a login form with Spring Security?
Thanks Hugo, I've [tried to] inject the request and the response as mentioned (for the request) at: http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest @Inject private HttpServletRequest request; @Inject private HttpServletResponse response; It works for the request, but not for the response (exception below). I've googled for ways to inject the response (I thought it would be similar) but no luck. exception org.apache.tapestry5.internal.services.TransformationException: Error obtaining injected value for field com.foo.tapestry.pages.Login.response: No service implements the interface javax.servlet.http.HttpServletResponse. # org.apache.tapestry5.internal.services.TransformationException Error obtaining injected value for field com.foo.tapestry.pages.Login.response: No service implements the interface javax.servlet.http.HttpServletResponse. In case it matters, I'm using T 5.0.18 and JBoss 4.2.2GA Thanks in advance, JL On Sun, Dec 14, 2008 at 7:44 PM, Hugo Palma hugo.m.pa...@gmail.com wrote: In your page class inject the check url like this: @Inject @Value(${spring-security.check.url}) private String checkUrl; then on your onSuccessMethod: response.sendRedirect(request.getContextPath() + checkUrl + ?j_username= + username + j_password= + password); where username and password are the bound variables for your username and password text fields on the form. Jean Luc wrote: Hello, I've been trying to integrate T5 and Spring Security (2.0.4, not the older Acegi) but haven't succeeded in making the two work together. The standard way to specify a form login with Spring 2.5 is like below. See the form-login element which specified the login page (Login) and what URL Spring will intercept (the standard j_security_check). b:beans xmlns=http://www.springframework.org/schema/security; http form-login login-page=/Login default-target-url=/Start authentication-failure-url=/Login?login_error=1 login-processing-url=j_security_check / /http I have a typical Login.tml (labels and cosmetic stuff removed for brevity) t:form t:id=loginForm tabletrtdinput type=text t:id=j_username t:type=TextField t:value=j_username//td/tr trtdinput type=text t:id=j_password t:type=PasswordField t:value=j_password//td/tr trinput type=submit value=Log In//td /tr /table /t:form What happens is that the POST that occurs when submitting the form goes to the Login.onSubmit() instead of j_security_check. While it is possible to add code there to call Spring's AuthenticationManager, I would end up duplicating what Spring Security does (the logic to redirect to different pages if the login succeeded or not and so on). I'd like to use Spring since it already implements this. Is it possible to submit the login info to j_security_check instead? Or to forward the request from within Login.onSubmit() to /j_security_check? I went through the Tapestry 5 book by Alexander Kolesnikov, but didn't find this info. Also, I am aware of the tapestry5-acegi extension ( http://www.localhost.nu/java/tapestry5-acegi/) but this one seems under development and for such a simple thing I didn't want to add a dependency on another jar. As you can tell, I'm new to T5. I've had some exposure to T4 and an older version of Spring (2.0) but there things were quite different, both in Tapestry itself and in how Acegi is configured in Spring. Advice is appreciated, JL - 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: integrating T5 a login form with Spring Security?
Update: I can get the response with: @Inject private RequestGlobals requestGlobals; and using requestGlobals.getHTTPServletResponse(); I'll need to change the redirect into a forward (to save a trip and to prevent the username/pwd appear in the URL) but that's standard servlet stuff. Thanks. On Sun, Dec 14, 2008 at 8:05 PM, Jean Luc jeanluc2...@gmail.com wrote: Thanks Hugo, I've [tried to] inject the request and the response as mentioned (for the request) at: http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest @Inject private HttpServletRequest request; @Inject private HttpServletResponse response; It works for the request, but not for the response (exception below). I've googled for ways to inject the response (I thought it would be similar) but no luck. exception org.apache.tapestry5.internal.services.TransformationException: Error obtaining injected value for field com.foo.tapestry.pages.Login.response: No service implements the interface javax.servlet.http.HttpServletResponse. # org.apache.tapestry5.internal.services.TransformationException Error obtaining injected value for field com.foo.tapestry.pages.Login.response: No service implements the interface javax.servlet.http.HttpServletResponse. In case it matters, I'm using T 5.0.18 and JBoss 4.2.2GA Thanks in advance, JL On Sun, Dec 14, 2008 at 7:44 PM, Hugo Palma hugo.m.pa...@gmail.com wrote: In your page class inject the check url like this: @Inject @Value(${spring-security.check.url}) private String checkUrl; then on your onSuccessMethod: response.sendRedirect(request.getContextPath() + checkUrl + ?j_username= + username + j_password= + password); where username and password are the bound variables for your username and password text fields on the form. Jean Luc wrote: Hello, I've been trying to integrate T5 and Spring Security (2.0.4, not the older Acegi) but haven't succeeded in making the two work together. The standard way to specify a form login with Spring 2.5 is like below. See the form-login element which specified the login page (Login) and what URL Spring will intercept (the standard j_security_check). b:beans xmlns=http://www.springframework.org/schema/security; http form-login login-page=/Login default-target-url=/Start authentication-failure-url=/Login?login_error=1 login-processing-url=j_security_check / /http I have a typical Login.tml (labels and cosmetic stuff removed for brevity) t:form t:id=loginForm tabletrtdinput type=text t:id=j_username t:type=TextField t:value=j_username//td/tr trtdinput type=text t:id=j_password t:type=PasswordField t:value=j_password//td/tr trinput type=submit value=Log In//td /tr /table /t:form What happens is that the POST that occurs when submitting the form goes to the Login.onSubmit() instead of j_security_check. While it is possible to add code there to call Spring's AuthenticationManager, I would end up duplicating what Spring Security does (the logic to redirect to different pages if the login succeeded or not and so on). I'd like to use Spring since it already implements this. Is it possible to submit the login info to j_security_check instead? Or to forward the request from within Login.onSubmit() to /j_security_check? I went through the Tapestry 5 book by Alexander Kolesnikov, but didn't find this info. Also, I am aware of the tapestry5-acegi extension ( http://www.localhost.nu/java/tapestry5-acegi/) but this one seems under development and for such a simple thing I didn't want to add a dependency on another jar. As you can tell, I'm new to T5. I've had some exposure to T4 and an older version of Spring (2.0) but there things were quite different, both in Tapestry itself and in how Acegi is configured in Spring. Advice is appreciated, JL - 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
specifying a non-Tapestry form submission URL ?
Hello, Is it possible to specify an explicit URL as the action for a form submission? What and why I need it: - I need a login form to post directly to j_spring_security_check (because I still see problems integrating T5 and Spring Security 2.0.4, see below) - I cannot use a forward from the page's onSubmit() because SS somehow messes up URL resolution in a forward. If I hit /myApp/j_spring_security_check from a browser, the URL is valid. When I forward to /j_spring_security_check (also tried j_spring_security_check) from onSubmit(), it's not resolved. That's not a T5 issue most likely. So what I'd like to do is to define Login.tml to have the submission target to /j_spring_security_check, thus sending the POST directly to its final destination. I read http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.htmland http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Submit.html but didn't see how. Also, I cannot use the approach suggested in http://wiki.apache.org/tapestry/Tapestry5HowToUseForms for multiple forms, since again it relies on a server-side forward from Tapestry to SS. I've also tried to use t:form t:id=loginForm action=/somewherebut the action attribute in the template was ignored and the real form still has action=login.loginform Any suggestions are highly appreciated. Thanks, JL
[T5] Handle post from external application
What is the proper way to handle a form post to a Tapestry page from an external application? I know how to encode the parameters in the URL and use the onActivate context, but in this case, the data being passed from the external application will exceed the URL length limit so I need to use post. Can anyone advise how to do this? -- View this message in context: http://www.nabble.com/-T5--Handle-post-from-external-application-tp21008825p21008825.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: specifying a non-Tapestry form submission URL ?
See here http://www.localhost.nu/svn/public/tapestry-spring-security-sample/src/main/webapp/LoginPage.tml for an example. Cheers, Uli Jean Luc schrieb: Hello, Is it possible to specify an explicit URL as the action for a form submission? What and why I need it: - I need a login form to post directly to j_spring_security_check (because I still see problems integrating T5 and Spring Security 2.0.4, see below) - I cannot use a forward from the page's onSubmit() because SS somehow messes up URL resolution in a forward. If I hit /myApp/j_spring_security_check from a browser, the URL is valid. When I forward to /j_spring_security_check (also tried j_spring_security_check) from onSubmit(), it's not resolved. That's not a T5 issue most likely. So what I'd like to do is to define Login.tml to have the submission target to /j_spring_security_check, thus sending the POST directly to its final destination. I read http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Form.htmland http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Submit.html but didn't see how. Also, I cannot use the approach suggested in http://wiki.apache.org/tapestry/Tapestry5HowToUseForms for multiple forms, since again it relies on a server-side forward from Tapestry to SS. I've also tried to use t:form t:id=loginForm action=/somewherebut the action attribute in the template was ignored and the real form still has action=login.loginform Any suggestions are highly appreciated. Thanks, JL - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.0 Final Release - 5.0.18
Thanks for all your hard work! Sincere congratulations to Howard and the Tapestry Devs. Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - Original Message - From: Angelo Chen angelochen...@yahoo.com.hk To: users@tapestry.apache.org Sent: Saturday, 13 December, 2008 2:15:47 AM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Tapestry 5.0 Final Release - 5.0.18 good news, we finally hava final release:) do we have to do any changes to the pom.xml? or just like before, simply update the version number? Howard Lewis Ship wrote: Apache Tapestry 5.0 final release (5.0.18) * Via Maven: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-core/artifactId version5.0.18/version /dependency -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5.0-Final-Release---5.0.18-tp20981431p20985850.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: Tapestry 5.0 Final Release - 5.0.18
Yes, congratulations and many thanks. T5 has turned into the best web development framework, in my view, easily knocking out WebObjects, as well as page-at-a-time-MVC and scripting systems like Struts and jsps. regards, Christian. On 15-Dec-08, at 02:08 , Peter Stavrinides wrote: Thanks for all your hard work! Sincere congratulations to Howard and the Tapestry Devs. Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - Original Message - From: Angelo Chen angelochen...@yahoo.com.hk To: users@tapestry.apache.org Sent: Saturday, 13 December, 2008 2:15:47 AM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Tapestry 5.0 Final Release - 5.0.18 good news, we finally hava final release:) do we have to do any changes to the pom.xml? or just like before, simply update the version number? Howard Lewis Ship wrote: Apache Tapestry 5.0 final release (5.0.18) * Via Maven: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-core/artifactId version5.0.18/version /dependency -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5.0-Final-Release---5.0.18-tp20981431p20985850.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: integrating T5 a login form with Spring Security?
Hi Jean Luc, there is a working example at http://www.localhost.nu/svn/public/tapestry-spring-security-sample/ if you want to use http://www.localhost.nu/java/tapestry-spring-security/. Cheers, Borut 2008/12/15 Jean Luc jeanluc2...@gmail.com Hello, I've been trying to integrate T5 and Spring Security (2.0.4, not the older Acegi) but haven't succeeded in making the two work together. The standard way to specify a form login with Spring 2.5 is like below. See the form-login element which specified the login page (Login) and what URL Spring will intercept (the standard j_security_check). b:beans xmlns=http://www.springframework.org/schema/security; http form-login login-page=/Login default-target-url=/Start authentication-failure-url=/Login?login_error=1 login-processing-url=j_security_check / /http I have a typical Login.tml (labels and cosmetic stuff removed for brevity) t:form t:id=loginForm tabletrtdinput type=text t:id=j_username t:type=TextField t:value=j_username//td/tr trtdinput type=text t:id=j_password t:type=PasswordField t:value=j_password//td/tr trinput type=submit value=Log In//td /tr /table /t:form What happens is that the POST that occurs when submitting the form goes to the Login.onSubmit() instead of j_security_check. While it is possible to add code there to call Spring's AuthenticationManager, I would end up duplicating what Spring Security does (the logic to redirect to different pages if the login succeeded or not and so on). I'd like to use Spring since it already implements this. Is it possible to submit the login info to j_security_check instead? Or to forward the request from within Login.onSubmit() to /j_security_check? I went through the Tapestry 5 book by Alexander Kolesnikov, but didn't find this info. Also, I am aware of the tapestry5-acegi extension ( http://www.localhost.nu/java/tapestry5-acegi/) but this one seems under development and for such a simple thing I didn't want to add a dependency on another jar. As you can tell, I'm new to T5. I've had some exposure to T4 and an older version of Spring (2.0) but there things were quite different, both in Tapestry itself and in how Acegi is configured in Spring. Advice is appreciated, JL
RE: Layout Border component problem
Hi Jonathan, thanks for your quick response. As you asked I uploaded classes I hit the problem in. Small description: One of my sub-application is Teacher (should be able to provide a word in foreign language and accept user's answer checks wheather it is correct) When user logs in, clicks teacher link is redirected to AvailabaleSets (which is wrapped by TeacherBorder). T5.zip file uploaded and it contains: - Border.java - Border.tml (pagelinks to all stuff provided by my app) - TeacherBorder.java - TeacherBorder.tml (contains all links to navigate my Teacher sub-application - i.e. TeacherMode - resposnible for 'asking question', registering results etc) - AvailableSets.java - AvailableSets.tml (displays available sets containg words) - TeacherModePage1.java - TeacherModePage1.tml (lets user to choose the word's set and decide about the questioning mode (mingled or the sequence of words had been added to the set) ) - TeacherModePage2.java - TeacherModePage2.tml (displays questions and lets to type in answers) TeacherModePage1.java contains the following line: private TeacherMode teacherMode = new TeacherMode(); I belived that when new page would be displayed (whe user clicks TeacherMode in TeacherBorder) a brand new TeacherMode instance would be returned but is not. And is not because all the classes are already instantiated and T5 gives them back to the user for efficiency. Please keep in mind this is just the beggining of the work, so not everything is like it should be from architectural point of view (i.e. @Persist will be replaced by onPassvate and onActivate). I just wanted to see how it works. If any more details are reqiured let me know. Thanks in advance http://www.nabble.com/file/p21009484/T5.zip T5.zip -- View this message in context: http://www.nabble.com/Layout-Border-component-problem-tp21004400p21009484.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