[opencms-dev] How to run method

Ivan Jelenic ivan.jelenic at nbs.yu
Mon May 19 11:08:01 CEST 2003


OK. It's my mistake.
I called a method getCurrentUrl() instead of  getCurrentUrl.

Thanks.

----- Original Message ----- 
From: <ulrich.rueth at gmx.de>
To: <opencms-dev at opencms.org>
Sent: Monday, May 19, 2003 10:53 AM
Subject: Re: [opencms-dev] How to run method


> Obviously you references the wrong class
> (com.opencms.template.CmsXmlTemplate). In the place where you define your
template element you need to put your
> class instead of CmsXmlTemplate:
>
> <CLASS>CmsExample5</CLASS>
>
> Regards,
> Ulrich
>
> > Hi folks,
> >
> > I am new user.
> > I have just wrote a simple method. I use it in my frametemplate but, I
> > get an error:
> >
> >     [frametemplate] ??? com.opencms.core.CmsException: 23 Could not call
> > user method. Detailed error: User method getCurrentUrl() was not found
> > in class com.opencms.template.CmsXmlTemplate..
> >
> > Here is a code:
> >
> > import com.opencms.template.*;
> > import com.opencms.file.*;
> > import com.opencms.core.*;
> > import java.util.*;
> > public class CmsExample5 extends CmsXmlTemplate {
> >  public Object getCurrentUrl(CmsObject cms, String tagcontent,
> > A_CmsXmlContent doc,Object userObject) {
> >   return cms.getRequestContext().getUri();
> >   }
> >  }
> > The class file is in WEB-INF/classes/  folder.
> >
> > Please, help.
>
> -- 
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
>
> _______________________________________________
> 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