On Tue, Nov 29, 2016 at 10:27 AM, Marius Dumitru Florea <[email protected]> wrote: > On Tue, Nov 29, 2016 at 11:02 AM, Thomas Mortagne <[email protected] >> wrote: > >> On Tue, Nov 29, 2016 at 9:47 AM, Marius Dumitru Florea >> <[email protected]> wrote: >> > Hi devs, >> > >> > I have an XWiki application that has a template provider which allows the >> > users to create application entries anywhere on the wiki using the Create >> > Page menu. I would like to control entirely how application entries are >> > displayed to the user. I can do this partially from my sheet but: >> > >> > * I can't control the panels. I would like to display panels that are >> > specific to my application whenever a user is viewing an application >> entry, >> > no matter where the application entry is located. >> > * I can't control the color theme or the icon theme. I would like to use >> a >> > custom color theme and icon theme without affecting the other pages from >> > the wiki. >> > * I can't control the layout (the skin). I can hide the extra tabs from >> the >> > sheet but I can't hide a panel column or control the panel column width. >> > >> > One solution to fix my problem is to introduce XClass Preferences, same >> as >> > we have page and wiki preferences. XClass preferences would have priority >> >> > over page and wiki preferences, inheriting from them. We can implement it >> >> > >> I guess technically you mean space and wiki preferences. >> > > Yes. > > >> >> > using either a naming convention, <ClassName>Preferences, or using some >> > xobject on the XClass, similar to the ClassSheetBinding xobject. >> >> > >> What kind of object ? XWikiPreferences or a special kind ? >> > > The XClass Preferences page would have a XWikiPreferences object, just like > page (space) and wiki preferences pages. In the paragraph above I was > actually indicating how the XClass Preferences page can be determined: > either using a naming convention or using configuration (similar to the way > the XClass sheet is configured).
Just wanted to be sure you wanted to use the same class and not introduce a new one. Sounds good to me. Don't really have any issue in mind. > > >> >> > >> > Do you see any problem with solution? I can think of one: access rights. >> > Does it make sense to have access rights specific to an XClass? E.g. >> "only >> > this group can edit instances of this XClass". >> > >> > Do you think it is worth implementing? Another solution would be to allow >> > the sheet to overwrite some of the preferences, but the problem is that >> the >> > sheet is executed after the page HTML has started to be written to the >> > response. >> > >> > Thanks, >> > Marius >> >> >> >> -- >> Thomas Mortagne >> -- Thomas Mortagne

