Updates to Page Creator Tool

cancel
Showing results for 
Search instead for 
Did you mean: 

Updates to Page Creator Tool

ddraper
Intermediate II
0 4 1,853
by Dave Draper

Introduction



I've recently committed some updates to the Alfresco Community SVN repository that enable some new Aikau page creation capabilities in Share. These changes are only currently available (at the time of writing) in nightly builds of Community and you will need to download the updated PageCreator extension (you'll need to remove the previous JAR!).



There are two new main features – the first is the ability to edit previously created page definitions (created using the drag-and-drop editor) and the second is the ability to export a page definition as a WebScript JavaScript controller.

Some Caveats



There are a couple of caveats to be aware of:



  1. The edit function can end up pushing around some fairly sizeable JavaScript objects and can take down Firefox if you happen to have Firebug running (some future optimizations are required to the code – but this is not supported production quality code yet!)


  2. The WebScript controller export capability only currently works with Chrome.



...so what I'm really saying is that you should probably try these features out with Chrome!



To edit a previously created page simply add a “page” request parameter onto the end of the URL where the value is the name of a previously created page, e.g:



  • http://<server>:<port>/share/page/hdp/ws/page-creator?page=my-previous-page



Where 'my-previous-page' is the name of the page you want to edit. If that page doesn't exist then the creator will fall back to creating a new page.



When exporting a page model as a WebScript controller it will take the page name and append “.get.js” to it as the name of the download that is generated (obviously you'll need to create the WebScript descriptor and template files – although this should be relatively straightforward to do).

Brief Introduction to QuADDS



You might also notice that some new widgets have appears in the palette – and in particular you might be wondering what “QuADDS” is. I'm going to describe this in a future blog post but just to whet your appetite it stands for 'Quick And Dirty Data Structures' and is a mechanism that enables you to persist and retrieve data objects that are derived entirely from the UI that you build. This means that it is possible to quickly prototype out Aikau pages without needing to build a custom model and the associated REST API and services.



If you want to try it out (before I get around to describing it in more detail) then you'll need to create a new folder in the “Data Dictionary” called “QuADDS” and create and view pages as “admin”.

Summary



The Page Creator Tool is still very much a work in progress (and not necessarily something that will ever get into a production release) however the lack of an 'edit' capability was obviously something that was required.



I'm grateful for any feedback on these updates and the Page Creator Tool in general - so please feel free to comment anything below (bugs, questions, ideas, constructive criticism, etc).
4 Comments