Hi Gerritjan, On Mon, Oct 15, 2012 at 3:14 PM, Vereniging CdLS <[email protected]> wrote:
Hi,
I really like the consistent look and feel of the App Within Minutes; My question is called REVERSE because of the following.
We have a few applications developped before app within minutes was released, thus missing this consistent look and feel
We have a space in our xwiki that is populated with +200 documents with an object of a certain home-developped class. The class itself (as well as the template and sheet for new documents is located) in another space. as well as some code (seperation of content and code!)
The WebHome page of the space is just a normal XWIKI content page.
I want to transform this WebHome page as if it was generated by App-within-minutes; showing the descriptive of the space, a nice ADD User Interface with the famous green "+" symbol and the livetable showing the list of records and sort/filter options.
So I started by adding two objects to this page: - AppWithinMinutes.LiveTableClass
- XWiki.DocumentSheetBinding
You don't need this. See below.
There always were a few XWiki.XWikiRights objects to define the roles of usergroups in this space
I then used the object editor to copy the text of the WebHome page explaining the purpose of this space into the following object AppWithinMinutes.LiveTableClass - Class -> here i inserted a reference to the class used inside the space, but different as in a standard App Within Minutes I refered to [different space].[class document] - Description -> here I copied the descriptive text of the WebHome page - Columns -> here i inserted a list of attributes of the class separated by spaces
I then used to Object editor to update the XWiki.DocumentSheetBinding - Inserted a reference to the Sheet belonging to the class : [different space].[class SHEET document]
XWiki.DocumentSheetBinding is used to bind a sheet to a document. Its main purpose is to display a document with a different sheet than the default (inherited) one. In your case you want to bind your class to a sheet and this is done using a XWiki.ClassSheetBinding object on the class document (not the application home page!). See http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module .
When I saved the WebHome the familliar App-Within Minutes style showed up, but the table showed no record, while I was expecting all the existing records to show What am i missing?
That is because the live table is (re)generated each time you edit your application with the AppWithinMinutes wizard. In other words, the live table is not in AppWithinMinutes.LiveTableViewSheet (the sheet used to view the application home page) but in the content of the application home page itself. You can check by editing in wiki mode the home page of an existing application. This means it's not enough to apply the AppWithinMinutes.LiveTableViewSheet to your space home page (by adding an object of type AppWithinMinutes.LiveTableClass). You need to have the live table code in the content of the space home page. You can achieve this in two ways: (1) Copy and adjust the live table code from the home page of an existing application (2) Use the edit application link. The AppWithinMinutes wizard will (re)generate the live table code. Just make sure you uncheck (in the first step) the options to update the class sheet and template, otherwise they will be overwritten. I'm not fully sure (2) will work because I'm afraid there are few places in the AppWithinMinutes code where the application class is expected to be in the same space as the application data. Let me know if it works. Hope this helps, Marius
(The records were all created as child documents of another document in the space, so they are not 'children' of the WebHome?)
Gerritjan _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users