Hi Thomas, apologies for the delayed reply. I tried
removing the {{groovy}}
macro, but the <p></p> still seems to be there :-( Also tried using
wiki=false, but same results.. It still seems like the "newline" between
{{include}} and {{groovy}} and the {{include}} in TestService causes this.
Any other ideas?
On Sat, Jun 12, 2010 at 1:07 AM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com>wrote;wrote:
On Fri, Jun 11, 2010 at 17:17, Lewis Denizen
<orangerd(a)gmail.com> wrote:
Yup, {{test /}} is a wiki macro. The contents
are:
{{include document="Sandbox.TestService" context="current" /}}
{{groovy}}
import com.test.TestService
out.println( TestService.testMe() )
{{/groovy}}
What happen if you remove this groovy macro ? Do you still have the
<p></p> ? Basically the game is to try to find from where this
<p></p>
comes from.
Could you try to put wiki=false in this groovy macro to see what it
exactly produce before being re-parsed.
The Sandbox.TestService2 page just has another
class defined (no contents
tho):
{{groovy output="false"}}
package com.test
class TestService2 {
def static testMe2() {
return "TEST"
}
}
{{/groovy}}
Any ideas?
On Fri, Jun 11, 2010 at 12:49 AM, Thomas Mortagne <
thomas.mortagne(a)xwiki.com
> wrote:
> On Thu, Jun 10, 2010 at 17:05, Lewis Denizen <orangerd(a)gmail.com>
wrote:
>> Hi Thomas, {{test /}} just outputs the
result of TestService.testMe():
> What is {{test /}} exactly ? A wiki macro ? What is its code ?
>
>> out.println( TestService.testMe() )
>>
>> TestService.testMe() just returns the literal string "TEST", so I
think
> it
>> should be fine. Would there be anything I could do to enable some
debug
>> output perhaps?
> What do you have when you directly see Sandbox.TestService2 page
> (instead of include it) ?
>
>> On Thu, Jun 10, 2010 at 9:57 PM, Thomas Mortagne
>> <thomas.mortagne(a)xwiki.com>wrote;wrote:
>>
>>> On Thu, Jun 10, 2010 at 14:36, Lewis Denizen <orangerd(a)gmail.com>
> wrote:
>>>> Thanks for the quick reply, Thomas! Actually, I tried that but
> without
>>>> luck. It gives the exact same output as what I have below :-(
BTW, I
> am
>>>> using XWiki 2.3.1, which should be the latest stable release as
well.
>>> As far as i can see the
"<p></p>TEST" is produced by your macro. What
>>> {{text /}} is supposed to do ?
>>>
>>>> On Thu, Jun 10, 2010 at 12:55 AM, Thomas Mortagne <
>>> thomas.mortagne(a)xwiki.com
>>>>> wrote:
>>>>> On Wed, Jun 9, 2010 at 15:39, Lewis Denizen
<orangerd(a)gmail.com>
> wrote:
>>>>>> Hi xwiki-users,
>>>>>>
>>>>>> I created a page called Sandbox.TestMacro with the following
> content:
>>>>>> * {{test /}}
>>>>>>
>>>>>> The page also has a WikiMacro object defined:
>>>>>>
>>>>>> {{include document="Sandbox.TestService"
context="current"
>>> /}}{{groovy}}
>>>>>> import com.test.TestService
>>>>>> out.println( TestService.testMe() )
>>>>>> {{/groovy}}
>>>>>>
>>>>>> Sandbox.TestService has the following content in it:
>>>>>>
>>>>>> {{include document="Sandbox.TestService2"
context="current"
>>> /}}{{groovy
>>>>>> output="false"}}
>>>>>> package com.test
>>>>>> class TestService {
>>>>>> def static testMe() {
>>>>>> return "TEST"
>>>>>> }
>>>>>> }
>>>>>> {{/groovy}}
>>>>> When you do that you write a paragraph containing two macros
(include
>>>>> and groovy).
>>>>>
>>>>> You should write
>>>>>
>>>>> {{include document="Sandbox.TestService2"
context="current" /}}
>>>>>
>>>>> {{groovy output="false"}}
>>>>> package com.test
>>>>> class TestService {
>>>>> def static testMe() {
>>>>> return "TEST"
>>>>> }
>>>>> }
>>>>> {{/groovy}}
>>>>>
>>>>> instead.
>>>>>
>>>>>> Now, when I render the TestMacro page, I get a few extra
<p>
> inserted
>>>>> before
>>>>>> the text "TEST":
>>>>>>
>>>>>>
<ul><li><p></p>TEST</li></ul>
>>>>>>
>>>>>> This makes the page look weird, since the bullet point text is
on a
>>
new
>>>> line
>>>>> now.. I've also had to put the {{include}} and the {{groovy}}
lines
>>>>> together in the pages above; otherwise, there would just be more
<p>'s
>>>>> inserted.. Is there any way around this? Appreciate any tips!
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users(a)xwiki.org
>>>>>
http://lists.xwiki.org/mailman/listinfo/users
>>>>>
>>>>
>>>>
>>>> --
>>>> Thomas Mortagne
>>>> _______________________________________________
>>>> users mailing list
>>>> users(a)xwiki.org
>>>>
http://lists.xwiki.org/mailman/listinfo/users
>>>>
>>> _______________________________________________
>>> users mailing list
>>> users(a)xwiki.org
>>>
http://lists.xwiki.org/mailman/listinfo/users
>>>
>>
>>
>> --
>> Thomas Mortagne
>> _______________________________________________
>> users mailing list
>> users(a)xwiki.org
>>
http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users
>
--
Thomas Mortagne
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org