05-06-2013 01:24 PM
Hi, I want to use this widget in a view jsf but I dont know how to configure this without nuxeo studio. I have defined a document in nuxeo studio and it has a schema "myschema" and field "myfield". Now I want show this field in my view view.xhtml but without use documentLayout tag because only have to show one field and field has to be a list widget.
My configurations: -myschema:telefonos multi valued in nuxeo studio -mydocument type in nuxeo studio
-In my plugin: layout definition:
<layout name="telefonos">
<templates>
<template mode="any">/layouts/layout_default_template.xhtml
</template>
</templates>
<rows>
<row>
<widget>listArrayWidget</widget>
</row>
</rows>
<widget name="listArrayWidget" type="list">
<labels>
<label mode="any">Teléfonos</label>
</labels>
<translated>false</translated>
<fields>
<field>data.telefonos</field>
</fields>
<properties widgetMode="edit">
<property name="required">true</property>
</properties>
<properties widgetMode="any">
<property name="hideSubLabels">true</property>
</properties>
<subWidgets>
<widget name="listItem" type="text">
<fields>
<field></field>
</fields>
<labels>
<label mode="any"></label>
</labels>
<properties widgetMode="edit">
<property name="required">true</property>
<property name="validator">#{dmValidatorBean.validateTelefono}</property>
</properties>
</widget>
</subWidgets>
</widget>
</layout>
-In my view xhtml:
<a4j:outputPanel ajaxRendered="true">
<nxl:layout name="telefonos" mode="edit" value="#{mySolicitud.currentDocNuxeo}" />
</a4j:outputPanel>
This is showed well in my wizard but when press save button, the changes are not saved. Only are saved the fields text, datetime ... Someone can help me?
05-06-2013 02:02 PM
Hi,
Here is the documentation you're looking for.
For this kind of problems the Platform Explorer is very useful: assuming you already know how to create and use a widget through XML (otherwise, you'll have to read this), see this page to find examples of widgets that use the "list" widget type in Nuxeo.
The layout showcase can also be useful.
Here is one:
<widget name="dr_listing_no_comments" type="list">
<labels>
<label mode="any">label.content.header.comments</label>
</labels>
<translated>true</translated>
<fields>
<field>data.document.tkst.comments</field>
</fields>
<properties widgetMode="edit">
<property name="orderable">false</property>
<property name="diff">false</property>
<property name="display">table</property>
<property name="required">false</property>
<property name="hideSubLabels">true</property>
</properties>
<properties mode="any"/>
<subWidgets>
<widget name="sub0" type="text">
<labels>
<label mode="any"/>
</labels>
<translated>false</translated>
<fields>
<field/>
</fields>
<properties mode="any"/>
</widget>
</subWidgets>
</widget>
Is your property is just a list of strings, you can get things done by just copy/pasting and tweaking the above XML.
05-06-2013 02:02 PM
Hi,
Here is the documentation you're looking for.
For this kind of problems the Platform Explorer is very useful: assuming you already know how to create and use a widget through XML (otherwise, you'll have to read this), see this page to find examples of widgets that use the "list" widget type in Nuxeo.
The layout showcase can also be useful.
Here is one:
<widget name="dr_listing_no_comments" type="list">
<labels>
<label mode="any">label.content.header.comments</label>
</labels>
<translated>true</translated>
<fields>
<field>data.document.tkst.comments</field>
</fields>
<properties widgetMode="edit">
<property name="orderable">false</property>
<property name="diff">false</property>
<property name="display">table</property>
<property name="required">false</property>
<property name="hideSubLabels">true</property>
</properties>
<properties mode="any"/>
<subWidgets>
<widget name="sub0" type="text">
<labels>
<label mode="any"/>
</labels>
<translated>false</translated>
<fields>
<field/>
</fields>
<properties mode="any"/>
</widget>
</subWidgets>
</widget>
Is your property is just a list of strings, you can get things done by just copy/pasting and tweaking the above XML.
05-07-2013 12:31 PM
Hi, it works but in my attribute field I wrote this
05-06-2013 06:24 PM
Hi in my field attribute wrote this
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.