On Mar 29, 2009, at 11:13 PM, Ludovic Dubost wrote:

> Hi,
>
> You can use:
>
> def object = xwiki.parseGroovyFromPage("Include.Page1")
>
> Where in Include.Page1 you have a groovy class.
> The you can call methods..
>
> It didn't work for you because in page one it's just the groovy class
> without the <% %> around it

See 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyClassHelloWorldTutorial 
  too

Thanks
-Vincent

> Ludovic
>
> Zik23 a écrit :
>> Hi,
>> I have two classes in separated pages and I want one of them to  
>> extend the other. How should I include the parent class?
>>
>> I tried:
>>
>> Page 1:
>> ------------------
>> <%
>>
>> public class A {
>> ...
>> }
>>
>> %>
>> ------------------
>>
>> Page 2:
>> ------------------
>> #set($mydoc = $xwiki.getDocument("Include.Page1"))
>> $mydoc.renderedContent
>>
>> <%
>>
>> public class B extends A {
>> ...
>> }
>>
>> %>
>> ------------------
>>
>>
>> But that's not working, i get this error - unable to resolve class  
>> A @ line 3.
>>
>> I also tried to use parseGroovyFromPage(), but I wasn't successful.
>>
>> So what is the correct way to make it work?
>>
>

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to