On Apr 18, 2009, at 11:29 AM, Jerome Velociter wrote: > Vincent Massol wrote: >> On Apr 18, 2009, at 11:01 AM, Jerome Velociter wrote: >> >>> Hi, >>> >>> Vincent Massol wrote: >>>> Hi, >>>> >>>> We need to have automatic inline edit mode for XWiki Syntax 2.0 >>>> (http://jira.xwiki.org/jira/browse/XWIKI-2891) >>>> >>>> I'd like to implement this quickly since it prevents to use the >>>> xwiki >>>> syntax 2.0 as the default syntax (for ex if you create a user in >>>> 2.0 >>>> syntax and click edit you'll edit it in wysiwyg mode instead of >>>> inline >>>> mode). >>>> >>>> A quick solution I have: >>>> >>>> * Use the XWikiDocument template field to set the sheet to use >>> Don't you rather mean the field "defaultEditSheet" ? >> >> I couldn't find that field in XWikiDocument. Do you mean >> introducing a >> new field for this? (I'm +1 for that) > > No, this already exists. Maybe there is no API to set it in > XWikiDocument, but check the XML of an exported doc, you'll see it.
in XWikiDocument thre are 2 fields: * a template field * a defaultTemplate field The defaultEditSheet/defaultViewSheet are in the BaseClass java class, i.e. they are used for XObjects. I don't see how they could be used for the main document's view or edit actions. Any idea what defaultTemplate is used for? (I'll research it, just asking in case you already know). Thanks -Vincent > And > I think it is also already usable (at least in syntax 1.0), XWiki will > use the document indicated in this field (if present) as the sheet in > edit mode. There is an equivalent for view mode : defaultViewSheet. >> >>> template is for >>> choosing the .vm to render the document against IIRC >>> >>>> * When a page has the template field set, when the user clicks on >>>> the >>>> edit button it goes automatically in inline edit mode >>> The template field set to what ? This sounds like a hack and will >>> prevent using the template field for what its meant for. >> >> I wasn't sure what it was meant for since it's never been used. I'm >> still unsure what it's for since you can put the way to display the >> page in the page content itself so I'm unsure why you'd need a >> template specified. > > This is for the case you don't want to use the content to that. For > example, I used it in workspaces since I wanted the content to be > editable with the (old) WYSIWYG that potentially would alter the > #includeForm statement. (And I also did not wanted to expose this > statement to users). Now, I probably could have used defaultEditSheet > and defaultViewSheet instead, and thus have my presentation code for > edit and view in the wiki rather than in the skin (or templates/ > folder). > > So to sum up: > - "template" is for using a specific .vm to render the document > against > (it will supersede view.vm or edit.vm) > - "defaultViewSheet" or "defaultEditSheet" is to force a wiki document > as sheet in view or edit mode > > Jerome. >> >> But I'm ok to use an editTemplate (and rename template to >> viewTemplate >> - after I understand why we need it). >> >>>> * Add a new field in the information edit panel to set the template >>>> (only for advanced users I think) >>>> >>>> WDYT? >>> I think we'd better not make a too quick decision on that, since >>> if we >>> don't make a sound choice, it potentially will create us more work >>> for >>> the moment we really refactor/remove the inline mode. >>> I would say "defaultEditSheet" is our best option, but I have to >>> think >>> more about it. Feedback from JV and Ludovic would help, they both >>> worked >>> on such refactoring of the inline mode. >> >> The point of this email is to make people react and so that we come >> to >> a quick conclusion. I've been trying to push this issue for months >> now >> without success so I'm now going to handle it and implement it >> myself. >> We also need this fast since otherwise we can't set the default >> syntax >> to xwiki 2.0. >> >> Thanks >> -Vincent >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

