RE: S2 overriding a Localization property

2010-09-24 Thread Martin Gainty
from the maven perspective package level localisation at the package (groupId) level is the easiest implementation introducing class-level filters implies the need for a class level filter (instead of applying localisation at the package level) same goes with .properties where the build utility

Re: About Type-Conversion

2010-09-24 Thread Dave Newton
What's in the logs? Is devMode turned on? Where's the rest of your code/config? On Fri, Sep 24, 2010 at 1:54 PM, Mead Lai wrote: > Hello Dave, > > Thanks for your response so quickly. > It is running fine, but show a blank page.No data in the page. > There are some "conversion"-examples in "stru

Re: About Type-Conversion

2010-09-24 Thread Mead Lai
Hello Dave, Thanks for your response so quickly. It is running fine, but show a blank page.No data in the page. There are some "conversion"-examples in "struts2-showcase-2.1.8.1" package; And they are seems working good. Regards, Mead

Re: About Type-Conversion

2010-09-24 Thread Dave Newton
What are you trying to do and/or what specifically doesn't work, under what circumstances? Dave On Fri, Sep 24, 2010 at 1:44 PM, Mead Lai wrote: > Hi All, > > I try some type-conversion example, and do it step by step following this > document: > > http://struts.apache.org/2.x/docs/type-convers

About Type-Conversion

2010-09-24 Thread Mead Lai
Hi All, I try some type-conversion example, and do it step by step following this document: http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-AdvancedTypeConversion Unfortunately, it show nothing, although, I add some c

RE: How to structure a struts2 application

2010-09-24 Thread CRANFORD, CHRIS
What about a class hierarchy such as: ActionSupport BaseAction UserBaseAction UserCreateAction UserSaveAction I've personally tried the other approach where you would have something like: ActionSupport BaseAction UserAction Then you would use the method attribute on your

RE: How to structure a struts2 application

2010-09-24 Thread adam pinder
one action per function or functional area is probably best. you can then tailor the validation and responses more easily. adam > Date: Fri, 24 Sep 2010 10:35:42 +0100 > Subject: How to structure a struts2 application > From: darrenkarst...@gmail.com > To: user@struts.apache.org >

Re: S2 overriding a Localization property

2010-09-24 Thread Greg Lindholm
Yes, a more explicit override mechanism would be a good idea as the Bundle Search Order mechanism seems to have some weaknesses. (This is all assuming I'm understanding it correctly.) How would I override properties that are in an class-level properties file since this seems to be the most specif

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: Or you can use another simple solution: Convert the value to String(by invoke the [toString] method), before you can compare it to the String constant. In your case, it should be: ... 2010/9/24 Li Ying > Hi Michael: > > I think changing the return type from Enum to String is n

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: I think changing the return type from Enum to String is not a very good solution. It maybe make your JSP get work,but your Java code will become a little ugly. I think the better way is: (1)do not chang the return type of config.getProject(). (2)in tag , compare it to an enum constant

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
Glad you got it working--that kind of issue is easy to get tripped up on. It doesn't always do anything, but it makes it clear that it's an OGNL expression, and for tags that don't always evaluate the argument, it forces evaluation. In this case it shouldn't have mattered, but I now do it out of h

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Dave, you were so right ! It was indeed not a String object that is returned by config.getProject(), but the value of an enum of type Project. So I made that method returning a String instead, and it's working ! Thank you for your help. But by curiosity, what does the OGNL espace do? Because,

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
Hi Michael: I just readed the document of OGNL, it says that operator [==] will use the method [equals] to check if objects are equal. http://www.opensymphony.com/ognl/html/LanguageGuide/apa.html#operators My bad. Can you post the source code of the Action class (and the [config] class)? I thin

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
First I'd try wrapping the expression in the OGNL escape: "%{config.project == 'dba2'}" Then I'd try checking the type (class) of "config.project" and see if it's really a string. Dave On Fri, Sep 24, 2010 at 9:36 AM, Michaël JERUSALMI wrote: > > Sorry, it didn't change a thing. It still goes

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Sorry, it didn't change a thing. It still goes by the else... > Date: Fri, 24 Sep 2010 22:32:04 +0900 > Subject: Re: Incorrect test syntax > From: liying.cn.2...@gmail.com > To: user@struts.apache.org > > Hi Michael: > > Maybe you can not check if a String has same content with another by the >

Re: Incorrect test syntax

2010-09-24 Thread 李颖
Hi Michael: Maybe you can not check if a String has same content with another by the operator [==]. Try the method [String.equals()] instead. In your case, i think i should be: 2010/9/24 Michaël JERUSALMI > > Hi, > I'm working on a web application with Struts, made for several pro

Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
Hi, I'm working on a web application with Struts, made for several projects, and I'm trying to write a test to display (or not) a tab in case of a particular project. I wrote a test, which positive result should be to add a new tab, and which negative result is to write the content of the Proj

How to structure a struts2 application

2010-09-24 Thread Darren Karstens
Hi, I have just started learning struts2 and was wondering what is the best way to structure my application. I was planning on creating one ActionSupport class to deal with all user action (creating, editing, login etc). This would have a method for each type of action (create(), login() etc) and