[opencms-dev] accessing navInfo or some other property

Christoph P. Kukulies kuku at physik.rwth-aachen.de
Tue Apr 17 18:05:34 CEST 2007


On Tue, Apr 17, 2007 at 05:43:56PM +0200, Christoph P. Kukulies wrote:
> On Tue, Apr 17, 2007 at 08:53:57AM +0200, Pavel Peringer wrote:
> > Hello
> > 2) Direct read property with CmsObject
> > 
> > CmsJspActionElement cmsJsp = new CmsJspActionElement(pageContext, request, 
> > response);
> > CmsObject cmsObject = cmsJsp.getCmsObject();
> > CmsRequestContext cmsRequest = cmsJsp.getRequestContext();
> > String requestFile = cmsRequest.getUri();
> > 
> > CmsResource resource = cmsObject.readResource(requestFile);
> > String navInfo = cmsObject.readPropertyObject(resource, 
> > CmsPropertyDefiniton.PROPERTY_NAVINFO, false).getValue();
> 
> 
> I'm getting:
> 
> CmsPropertyDefiniton.PROPERTY_NAVINFO cannot be resolved to a type

Found out, that 
String navInfo = cmsObject.readPropertyObject(resource,
        "NavInfo", false).getValue();

works.
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de




More information about the opencms-dev mailing list