Re: [xwiki-users] Help with custom display

2008-03-27 Thread JavaCupiX
Ok, I will edit the sheet and won't use the "custom display" thing... thanks
for your help.

On Thu, Mar 27, 2008 at 3:28 PM, Jean-Vincent Drean <[EMAIL PROTECTED]> wrote:

> Considering your example I'd suggest, in the page content (or sheet if
> you are writing one) :
>
> #if ($context.action == "view")  #end
> $doc.display("test")
> #if ($context.action == "view")  #end
>
> On Thu, Mar 27, 2008 at 2:21 PM, JavaCupiX <[EMAIL PROTECTED]> wrote:
> > Yes Jean Vincent that is absolutly clear to me, but my problem is about
> >  using the "custom display" field of a property without messing up the
> >  editing possibility of that data
> >
> >  I started with
> >
> >
> >  #if($type == "view")
> >  $value
> >  #elseif($type == "edit")
> >
> > ## some markup to display in edit mode
> >  #end
> >
> >  and the question is: what should I put at the " ## some markup to
> display in
> >  edit mode" line,  />
> >  (seems a crappy solution), $doc.display($name, $type, $object) (brings
> me to
> >  the infinite loop problem)?
> >
> >  Thanks for all your answers and help,
> >
> >
> >
> >  On Thu, Mar 27, 2008 at 11:41 AM, Jean-Vincent Drean <[EMAIL PROTECTED]>
> wrote:
> >
> >  > As Sergiu said you shouldn't have to write a custom displayer to get
> >  > the wysiwyg editor when editing your prop, in the textarea props you
> >  > have the option "editor" which can be set to "Wysiwyg".
> >  >
> >  > On Thu, Mar 27, 2008 at 11:20 AM, JavaCupiX <[EMAIL PROTECTED]>
> wrote:
> >  > > Right... but what should I do to avoid this loop and still get the
> >  > editor to
> >  > >  display my object?
> >  > >
> >  > >
> >  > >
> >  > >  On Thu, Mar 27, 2008 at 10:31 AM, Jean-Vincent Drean <[EMAIL 
> > PROTECTED]
> >
> >  > wrote:
> >  > >
> >  > >  > On Thu, Mar 27, 2008 at 10:23 AM, JavaCupiX <[EMAIL PROTECTED]
> >
> >  > wrote:
> >  > >  > > @Sergui : I tried this
> >  > >  > >
> >  > >  > >
> >  > >  > >  #if($type == "view")
> >  > >  > >  $value
> >  > >  > >  #else
> >  > >  > >  $doc.display($name, $type, $object)
> >  > >  > >  #endif
> >  > >  > >
> >  > >  > >  but it get a nasty "Error number 4001 in 4: Error while
> parsing
> >  > >  > velocity
> >  > >  > >  page Invocation of method 'display' threw exception
> >  > >  > >  java.lang.stackOverflowError"... I tried the other display
> methods
> >  > but
> >  > >  > got
> >  > >  > >  the same error each time, any idea what's wrong?
> >  > >  > >
> >  > >  >
> >  > >  > Hi,
> >  > >  >
> >  > >  > What you get here is a nasty infinite loop since $doc.display
> will
> >  > >  > call your custom displayer in the #else, custom displayer who
> calls
> >  > >  > display, who calls the .. :)
> >  > >  >
> >  > >  > --
> >  > >  > Jean-Vincent Drean
> >  > >
> >  > >
> >  > > > ___
> >  > >  > users mailing list
> >  > >  > users@xwiki.org
> >  > >  > http://lists.xwiki.org/mailman/listinfo/users
> >  > >  >
> >  > >  ___
> >  > >  users mailing list
> >  > >  users@xwiki.org
> >  > >  http://lists.xwiki.org/mailman/listinfo/users
> >  > >
> >  >
> >  >
> >  >
> >  > --
> >  > --
> >  > Jean-Vincent Drean
> >  > ___
> >  > users mailing list
> >  > users@xwiki.org
> >  > http://lists.xwiki.org/mailman/listinfo/users
> >  >
> >  ___
> >  users mailing list
> >  users@xwiki.org
> >  http://lists.xwiki.org/mailman/listinfo/users
> >
>
>
>
> --
> --
> Jean-Vincent Drean
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-27 Thread Jean-Vincent Drean
Considering your example I'd suggest, in the page content (or sheet if
you are writing one) :

#if ($context.action == "view")  #end
$doc.display("test")
#if ($context.action == "view")  #end

On Thu, Mar 27, 2008 at 2:21 PM, JavaCupiX <[EMAIL PROTECTED]> wrote:
> Yes Jean Vincent that is absolutly clear to me, but my problem is about
>  using the "custom display" field of a property without messing up the
>  editing possibility of that data
>
>  I started with
>
>
>  #if($type == "view")
>  $value
>  #elseif($type == "edit")
>
> ## some markup to display in edit mode
>  #end
>
>  and the question is: what should I put at the " ## some markup to display in
>  edit mode" line, 
>  (seems a crappy solution), $doc.display($name, $type, $object) (brings me to
>  the infinite loop problem)?
>
>  Thanks for all your answers and help,
>
>
>
>  On Thu, Mar 27, 2008 at 11:41 AM, Jean-Vincent Drean <[EMAIL PROTECTED]> 
> wrote:
>
>  > As Sergiu said you shouldn't have to write a custom displayer to get
>  > the wysiwyg editor when editing your prop, in the textarea props you
>  > have the option "editor" which can be set to "Wysiwyg".
>  >
>  > On Thu, Mar 27, 2008 at 11:20 AM, JavaCupiX <[EMAIL PROTECTED]> wrote:
>  > > Right... but what should I do to avoid this loop and still get the
>  > editor to
>  > >  display my object?
>  > >
>  > >
>  > >
>  > >  On Thu, Mar 27, 2008 at 10:31 AM, Jean-Vincent Drean <[EMAIL PROTECTED]>
>  > wrote:
>  > >
>  > >  > On Thu, Mar 27, 2008 at 10:23 AM, JavaCupiX <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > > @Sergui : I tried this
>  > >  > >
>  > >  > >
>  > >  > >  #if($type == "view")
>  > >  > >  $value
>  > >  > >  #else
>  > >  > >  $doc.display($name, $type, $object)
>  > >  > >  #endif
>  > >  > >
>  > >  > >  but it get a nasty "Error number 4001 in 4: Error while parsing
>  > >  > velocity
>  > >  > >  page Invocation of method 'display' threw exception
>  > >  > >  java.lang.stackOverflowError"... I tried the other display methods
>  > but
>  > >  > got
>  > >  > >  the same error each time, any idea what's wrong?
>  > >  > >
>  > >  >
>  > >  > Hi,
>  > >  >
>  > >  > What you get here is a nasty infinite loop since $doc.display will
>  > >  > call your custom displayer in the #else, custom displayer who calls
>  > >  > display, who calls the .. :)
>  > >  >
>  > >  > --
>  > >  > Jean-Vincent Drean
>  > >
>  > >
>  > > > ___
>  > >  > users mailing list
>  > >  > users@xwiki.org
>  > >  > http://lists.xwiki.org/mailman/listinfo/users
>  > >  >
>  > >  ___
>  > >  users mailing list
>  > >  users@xwiki.org
>  > >  http://lists.xwiki.org/mailman/listinfo/users
>  > >
>  >
>  >
>  >
>  > --
>  > --
>  > Jean-Vincent Drean
>  > ___
>  > users mailing list
>  > users@xwiki.org
>  > http://lists.xwiki.org/mailman/listinfo/users
>  >
>  ___
>  users mailing list
>  users@xwiki.org
>  http://lists.xwiki.org/mailman/listinfo/users
>



-- 
--
Jean-Vincent Drean
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-27 Thread JavaCupiX
Yes Jean Vincent that is absolutly clear to me, but my problem is about
using the "custom display" field of a property without messing up the
editing possibility of that data

I started with

#if($type == "view")
$value
#elseif($type == "edit")
## some markup to display in edit mode
#end

and the question is: what should I put at the " ## some markup to display in
edit mode" line, 
(seems a crappy solution), $doc.display($name, $type, $object) (brings me to
the infinite loop problem)?

Thanks for all your answers and help,

On Thu, Mar 27, 2008 at 11:41 AM, Jean-Vincent Drean <[EMAIL PROTECTED]> wrote:

> As Sergiu said you shouldn't have to write a custom displayer to get
> the wysiwyg editor when editing your prop, in the textarea props you
> have the option "editor" which can be set to "Wysiwyg".
>
> On Thu, Mar 27, 2008 at 11:20 AM, JavaCupiX <[EMAIL PROTECTED]> wrote:
> > Right... but what should I do to avoid this loop and still get the
> editor to
> >  display my object?
> >
> >
> >
> >  On Thu, Mar 27, 2008 at 10:31 AM, Jean-Vincent Drean <[EMAIL PROTECTED]>
> wrote:
> >
> >  > On Thu, Mar 27, 2008 at 10:23 AM, JavaCupiX <[EMAIL PROTECTED]>
> wrote:
> >  > > @Sergui : I tried this
> >  > >
> >  > >
> >  > >  #if($type == "view")
> >  > >  $value
> >  > >  #else
> >  > >  $doc.display($name, $type, $object)
> >  > >  #endif
> >  > >
> >  > >  but it get a nasty "Error number 4001 in 4: Error while parsing
> >  > velocity
> >  > >  page Invocation of method 'display' threw exception
> >  > >  java.lang.stackOverflowError"... I tried the other display methods
> but
> >  > got
> >  > >  the same error each time, any idea what's wrong?
> >  > >
> >  >
> >  > Hi,
> >  >
> >  > What you get here is a nasty infinite loop since $doc.display will
> >  > call your custom displayer in the #else, custom displayer who calls
> >  > display, who calls the .. :)
> >  >
> >  > --
> >  > Jean-Vincent Drean
> >
> >
> > > ___
> >  > users mailing list
> >  > users@xwiki.org
> >  > http://lists.xwiki.org/mailman/listinfo/users
> >  >
> >  ___
> >  users mailing list
> >  users@xwiki.org
> >  http://lists.xwiki.org/mailman/listinfo/users
> >
>
>
>
> --
> --
> Jean-Vincent Drean
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-27 Thread Jean-Vincent Drean
As Sergiu said you shouldn't have to write a custom displayer to get
the wysiwyg editor when editing your prop, in the textarea props you
have the option "editor" which can be set to "Wysiwyg".

On Thu, Mar 27, 2008 at 11:20 AM, JavaCupiX <[EMAIL PROTECTED]> wrote:
> Right... but what should I do to avoid this loop and still get the editor to
>  display my object?
>
>
>
>  On Thu, Mar 27, 2008 at 10:31 AM, Jean-Vincent Drean <[EMAIL PROTECTED]> 
> wrote:
>
>  > On Thu, Mar 27, 2008 at 10:23 AM, JavaCupiX <[EMAIL PROTECTED]> wrote:
>  > > @Sergui : I tried this
>  > >
>  > >
>  > >  #if($type == "view")
>  > >  $value
>  > >  #else
>  > >  $doc.display($name, $type, $object)
>  > >  #endif
>  > >
>  > >  but it get a nasty "Error number 4001 in 4: Error while parsing
>  > velocity
>  > >  page Invocation of method 'display' threw exception
>  > >  java.lang.stackOverflowError"... I tried the other display methods but
>  > got
>  > >  the same error each time, any idea what's wrong?
>  > >
>  >
>  > Hi,
>  >
>  > What you get here is a nasty infinite loop since $doc.display will
>  > call your custom displayer in the #else, custom displayer who calls
>  > display, who calls the .. :)
>  >
>  > --
>  > Jean-Vincent Drean
>
>
> > ___
>  > users mailing list
>  > users@xwiki.org
>  > http://lists.xwiki.org/mailman/listinfo/users
>  >
>  ___
>  users mailing list
>  users@xwiki.org
>  http://lists.xwiki.org/mailman/listinfo/users
>



-- 
--
Jean-Vincent Drean
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-27 Thread JavaCupiX
Right... but what should I do to avoid this loop and still get the editor to
display my object?

On Thu, Mar 27, 2008 at 10:31 AM, Jean-Vincent Drean <[EMAIL PROTECTED]> wrote:

> On Thu, Mar 27, 2008 at 10:23 AM, JavaCupiX <[EMAIL PROTECTED]> wrote:
> > @Sergui : I tried this
> >
> >
> >  #if($type == "view")
> >  $value
> >  #else
> >  $doc.display($name, $type, $object)
> >  #endif
> >
> >  but it get a nasty "Error number 4001 in 4: Error while parsing
> velocity
> >  page Invocation of method 'display' threw exception
> >  java.lang.stackOverflowError"... I tried the other display methods but
> got
> >  the same error each time, any idea what's wrong?
> >
>
> Hi,
>
> What you get here is a nasty infinite loop since $doc.display will
> call your custom displayer in the #else, custom displayer who calls
> display, who calls the .. :)
>
> --
> Jean-Vincent Drean
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-27 Thread Jean-Vincent Drean
On Thu, Mar 27, 2008 at 10:23 AM, JavaCupiX <[EMAIL PROTECTED]> wrote:
> @Sergui : I tried this
>
>
>  #if($type == "view")
>  $value
>  #else
>  $doc.display($name, $type, $object)
>  #endif
>
>  but it get a nasty "Error number 4001 in 4: Error while parsing velocity
>  page Invocation of method 'display' threw exception
>  java.lang.stackOverflowError"... I tried the other display methods but got
>  the same error each time, any idea what's wrong?
>

Hi,

What you get here is a nasty infinite loop since $doc.display will
call your custom displayer in the #else, custom displayer who calls
display, who calls the .. :)

--
Jean-Vincent Drean
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-27 Thread JavaCupiX
@Sergui : I tried this

#if($type == "view")
$value
#else
$doc.display($name, $type, $object)
#endif

but it get a nasty "Error number 4001 in 4: Error while parsing velocity
page Invocation of method 'display' threw exception
java.lang.stackOverflowError"... I tried the other display methods but got
the same error each time, any idea what's wrong?

@Ricardo: sure I will, when my puzzle is solved :)

On Wed, Mar 26, 2008 at 9:27 PM, [Ricardo Rodriguez] Your EPEC Network ICT
Team <[EMAIL PROTECTED]> wrote:

> Hi!
>
> JavaCupiX wrote:
> > Thanks a lot... I start getting the whole thing
> Thus, please, could you create this FAQ entry? I am afraid that I am far
> beyond you are! Thanks.
>
> Cheers,
>
> Ricardo
>
> --
> Ricardo Rodríguez
> Your EPEC Network ICT Team
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread [Ricardo Rodriguez] Your EPEC Network ICT Team
Hi!

JavaCupiX wrote:
> Thanks a lot... I start getting the whole thing
Thus, please, could you create this FAQ entry? I am afraid that I am far 
beyond you are! Thanks.

Cheers,

Ricardo

-- 
Ricardo Rodríguez
Your EPEC Network ICT Team

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread JavaCupiX
Thanks a lot... I start getting the whole thing

On 3/26/08, Sergiu Dumitriu <[EMAIL PROTECTED]> wrote:
>
> JavaCupiX wrote:
> > Yes, this is what I was looking for, but how do I bring up the editor?
> For
> > example in the case of a Wysiwyg edit.
>
>
> You shouldn't... You should call $doc.display($name, "edit", $object)
>
>
> > On 3/26/08, Guillaume Lerouge <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >>
> >> Thanks to Sergui who pointed out the different states (edit, view,...)
> I
> >>> made the following changes to my code so that you still be able to
> edit
> >> a
> >>> property with a custom display so here it is for the String property
> >> type.
> >>> I'm wondering if there is such a thing like $object.getEditor() but
> >>> couldn't
> >>> find it in the jdoc.
> >>>
> >>
> >> There's 2 things available :
> >>
> >>- #if( $context.action == 'edit') (you could replace edit with
> delete,
> >>addobject, inline ...)
> >>- #if( $!request.editor == 'wiki') (you could replace wiki with
> >>wysiwyg, object, class ...)
> >>
> >> Is this what you were lookig for ?
> >>
> >>
> >> Guillaume
> >>
>
>
>
> --
> Sergiu Dumitriu
> http://purl.org/net/sergiu/
> ___
>
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread Sergiu Dumitriu
JavaCupiX wrote:
> Yes, this is what I was looking for, but how do I bring up the editor? For
> example in the case of a Wysiwyg edit.

You shouldn't... You should call $doc.display($name, "edit", $object)

> On 3/26/08, Guillaume Lerouge <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>>
>> Thanks to Sergui who pointed out the different states (edit, view,...) I
>>> made the following changes to my code so that you still be able to edit
>> a
>>> property with a custom display so here it is for the String property
>> type.
>>> I'm wondering if there is such a thing like $object.getEditor() but
>>> couldn't
>>> find it in the jdoc.
>>>
>>
>> There's 2 things available :
>>
>>- #if( $context.action == 'edit') (you could replace edit with delete,
>>addobject, inline ...)
>>- #if( $!request.editor == 'wiki') (you could replace wiki with
>>wysiwyg, object, class ...)
>>
>> Is this what you were lookig for ?
>>
>>
>> Guillaume
>>


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread JavaCupiX
Yes, this is what I was looking for, but how do I bring up the editor? For
example in the case of a Wysiwyg edit.

On 3/26/08, Guillaume Lerouge <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>
> Thanks to Sergui who pointed out the different states (edit, view,...) I
> > made the following changes to my code so that you still be able to edit
> a
> > property with a custom display so here it is for the String property
> type.
> > I'm wondering if there is such a thing like $object.getEditor() but
> > couldn't
> > find it in the jdoc.
> >
>
>
> There's 2 things available :
>
>- #if( $context.action == 'edit') (you could replace edit with delete,
>addobject, inline ...)
>- #if( $!request.editor == 'wiki') (you could replace wiki with
>wysiwyg, object, class ...)
>
> Is this what you were lookig for ?
>
>
> Guillaume
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread Guillaume Lerouge
Hi,

Thanks to Sergui who pointed out the different states (edit, view,...) I
> made the following changes to my code so that you still be able to edit a
> property with a custom display so here it is for the String property type.
> I'm wondering if there is such a thing like $object.getEditor() but
> couldn't
> find it in the jdoc.
>

There's 2 things available :

   - #if( $context.action == 'edit') (you could replace edit with delete,
   addobject, inline ...)
   - #if( $!request.editor == 'wiki') (you could replace wiki with
   wysiwyg, object, class ...)

Is this what you were lookig for ?

Guillaume
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread JavaCupiX
Thanks to Sergui who pointed out the different states (edit, view,...) I
made the following changes to my code so that you still be able to edit a
property with a custom display so here it is for the String property type.
I'm wondering if there is such a thing like $object.getEditor() but couldn't
find it in the jdoc.

#if(type == "view")
$value
#elseif($type == "edit")

#end



On Wed, Mar 26, 2008 at 4:41 PM, javacupix <[EMAIL PROTECTED]> wrote:

>
> Sure, feel free to use it, as I consider myself as a big noob in the xwiki
> universe I wasn't sure about giving it a FAQ entry
>
>
> [Ricardo Rodríguez] wrote:
> >
> > Thanks! Don't you think is worth a FAQ entry for this issue? I will
> create
> > one based on your example if you don't mind. Thanks!
> >
> > Best,
> >
> > Ricardo
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Help-with-custom-display-tp16277592p16304010.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread javacupix

Sure, feel free to use it, as I consider myself as a big noob in the xwiki
universe I wasn't sure about giving it a FAQ entry


[Ricardo Rodríguez] wrote:
> 
> Thanks! Don't you think is worth a FAQ entry for this issue? I will create
> one based on your example if you don't mind. Thanks!
> 
> Best,
> 
> Ricardo
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Help-with-custom-display-tp16277592p16304010.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread [Ricardo Rodríguez]

Thanks! Don't you think is worth a FAQ entry for this issue? I will create
one based on your example if you don't mind. Thanks!

Best,

Ricardo


javacupix wrote:
> 
> Ok, I got it, you can use Velocity Scripting in the Custom Display
> Property to render the display in the way you want it... 
> 
> For example here is the code to a "custom display" so the value of the
> property is displayed in bold and red.
>  color=red>$doc.getValue("DataName")
> 
> Where DataName is the name of my property... actually it's really easy to
> do what you want if you understand the xwiki javadoc
> (http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.3%2Dmilestone%2D1%2Djavadoc.zip/index.html)
> 

-- 
View this message in context: 
http://www.nabble.com/Help-with-custom-display-tp16277592p16303342.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread Sergiu Dumitriu
javacupix wrote:
> Ok, I got it, you can use Velocity Scripting in the Custom Display Property
> to render the display in the way you want it... 
> 
> For example here is the code to a "custom display" so the value of the
> property is displayed in bold and red.
>  color=red>$doc.getValue("DataName")
> 
> Where DataName is the name of my property... actually it's really easy to do
> what you want if you understand the xwiki javadoc
> (http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.3%2Dmilestone%2D1%2Djavadoc.zip/index.html)

Indeed, you can put some velocity script in there. The core will also 
make available the following variables:

- $name = the name of the displayed field
- $prefix = a prefix for the form field
- $object = the displayed object
- $type = the intended display mode (view, edit, hidden, search...)
- $value = the property value

So, your example could be rewritten as:

$value

which works only in view mode, or:

#if($type == "view")
$value
#else
## some markup to display in edit mode
#end

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread javacupix

Ok, I got it, you can use Velocity Scripting in the Custom Display Property
to render the display in the way you want it... 

For example here is the code to a "custom display" so the value of the
property is displayed in bold and red.
$doc.getValue("DataName")

Where DataName is the name of my property... actually it's really easy to do
what you want if you understand the xwiki javadoc
(http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki%2Dcore%2D1.3%2Dmilestone%2D1%2Djavadoc.zip/index.html)
-- 
View this message in context: 
http://www.nabble.com/Help-with-custom-display-tp16277592p16302208.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Help with custom display

2008-03-26 Thread [Ricardo Rodríguez]

Hi!


javacupix wrote:
> 
> I'm pretty confused with the documentation around xWiki and struggle to
> find infos on the "custom display" field in the property editor. A simple
> example could clarify my questions: how do you (for example) use the
> "custom display" field to display the content of the Textarea Propety in
> bold, red?
> 

I guess this feature is not documented yet. Please, have you get something
about it?

Documentation must be improve and I am sure your help will be welcome by the
community!

Thanks for your help,

Ricardo
-- 
View this message in context: 
http://www.nabble.com/Help-with-custom-display-tp16277592p16300773.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Help with custom display

2008-03-25 Thread javacupix

Hi,

I'm pretty confused with the documentation around xWiki and struggle to find
infos on the "custom display" field in the property editor. A simple example
could clarify my questions: how do you (for example) use the "custom
display" field to display the content of the Textarea Propety in bold, red?

Thx in advance for your answers
-- 
View this message in context: 
http://www.nabble.com/Help-with-custom-display-tp16277592p16277592.html
Sent from the XWiki- Users mailing list archive at Nabble.com.

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users