[opencms-dev] How to run method

ulrich.rueth at gmx.de ulrich.rueth at gmx.de
Mon May 19 11:02:01 CEST 2003


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!




More information about the opencms-dev mailing list