cancel
Showing results for 
Search instead for 
Did you mean: 

Tabs for folder with content view : problem with button "New Document"

delphine_
Star Contributor
Star Contributor

Hello

I create in Studio a new tab for display a folder.

In this tab, I want all documents of this folder and, to right, the meta-data of the folder. All is ok, but I can't have the button "Create new document". I test with "Custom Actions" but it doesn't work.

Here a picture :

alt text

Thanks in advance

1 ACCEPTED ANSWER

Fred_Vadon
Star Contributor
Star Contributor

Hi,

The only possible solution in 5.6 is to create a user action in Studio bound to an automation chain to call the operation "User Interface > Show Create document page". It requires to have one action per doc type you want to be able to create.

The reason for the impossibility to use the usual new and import file buttons is because they are not "actions". This is a known issue:

https://jira.nuxeo.com/browse/NXP-9433

Hopefully this is will be corrected in 5.7

View answer in original post

6 REPLIES 6

delphine_
Star Contributor
Star Contributor

anyone to help me ?

Fred_Vadon
Star Contributor
Star Contributor

Hi,

The only possible solution in 5.6 is to create a user action in Studio bound to an automation chain to call the operation "User Interface > Show Create document page". It requires to have one action per doc type you want to be able to create.

The reason for the impossibility to use the usual new and import file buttons is because they are not "actions". This is a known issue:

https://jira.nuxeo.com/browse/NXP-9433

Hopefully this is will be corrected in 5.7

It will

Thanks for the answer.

Hi,

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

As an alternative, you can use a custom widget template with the following code:

<div class="action_bar"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:c="http://java.sun.com/jstl/core">

  <ui:include src="/select_document_type.xhtml"/>
  <ui:include src="/create_file.xhtml"/>

  <h:form id="documentActionSubviewUpperListForm">
    <nxu:set var="actions"
      value="#{webActions.getActionsList('SUBVIEW_UPPER_LIST')}"
      cache="true">
      <c:if test="#{!empty actions}">
        <div class="action_bar">
          <nxu:dataList layout="unorderedList"
            var="action"
            value="#{actions}"
            id="documentActionSubviewUpperListTable">
            <nxh:commandLink action="#{action.getLink()}"
              id="documentActionSubviewUpperListLink"
              immediate="#{action.immediate}"
              onclick="#{action.confirm}">
              <h:graphicImage value="#{action.icon}"
                rendered="#{not empty action.icon}" />
              <h:outputText value="#{messages[action.label]}" />
            </nxh:commandLink>
          </nxu:dataList>
        </div>
      </c:if>
    </nxu:set>
    <nxu:set var="actions"
      value="#{webActions.getActionsList('SUBVIEW_UPPER_LIST_HREF')}"
      cache="true">
      <c:if test="#{!empty actions}">
        <div class="action_bar">
          <nxu:dataList layout="unorderedList"
            var="action"
            value="#{actions}">
            <a href="#{action.getLink()}">
              <h:graphicImage value="#{action.icon}"
                rendered="#{not empty action.icon}" />
              <h:outputText value="#{messages[action.label]}" />
            </a>
          </nxu:dataList>
        </div>
      </c:if>
    </nxu:set>
  </h:form>

</div>

Note that this workaround may stop working as expected on 5.7, where you'll just have to display actions with the category "folder actions".

Getting started

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.