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
s, i saw many times that syntax, and tried it, but I never knew what it > was for. > > > Date: Fri, 24 Sep 2010 09:39:38 -0400 > > Subject: Re: Incorrect test syntax > > From: davelnew...@gmail.com > > To: user@struts.apache.org > > > > First I'd t

RE: Incorrect test syntax

2010-09-24 Thread Michaël JERUSALMI
cause, searching on forums, i saw many times that syntax, and tried it, but I never knew what it was for. > Date: Fri, 24 Sep 2010 09:39:38 -0400 > Subject: Re: Incorrect test syntax > From: davelnew...@gmail.com > To: user@struts.apache.org > > First I'd try wrapping the e

Re: Incorrect test syntax

2010-09-24 Thread Li Ying
think i need see what the property "config.project" exactly is to find out what's going wrong. 2010/9/24 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: In

Re: Incorrect test syntax

2010-09-24 Thread Dave Newton
> 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: > > > >

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 sam

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