Re: T5 Tapestry 5 Components, Examples and Tutorials
I was just about to submit a patch to the tapestry-acegi plugin app to use a slightly different approach. My take on it is that the acegi module is missing a utility class that would allow a user to be logged in: 1. In the AppModule, I contribute a LoginHelper service (the one I think that should be in the tapestry-acegi plugin) public static LoginHelper buildLoginHelper(@InjectService("MySaltSource") SaltSourceService saltSource, PasswordEncoder encrypter , AuthenticationManager authManager) { return new AcegiLoginHelper(authManager,saltSource,encrypter); } 2. This is the login helper : public class AcegiLoginHelper implements LoginHelper { private final SaltSource saltSource; private final PasswordEncoder encrypter; private final AuthenticationManager authManager; public AcegiLoginHelper(AuthenticationManager authManager, SaltSource saltSource, PasswordEncoder encrypter) { this.saltSource = saltSource; this.encrypter = encrypter; this.authManager = authManager; } public String encryptPassword(UserLogin userDetails, String plainTxtPwd) { return encrypter.encodePassword(plainTxtPwd, saltSource.getSalt(userDetails)); } public void authenticateUser(String username, String plainTxtPwd) { UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(username, plainTxtPwd); try { Authentication authentication = authManager.authenticate(authRequest); SecurityContextHolder.getContext().setAuthentication(authentication); } catch (BadCredentialsException e) { LOG.info("Failed login by user '" + username + "'."); } catch (AuthenticationException e) { LOG.error("Could not authenticate a user", e); } catch (RuntimeException e) { LOG.error(e); e.printStackTrace(); throw e; } } } 3. In the page that needs to perform the login, inject the login helper and do something like: loginHelper.authenticateUser(regInfo.getUsername(), regInfo.getPassword()); For all of this, you don't need to use the tapestry-acegi plugin, it should work with any Acegi setup, assuming that you use Salt. If you don't use salt, customize for your needs. Cheers, Alex Kotchnev On Sun, Aug 31, 2008 at 1:06 AM, Alex Florentino <[EMAIL PROTECTED]>wrote: > Hi all, > loginHelper.authenticateUser(regInfo.getUsername(), regInfo.getPassword()); > I am newbie with tapestry 5, I am using the project > http://shams.googlecode.com/files/spring-acegi-derby-phonbook-src.zip with > sample project, but I get a problem at Login.java : > > Link link = new LinkImpl(response, request.getContextPath(), > "j_acegi_security_check"); > >link.addParameter("j_username", username); >link.addParameter("j_password", password); >return link; > > but I am using 5.0.14 and LinkImpl not have this constructor ... and not > found javadoc about LinkImpl, how is the best way fix this problem ? > > thanks, > > Alex >
T5 Tapestry 5 Components, Examples and Tutorials
Hi all, I am newbie with tapestry 5, I am using the project http://shams.googlecode.com/files/spring-acegi-derby-phonbook-src.zip with sample project, but I get a problem at Login.java : Link link = new LinkImpl(response, request.getContextPath(), "j_acegi_security_check"); link.addParameter("j_username", username); link.addParameter("j_password", password); return link; but I am using 5.0.14 and LinkImpl not have this constructor ... and not found javadoc about LinkImpl, how is the best way fix this problem ? thanks, Alex
Re: Tapestry group in LinkedIn
That's a fine idea. A small criticism: please refer to it as the "Apache Tapestry web framework". I've joined! On Sat, Aug 30, 2008 at 4:29 AM, ProAdmin Dariusz Dwornikowski <[EMAIL PROTECTED]> wrote: > What about facebook? > > 2008/8/29 Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]> > >> I've created a Tapestry group in LinkedIn and everyone is invited to join. >> :) >> >> http://www.linkedin.com/groups?home=&gid=133965 >> >> Thiago >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Pozdrawiam, > Dariusz Dwornikowski > > ProAdmin > ul. Królowej Jadwigi 44/2 > 61-872 Poznań > tel: 061 623-20-92 > kom: 0601 59-64-74 > fax: 061 623-20-93 > www.proadmin.com.pl > [EMAIL PROTECTED] > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind
Re: Multiple file upload
Images and pdf/doc/odt. I will use this swfupload, but have no idea how to pass the filenames to teh class controlling page, so i can put them into my model. W dniu 30 sierpnia 2008 18:07 użytkownik Toby Hobson < [EMAIL PROTECTED]> napisał: > I'm not sure what type of file you wish to upload but I have successfully > used the Aurigma image uploader with my T5 application > > Toby > > 2008/8/30 ProAdmin Dariusz Dwornikowski < > [EMAIL PROTECTED]> > > > Great ! Thanks. Tell me how to take filename from this to Page variable > and > > Ill be happy. > > > > 2008/8/30 Imants Firsts <[EMAIL PROTECTED]> > > > > > If you don't mind introducing the dependency to a flash component, then > > > look at this: > > > http://www.swfupload.org/ > > > > > > I have successfully created a tapestry component using SWFUpload, which > > > supports multiple file upload and degrades to default single file > upload > > if > > > Flash is not present. > > > > > > > > > Quoting Thiago HP <[EMAIL PROTECTED]>: > > > > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis > > > > <[EMAIL PROTECTED]> wrote: > > > > > The tricky part unfortunately is dealing with T5. I don't know how > > > > you > > > > > can create new components on the fly. > > > > > > > > You just cannot do that. Tapestry 5' mantra is "Static Structure, > > > > Dynamic Behavior". > > > > One way to do it would be putting your form inside a zone. Then > submit > > > > the form to do the first file uploading. The form would show the list > > > > of already uploaded files (if any) and show the file upload component > > > > again. > > > > > > > > Thiago > > > > > > > > - > > > > 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] > > > > > > > > > > > > -- > > Pozdrawiam, > > Dariusz Dwornikowski > > > > ProAdmin > > ul. Królowej Jadwigi 44/2 > > 61-872 Poznań > > tel: 061 623-20-92 > > kom: 0601 59-64-74 > > fax: 061 623-20-93 > > www.proadmin.com.pl > > [EMAIL PROTECTED] > > > -- Pozdrawiam, Dariusz Dwornikowski ProAdmin ul. Królowej Jadwigi 44/2 61-872 Poznań tel: 061 623-20-92 kom: 0601 59-64-74 fax: 061 623-20-93 www.proadmin.com.pl [EMAIL PROTECTED]
Re: Multiple file upload
I'm not sure what type of file you wish to upload but I have successfully used the Aurigma image uploader with my T5 application Toby 2008/8/30 ProAdmin Dariusz Dwornikowski < [EMAIL PROTECTED]> > Great ! Thanks. Tell me how to take filename from this to Page variable and > Ill be happy. > > 2008/8/30 Imants Firsts <[EMAIL PROTECTED]> > > > If you don't mind introducing the dependency to a flash component, then > > look at this: > > http://www.swfupload.org/ > > > > I have successfully created a tapestry component using SWFUpload, which > > supports multiple file upload and degrades to default single file upload > if > > Flash is not present. > > > > > > Quoting Thiago HP <[EMAIL PROTECTED]>: > > > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis > > > <[EMAIL PROTECTED]> wrote: > > > > The tricky part unfortunately is dealing with T5. I don't know how > > > you > > > > can create new components on the fly. > > > > > > You just cannot do that. Tapestry 5' mantra is "Static Structure, > > > Dynamic Behavior". > > > One way to do it would be putting your form inside a zone. Then submit > > > the form to do the first file uploading. The form would show the list > > > of already uploaded files (if any) and show the file upload component > > > again. > > > > > > Thiago > > > > > > - > > > 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] > > > > > > > -- > Pozdrawiam, > Dariusz Dwornikowski > > ProAdmin > ul. Królowej Jadwigi 44/2 > 61-872 Poznań > tel: 061 623-20-92 > kom: 0601 59-64-74 > fax: 061 623-20-93 > www.proadmin.com.pl > [EMAIL PROTECTED] >
Re: Tapestry group in LinkedIn
What about facebook? 2008/8/29 Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]> > I've created a Tapestry group in LinkedIn and everyone is invited to join. > :) > > http://www.linkedin.com/groups?home=&gid=133965 > > Thiago > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Pozdrawiam, Dariusz Dwornikowski ProAdmin ul. Królowej Jadwigi 44/2 61-872 Poznań tel: 061 623-20-92 kom: 0601 59-64-74 fax: 061 623-20-93 www.proadmin.com.pl [EMAIL PROTECTED]
[ANN] tapestry5-appfuse
Hi, I've just released an early version of the tapestry5-appfuse project. It is still alpha and the documentation will be finalized in the next few days. It is available via SVN on Google Code at: http://code.google.com/p/tapestry5-appfuse/ Check it out! Feedback would be really appreciated. /Serge -- View this message in context: http://www.nabble.com/-ANN--tapestry5-appfuse-tp19232363p19232363.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 : Spring 2.5 support w/ tapestry-spring ?
Martijn, we do most of our projects in company with Spring, i like it. i prefer to using tapestry with spring too. i use spring security, service layer facilities and also dao layer abstraction. i use Tapestry just in Presentation layer. because its great in this layer. specially Tapestry 5. On Sat, Aug 30, 2008 at 1:39 AM, Martijn Brinkers <[EMAIL PROTECTED]>wrote: > That's not to say that I prefer Spring over tapestry IOC but I needed > Spring security support. > For example lazy initialization of services is more powerful and > versatile with Tapestry IOC than with Spring. > > Martijn > > On Fri, 2008-08-29 at 09:21 +0200, Martijn Brinkers wrote: > > Yes I am using Spring 2.5 with the Tapestry Spring module > > > > Martijn Brinkers > > > > On Fri, 2008-08-29 at 03:15 -0400, Alex Kotchnev wrote: > > > Is anyone successfully using spring 2.5 w/ the tapestry-spring module ? > The > > > module main page talks about it being tested against 1.2.8. > > > > > > Cheers, > > > > > > Alex K > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- sincerely yours M. H. Shamsi
Re: Multiple file upload
Great ! Thanks. Tell me how to take filename from this to Page variable and Ill be happy. 2008/8/30 Imants Firsts <[EMAIL PROTECTED]> > If you don't mind introducing the dependency to a flash component, then > look at this: > http://www.swfupload.org/ > > I have successfully created a tapestry component using SWFUpload, which > supports multiple file upload and degrades to default single file upload if > Flash is not present. > > > Quoting Thiago HP <[EMAIL PROTECTED]>: > > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis > > <[EMAIL PROTECTED]> wrote: > > > The tricky part unfortunately is dealing with T5. I don't know how > > you > > > can create new components on the fly. > > > > You just cannot do that. Tapestry 5' mantra is "Static Structure, > > Dynamic Behavior". > > One way to do it would be putting your form inside a zone. Then submit > > the form to do the first file uploading. The form would show the list > > of already uploaded files (if any) and show the file upload component > > again. > > > > Thiago > > > > - > > 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] > > -- Pozdrawiam, Dariusz Dwornikowski ProAdmin ul. Królowej Jadwigi 44/2 61-872 Poznań tel: 061 623-20-92 kom: 0601 59-64-74 fax: 061 623-20-93 www.proadmin.com.pl [EMAIL PROTECTED]