[opencms-dev] Ver6: Article Management Module is out!!!

Alexander Kandzior alex at opencms.org
Mon Feb 7 16:03:14 CET 2005


Instead of

boolean openInNewWindow = (s != null && s.equalsIgnoreCase("true"))

I recommend writing it like this:

boolean openInNewWindow = Boolean.valueOf(s).booleanValue();

Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

 

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Ulrich Rueth
> Sent: Sunday, February 06, 2005 10:03 PM
> To: The OpenCms mailing list
> Subject: AW: [opencms-dev] Ver6: Article Management Module is out!!!
> 
> Thanks, Robert, for this hint. I found three locations in the 
> Article Management Module which have an identical problem. I 
> updated the module on my web page and am now using your 
> method of parsing the boolean values, i.e.
> the module should now be compatible to Java 1.4.x.
> 
> Regards
> Ulrich
> 
> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org]Im Auftrag von Robert 
> Petermeier
> Gesendet: Sonntag, 6. Februar 2005 17:05
> An: The OpenCms mailing list
> Betreff: Re: [opencms-dev] Ver6: Article Management Module is out!!!
> 
> 
> Jose Felix Hernandez schrieb:
> 
> > I am getting a jsp compilation error for the navigation.jsp in the 
> > line
> >
> > boolean openInNewWindow =
> > 
> Boolean.parseBoolean(cms.getCmsObject().readPropertyObject(resourceNam
> > e,
> > "link_blank", false).getValue());
> >
> > This is the compilation error.
> > 
> Boolean.parseBoolean(cms.getCmsObject().readPropertyObject(resourceNam
> > e,
> > "link_blank", false).getValue());
> >                                                 ^
> > 1 error
> >
> > The class java.lang.Boolean haven´t got such a method 
> (parseBoolean).
> 
> It has, but only in JDK 1.5, which Ulrich apparently uses. 
> Replace his line with these lines to make it work with older JDKs:
> 
> String s =
>      cms.getCmsObject().readPropertyObject(
>      resourceName, "link_blank", false).getValue(); boolean 
> openInNewWindow = (s != null && s.equalsIgnoreCase("true"));
> 
> 
> Regards,
> Robert
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list To 
> change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> 




More information about the opencms-dev mailing list