Re: Invocation of type conversion manually

2010-12-13 Thread Chris Pratt
If you just need access to the parameters from the action, you can use: String resource = invocation.getProxy().getConfig().getParams().get("AuthoritationInterceptor.resource"); I've used this several times to get parameters from the configuration, but I usually put the parameters on the action i

Re: Invocation of type conversion manually

2010-12-13 Thread JOSE L MARTINEZ-AVIAL
I know that the inteceptor knows which action is invoked. I just don't want it to need to be aware of that. That's why I assigned a resource for each action, using a parameter in the definition of the action: [...] Eco MenuGestor

Re: Invocation of type conversion manually

2010-12-13 Thread Maurizio Cucchiara
Ok, now it's definitively clear. First every interceptor knows exactly which action is invoked through action invocation. With that said your action could implement (1) your custom interface or (2) a generic Request Aware interface in order to retrieve request parameters. Does this answer your ques

Re: Iterate through a List of Maps

2010-12-13 Thread JOSE L MARTINEZ-AVIAL
That was fast! The version is 2.1.8.1. I'm gonna try your suggestion right now, and let you now. Thanks JL 2010/12/13 Steven Yang > yes try adding "#" before "record" -> "#record" > > and since record is a map you can iterate through it directly without > calling entrySet() > > On Tue, Dec 14,

Re: Iterate through a List of Maps

2010-12-13 Thread Steven Yang
yes try adding "#" before "record" -> "#record" and since record is a map you can iterate through it directly without calling entrySet() On Tue, Dec 14, 2010 at 10:36 AM, Dave Newton wrote: > What version? Early versions sometimes required a "#" before the > variable name when referencing vars

Re: Iterate through a List of Maps

2010-12-13 Thread Dave Newton
What version? Early versions sometimes required a "#" before the variable name when referencing vars defined by things like an iterator tag. Dave On Monday, December 13, 2010, JOSE L MARTINEZ-AVIAL wrote: > Hello all, I'm trying to iterate through a List of Maps(I have a method > "public List ge

Iterate through a List of Maps

2010-12-13 Thread JOSE L MARTINEZ-AVIAL
Hello all, I'm trying to iterate through a List of Maps(I have a method "public List getRecords()" in the action) using s:iterator. I can iterate through the List without problems, but I can not get it to iterate through the entries of the map. So far I've got this: [..]

Re: Invocation of type conversion manually

2010-12-13 Thread JOSE L MARTINEZ-AVIAL
Hi Maurizio, Li, Thanks for your suggestion, but the problem with the approaches you suggested is that they link the security rules too much to the actions. We want to be as abstract as possible. For that, we have developed the following implementation: We created some entities called Securi

Re: cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread Li Ying
I read the source of [simple/text.ftl], and found nothing looks like rendering the extra [class="inputError"] attribute. Can you tell me where it is? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional com

Re: cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
I did try that -- but unless simple/text.ftl changes, there will *still* be an unwanted "class='inputError'" before my cssClass and cssErrorClass attributes are handled by css.ftl. Your example produces the following broken tag: It's closer -- but I believe that a change needs to be made in t

Re: cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread Li Ying
I read the source code of [simple/css.ftl], it looks like trying to combine [cssClass] and [cssErrorClass]. So you can try: <@s.textfield name="port" value=port key="service.port" maxsize="5" cssClass="prop-port" cssErrorClass="inputError" /> see if the result is what you want?

Re: Struts 2.2.1 and Tag Lib oddities

2010-12-13 Thread Li Ying
I think the tag-lib [/struts-tags] is defined in [struts2-core-2.2.1.jar/META-INF/struts-tags.tld]. Can you see this file in your Eclipse, under the [Web App Libraries]? Or, can you see the [Web App Libraries] in the [Java Build Path => Libraries] of your web-app? Or, you can [refresh] your whol

Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book "Apache Struts 2 Web application Developement states" : The plug-in will scan ... in Java packages whose names contain "struts", "struts2", "action"

Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book "Apache Struts 2 Web application Developement states" : The plug-in will scan ... in Java packages whose names contain "struts", "struts2", "action"

Re: Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
My bad #1 is resolved... I had left my jsp's in /WEB-INF/content not realizing that the java package mypackage.struts2.otherpackage.MyAction Didn't map to: /my but /otherpackage/my The examples I'd seen had a package ending in "actions" and I'd made an assumption. On Mon, 2010-12-13 at 15:37

Struts2 2.2.1 exploring annotations with struts2-convention-plugin and struts2-json-plugin

2010-12-13 Thread Ken McWilliams
I'm experimenting with Struts2 annotations and have some observations that I'd like clarification on. 1) When using the convention plug-in the book "Apache Struts 2 Web application Developement states" : The plug-in will scan ... in Java packages whose names contain "struts", "struts2", "action"

cssClass attribute with <@s.textfield> ignored when inputError happens

2010-12-13 Thread struts . rgm
When a validation error occurs with the css_xhtml theme, the CSS class for a form input does not have the correct class attributes, if a "cssClass" has been supplied. Instead of class "inputError" joining the existing "class" which is specified by the "cssClass" form tag attribute, two separat

Re: execAndWait Interceptor

2010-12-13 Thread Zoran Avtarovski
We use the interceptor for interrogating a legacy database where we have no control over the execution or timing of the query. We basically have an API we call and then wait in hope. I have to say that I've found the interceptor to be inconsistent at best. For example we have some queries that a

Re: [S2.2.1] Struts Type Converter for "sub-model" objects not working?

2010-12-13 Thread Lukasz Lenart
Did you try to user annotation @TypeConversion ? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Kapituła Javarsovia http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Re: EmailValidator

2010-12-13 Thread Brian Thompson
TBF, it was a really old version of XWork. It was addressed and made more complicated in the most recent version at the time I looked into it (still not *fixed*, though ... everyone knows how to validate an email address until they actually read the RFCs!). -Brian On Mon, Dec 13, 2010 at 1:00

Re: EmailValidator

2010-12-13 Thread Greg Akins
On Mon, Dec 13, 2010 at 1:50 PM, Brian Thompson wrote: > I've looked into this before.  The email validator resolved down to some > really old code in XWork with a regex that looked something like this: > > [a-z0-...@[a-z0-9].[a-z]^3 Thanks.. I hadn't looked at the source.. It looks like the API

Re: EmailValidator

2010-12-13 Thread Greg Akins
On Mon, Dec 13, 2010 at 12:20 PM, Dave Newton wrote: > IIRC the default email validator isn't as robust as the page- long RFC email > regex. I'd suggest either a patch, ora custom validator. > Thanks. I'll try to submit a patch after I get something more robust working -

Re: EmailValidator

2010-12-13 Thread Brian Thompson
I've looked into this before. The email validator resolved down to some really old code in XWork with a regex that looked something like this: [a-z0-...@[a-z0-9].[a-z]^3 I strongly agree with Dave's advice. Broken email validators are too common on the web. -Brian On Mon, Dec 13, 2010 at 11:

Re: EmailValidator

2010-12-13 Thread Dave Newton
IIRC the default email validator isn't as robust as the page- long RFC email regex. I'd suggest either a patch, ora custom validator. Dave On Dec 13, 2010 12:11 PM, "Greg Akins" wrote: > I just tried to use angrygreg+...@gmail.com as an email , and the > Struts EmailValidator doesn't like it (S

EmailValidator

2010-12-13 Thread Greg Akins
I just tried to use angrygreg+...@gmail.com as an email , and the Struts EmailValidator doesn't like it (Struts 2.2.1) I'm not that great at reading regexp.. it looks like maybe the regexp should support that email address.. but I'm not sure. Can anyone comment on whether EmailValidator is the be

Struts 2.2.1 and Tag Lib oddities

2010-12-13 Thread RogerV
Hi I've just upgraded to 2.2.1 from 2.1.8 and I guess I must have missed a piece of documentation somewhere. My IDE (Eclipse Helios) is now flagging all my .jsp files as being in error. Specifically, it complains that it cannot find the tag library descriptor "/struts-tags" (<%@ taglib prefix="s"

Re: [S2.2.1] Struts Type Converter for "sub-model" objects not working?

2010-12-13 Thread Burton Rhodes
Thanks guys for your reponses, but I think I may have been unclear in my question. I have a class called MyCurrencyConverter that converts a string to a BigDecimal by stripping the "$", commas, etc. - this works fine. The problem arises when struts does not call MyCurrencyConverter for the nested

RE: E-Commerce website using struts

2010-12-13 Thread Martin Gainty
salesforce..peoplesoft..goldmine are crm packages that work as well if you want to drive sales for your software why not find the limitations of these other packages and post how your software meets or exceeds the limitations inherent with each package Not a shill for peoplesoft..salesforce..go