08-30-2013 10:40 AM
Hello,
Sometime i only have the possibility to add one type of document, It's possible to bypass the popup menu and directly move to the document creation layout ?
If i can't, i think i have to do a User Action who do the job.
Thanks
09-04-2013 06:41 AM
In short: you could probably do it, but it would be complicated for what it's worth.
Here's a possible approach (not tested):
Override the default "newDocument" action (source) to make it hide when there's only <= 1 available type
...
<rule grant="false">
<condition>#{typesTool.getTypesList().size() <= 1}</condition>
</rule>
Add a new user action (like you said), that will appear only in this case. A limitation is that you will have to explicitly specify the document type to be created, like with the "newWorskace" button (see the "link" attribute):
<action ... link="#{documentActions.createDocument('Workspace')}">
...
You could hack this issue by making one button for each type and add some complex conditions, but it would get quite complicated.
Alternately, if you're not afraid of XHTML, you could write some code to tweak the "select_document_type.xhtml"
template, which is more technical but probably a better idea.
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.