diff --git a/pom.xml b/pom.xml index f0459b9..fe5d6f0 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.nuxeo nuxeo-addons-parent - 8.3-SNAPSHOT + 8.2 org.nuxeo.sample diff --git a/src/main/java/org/nuxeo/project/sample/BookIntegerConverter.java b/src/main/java/org/nuxeo/project/sample/BookIntegerConverter.java index 5879511..c2fa2a5 100644 --- a/src/main/java/org/nuxeo/project/sample/BookIntegerConverter.java +++ b/src/main/java/org/nuxeo/project/sample/BookIntegerConverter.java @@ -28,7 +28,7 @@ public class BookIntegerConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent component, String value) { Integer result; - if (value.trim().length() == 0) { + if (value == null || value.trim().length() == 0) { result = Integer.valueOf(0); } else { try { diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF index ab17093..ab0c7a7 100644 --- a/src/main/resources/META-INF/MANIFEST.MF +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -11,7 +11,6 @@ Require-Bundle: org.nuxeo.runtime, org.nuxeo.ecm.webapp.core Nuxeo-Component: OSGI-INF/core-types-contrib.xml, OSGI-INF/lifecycle-contrib.xml, - OSGI-INF/ui-types-contrib.xml, OSGI-INF/layouts-contrib.xml, OSGI-INF/actions-contrib.xml, OSGI-INF/event-listener-contrib.xml, @@ -23,4 +22,8 @@ Nuxeo-Component: OSGI-INF/core-types-contrib.xml, OSGI-INF/booktitle-service-contrib.xml, OSGI-INF/booktitle-contrib.xml, OSGI-INF/restpack-contrib.xml, - OSGI-INF/gadget-contrib.xml + OSGI-INF/gadget-contrib.xml, + OSGI-INF/ui-types-contrib.xml, + OSGI-INF/configuration-contrib.xml + + diff --git a/src/main/resources/OSGI-INF/configuration-contrib.xml b/src/main/resources/OSGI-INF/configuration-contrib.xml new file mode 100644 index 0000000..62cf4ea --- /dev/null +++ b/src/main/resources/OSGI-INF/configuration-contrib.xml @@ -0,0 +1,30 @@ + + + + org.nuxeo.ecm.platform.ui.web.configuration.default + org.nuxeo.ecm.platform.forms.layout.properties + org.nuxeo.ecm.platform.webapp.base.properties + org.nuxeo.ecm.platform.actions.actionwidgettypes + + + + + + false + + true + + + + + diff --git a/src/main/resources/OSGI-INF/contentviews-contrib.xml b/src/main/resources/OSGI-INF/contentviews-contrib.xml index dfb519a..8b97672 100644 --- a/src/main/resources/OSGI-INF/contentviews-contrib.xml +++ b/src/main/resources/OSGI-INF/contentviews-contrib.xml @@ -92,5 +92,69 @@ + + + + + label.contentview.document_content + true + false + + + #{documentManager} + DEFAULT_NAVIGATION_RESULTS + + + + + + + + + + + + + ecm:parentId = ? AND ecm:isCheckedInVersion = 0 AND + ecm:mixinType != + 'HiddenInNavigation' AND ecm:currentLifeCycleState + != 'deleted' + + + #{currentDocument.id} + + 20 + + + + true + + true + true + + documentChanged + documentChildrenChanged + + #{currentDocument.id} + 10 + + + + + + + CURRENT_SELECTION + + + + + \ No newline at end of file diff --git a/src/main/resources/OSGI-INF/layouts-contrib.xml b/src/main/resources/OSGI-INF/layouts-contrib.xml index 06ed920..e18853d 100644 --- a/src/main/resources/OSGI-INF/layouts-contrib.xml +++ b/src/main/resources/OSGI-INF/layouts-contrib.xml @@ -30,6 +30,7 @@ + + + + + + + true + + data.bk.keywords + + + book_keywords + true + + + + + + + + false + + data + + @@ -153,6 +179,301 @@ + + + + search_listing_ajax + document_listing_ajax + document_listing + + + + + + true + + false + iconColumn + label.selection.column.checkbox + + + true + + + true + + listing_ajax_selection_box_with_current_document + + + + false + iconColumn + label.selection.column.icon_type + + listing_icon_type + + + + true + dc:title + label.selection.column.title_link + + + true + + + true + + listing_title_link + + + + iconColumn + label.selection.column.lock + + + true + + + true + + listing_lock_icon + + + + true + dc:modified + label.dublincore.modificationDate + + + true + + + true + + listing_modification_date + + + + true + dc:lastContributor + label.dublincore.lastContributor + + + true + + + true + + listing_last_contributor + + + + iconColumn + true + false + label.version + + listing_version + + + + true + + ecm:currentLifeCycleState + + label.lifecycle + + + true + + listing_lifecycle + + + + iconColumn + + label.selection.column.livedit_link + + + + true + + + true + + listing_livedit_link + + + + true + dc:description + description + + + true + + + true + + listing_description + + + + true + dc:nature + label.dublincore.nature + + + true + + + true + + listing_nature + + + + true + label.dublincore.subject + + listing_subjects + + + + true + dc:rights + label.dublincore.rights + + + true + + + true + + listing_rights + + + + true + dc:source + label.dublincore.source + + + true + + + true + + listing_source + + + + true + dc:coverage + label.dublincore.coverage + + + true + + + true + + listing_coverage + + + + true + dc:created + label.dublincore.created + + + true + + + true + + listing_creation_date + + + + true + dc:format + label.dublincore.format + + + true + + + true + + listing_format + + + + true + dc:language + label.dublincore.language + + + true + + + true + + listing_language + + + + true + dc:expired + label.dublincore.expired + + + true + + + true + + listing_expiration_date + + + + true + label.dublincore.contributors + + listing_contributors + + + + + true + Keywords + + listing_keywords + + + + + true + + File Size + + + listing_file_size + + + + + + diff --git a/src/main/resources/OSGI-INF/ui-types-contrib.xml b/src/main/resources/OSGI-INF/ui-types-contrib.xml index 9c9081a..ab8762e 100644 --- a/src/main/resources/OSGI-INF/ui-types-contrib.xml +++ b/src/main/resources/OSGI-INF/ui-types-contrib.xml @@ -1,6 +1,8 @@ + org.nuxeo.ecm.platform.types + @@ -20,12 +22,18 @@ Book + + sample_document_content + Book + + sample_document_content +