04-19-2012 03:22 AM
Hello,
Thanks to the help provided at http://answers.nuxeo.com/questions/2205/fill-up-a-form-when-the-document-state-is-to-be-changed-with... by @bjalon, I was able to move ahead and create a layout in Nuxeo Studio.
This layout is to display as an additional tab "Send to Client" when the document is in certain lifecycle state "approved".
The layout is a form containing multiple choice questions with options and some text inputs.
From the "approved" state the document lifecycle has been modified so that it can either return back to "project" by additional editing OR move ahead to be submitted to client and attain the lifecycle state "client".
To move from the "approved" to the "client" state, the only route is to navigate to the tab "Send to Client", fill the form and submit. In case the form is submitted without errors, the document state becomes "Client" and the tab goes away. This change of state including the filling up of the form in the layout is captured in history AND the date entered in the form also needs to be stored.
I was able to create a sample layout form, identifier TAB_CLIENT, using Studio but faced these issues
No option for Radio buttons in the widgets
List item3.
No option for submit button in the widgets
Having to create Vocabularies for "selectOneDirectory" widget used since the radio buttons were not available.
I downloaded the files, included the files relevant to the newly created layout within an empty project in Nuxeo Eclipse IDE and defined the contributions in extensions.xml within "OSGI-INF".
I created a new xhtml file called mytabs.xhtml as suggested by bjalon in the link above. Now I am faced with the dilemma of how to call my layout in this file?
Considering that these files were relevant to the layout that I created
TAB_CLIENT.layout.xml in ".metadata" folder
TSegment.voc.xml, Relevance.voc.xml, Comprehensiv.voc.xml -> in ".metadata" -> vocabulary files used
TSegment.csv, Relevance.csv, Comprehensiv.csv in "\data\vocabularies"
Multiple widget files in "\web\nuxeo.war\widgets" that were used in the layout
In the "\web\nuxeo.war\layouts" folder, there are 3 few layout files
studio_layout_summary_template.xhtml
studio_layout_header_template.xhtml
xyz_layout_template.xhtml - a layout file with the name of my project in studio.
In addition there were other files and schema that are packaged by default when downloading from Studio but not relevant to this requirement.
The package download from studio, in its extension.xml has references to the TAB_CLIENT@create, TAB_CLIENT@edit and TAB_CLIENT@view layouts
under
It also references as below within each layout
With the above I have been able to add the necessary tab to the document view. I have even been able to add a user action "Send to Client", visible in "approved" state, as a shortcut to click and automatically switch to the tab.
However when I click the tab, it gives and UNEXPECTED ERROR "javax.servlet.ServletException" with NULL.
In this scenario, my questions are
Apologies for the long description to put the scenario in perspective. My need is quite urgent now so any immediate help will be very welcome and appreciated.
@bjalon, I have created a new question as suggested. Any help would be wonderful as always 🙂
Many thanks
04-19-2012 06:49 AM
Hi, The nxl:documentLayout waits for a document model as value, see documentation at http://community.nuxeo.com/api/nuxeo/5.4/tlddoc/nxl/documentLayout.html
04-19-2012 03:49 AM
Update
04-19-2012 06:49 AM
Hi, The nxl:documentLayout waits for a document model as value, see documentation at http://community.nuxeo.com/api/nuxeo/5.4/tlddoc/nxl/documentLayout.html
05-03-2012 02:31 AM
Anahide Tchertchian, your comment did point me to the correct direction. I modified my code as below
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.