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")
<b>$value</b>
#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, <input type='text' name='$prefix$name' value='$value' />
(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")
> >  > >  <b>$value</b>
> >  > >  #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
> >  > [email protected]
> >  > http://lists.xwiki.org/mailman/listinfo/users
> >  >
> >  _______________________________________________
> >  users mailing list
> >  [email protected]
> >  http://lists.xwiki.org/mailman/listinfo/users
> >
>
>
>
> --
> --
> Jean-Vincent Drean
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to