I haven't fully understood what you are trying to achieve, but this may
help
http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module#HActionsheets
. In any case, binding the sheet each time you view the page is clearly not
a good idea.

Hope this helps,
Marius

On Thu, Sep 29, 2016 at 7:54 PM, Tarekskayv <beguin.y...@gmail.com> wrote:

> Hello,
>
> I've create my own sheep for a class.
> But if i set it as default, i can't fill in the fields.
> Si i kept the default one to fill in all the fields and after add manually
> the custom sheet to display the page.
> When i try to edit the page, i can't change anything
> So i need to remove the "custom" sheet , modify the page and replace it
> after...
>
> Little boring.
>
> So, my question is :
> is it possible to keep the default sheet when i create a new page / edit an
> existing page and when i save it, change the sheet with the custom.
>
>
> Here is the code of the default sheet , i've try to add the custom sheet
> when saving the page, but the sheet value stay empty .... :(
>
> {{velocity}}
> ## You can modify this page to customize the presentation of your object.
> ## At first you should keep the default presentation and just save the
> document.
>
> #set($class = $doc.getObject('test.testinfraconfigClass').xWikiClass)
> #foreach($prop in $class.properties)
>   ; $prop.prettyName
>   : $doc.display($prop.getName())
> #end
>
>
> #set($obj = $doc.newObject("XWiki.DocumentSheetBinding"))
> $obj.set("Sheet","test.testinfraconfig Sheet1")
> $doc.save()
>
> {{/velocity}}
>
>
> And for edition mode, what can i do ?
>
>
>
> Regards,
>
> Tarekskayv
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/Switch-sheet-between-view-and-edit-mode-tp7601438.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

Reply via email to