Re: Can we use the decorator pattern in Actions?

2012-10-03 Thread Lukasz Lenart
2012/10/3 Miguel Almeida : > I was speaking with Lukasz today about this, so I'm resurrecting this > old thread. > > The underlying question in my (rather extensive) post is: > > How can you perform the following decorator pattern: > > public OriginalAction implements Preparable, > SessionAware,Ori

Re: overriding framework components

2012-10-03 Thread Lukasz Lenart
2012/10/3 Davis, Chad : > Ok. I found it in the javadoc for TextProvider > > class="com.mycompany.struts2.MyTextProviderSupport" scope="default"/> > > > This works. Here you have the full list of extension points http://struts.apache.org/2.x/docs/plugins.html#Plugins-ExtensionPoints Regards

Re: Can we use the decorator pattern in Actions?

2012-10-03 Thread Gabriel Belingueres
If this is a recurring functionality (that is, you use it on several actions), then implementing it as an interceptor makes perfect sense. http://struts.apache.org/2.3.4.1/docs/writing-interceptors.html Gabriel 2012/10/3 Miguel Almeida : > I was speaking with Lukasz today about this, so I'm resu

Re: Struts2 authentication, validation, and roles

2012-10-03 Thread Gabriel Belingueres
Hi: I took a look at the ServletPrincipalProxy class, and it just delegates to the current request object to resolve authorization queries. There is not much more to do, since it is how the servlet standard is defined (the HttpServletRequest interface is the only one to query). So implementing a

RE: overriding framework components

2012-10-03 Thread Davis, Chad
Ok. I found it in the javadoc for TextProvider This works. > -Original Message- > From: Davis, Chad [mailto:chad.da...@emc.com] > Sent: Wednesday, October 03, 2012 12:47 PM > To: Struts Users Mailing List > Subject: RE: overriding framework components > > I guess I need to map a cons

RE: overriding framework components

2012-10-03 Thread Davis, Chad
I guess I need to map a constant value to my bean, but where do I find that constant name? > -Original Message- > From: Davis, Chad [mailto:chad.da...@emc.com] > Sent: Wednesday, October 03, 2012 10:55 AM > To: user@struts.apache.org > Subject: overriding framework components > > I want

overriding framework components

2012-10-03 Thread Davis, Chad
I want to override the framework's built in TextProvider with my own. I understand that I need to add mine as a bean in my strut.xml, but something about the precise mechanics is eluding me. For starters, this is from struts-default.xml And my struts.xml bean element: This

Re: Can we use the decorator pattern in Actions?

2012-10-03 Thread Miguel Almeida
I was speaking with Lukasz today about this, so I'm resurrecting this old thread. The underlying question in my (rather extensive) post is: How can you perform the following decorator pattern: public OriginalAction implements Preparable, SessionAware,OriginalActionInterface{ public String som