Christoph Bütler wrote:
Thanks David
Thanks Dominik
Getting the string wasn't the problem. Now I have the solution:
if (sNode.equals("0")) {
out.print("somethinh");
}
The problem was the == operator. The == operator checks to see if two
objects are EXACTLY the same object. Two strings may be different
objects, but have the same value (have exactly the same characters in
them).
Cheers
Christoph
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------
Yeah, the confusing part there is that JavaScript (which shares the same
first four letters with Java and its similarities end there) uses == for
comparing object values. A == in Java (the OO language) will compare
references where as the .equals() (which is overloaded from the Object
superclass) will compare actual contents for equality.
--
Kyle Gabhart
Program Engineer
L-3 Communications
Link Simulation and Training
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------