Hi,
I think the subWidgets fields shouldn't be absolute because they are
relative to the parent widget's field. Should look something like that :
<widget name="reg_recipients" type="list">
<labels><label mode="any">reg.layout.label.
recipients</label></labels>
<translated>true</translated>
<fields><field>reg:recipients</field></fields>
<subWidgets>
<widget name="reg_name" type="text">
<labels><label mode="any">reg.layout.label.recipients.name
</label></labels>
<translated>true</translated>
<fields><field>name</field></fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
<widget name="reg_email" type="text">
<labels><label
mode="any">regsalida.layout.label.recipients.email</label></labels>
<translated>true</translated>
<fields><field>email</field></fields>
<properties widgetMode="edit">
<property name="styleClass">dataInputText</property>
</properties>
</widget>
</subWidgets>
</widget>
Check out :
http://doc.nuxeo.org/5.1/books/nuxeo-book/html/layouts.html#d1881e1964
2009/7/8 Daniel Perez Alvarez <[email protected]>
> This is driving me crazy, so I turn to the wisdom of the crowd...
>
> I have a doctype with a list of complex types. The schema looks like this:
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.seia.es/schemas/registry"
> xmlns:reg="http://www.seia.es/schemas/registry">
>
> <xs:complexType name="recipient">
> <xs:sequence>
> <xs:element name="name" type="xs:string" />
> <xs:element name="email" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
>
> <xs:complexType name="recipientList">
> <xs:sequence>
> <xs:element name="item" type="reg:recipient" minOccurs="0"
> maxOccurs="unbounded" />
> </xs:sequence>
> </xs:complexType>
>
> <xs:element name="recipients" type="rs:recipientList" />
>
> </xs:schema>
>
> And the corresponding layout:
>
> <component name="es.seia.reg.layout">
>
> <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
> point="widgets">
>
> <widget name="reg_recipients" type="list">
> <labels><label mode="any">reg.layout.label.recipients</label></labels>
> <translated>true</translated>
> <fields><field>reg:recipients</field></fields>
> <subWidgets>
> <widget name="reg_name" type="text">
> <labels><label mode="any">reg.layout.label.recipients.name
> </label></labels>
> <translated>true</translated>
> <fields><field>reg:name</field></fields>
> <properties widgetMode="edit">
> <property name="styleClass">dataInputText</property>
> </properties>
> </widget>
> <widget name="reg_email" type="text">
> <labels><label
> mode="any">regsalida.layout.label.recipients.email</label></labels>
> <translated>true</translated>
> <fields><field>reg:email</field></fields>
> <properties widgetMode="edit">
> <property name="styleClass">dataInputText</property>
> </properties>
> </widget>
> </subWidgets>
> </widget>
>
> </extension>
>
> <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
> point="layouts">
>
> <layout name="reg">
>
> <templates>
> <template
> mode="any">/layouts/layout_default_template.xhtml</template>
> </templates>
>
> <rows>
> <row><widget>reg_recipients</widget></row>
> </rows>
>
> </layout>
>
> </extension>
>
> </component>
>
> The form for the type is generated correctly, but when I enter the data and
> click Save, the following error is shown:
>
> Exception during request processing:
> Caused by javax.servlet.ServletException with message:
> "/widgets/list_widget_template.xhtml @59,48 value="#{
> model.rowData.reg.name}": Target Unreachable, 'rowData' returned null on
> 'org.nuxeo.ecm.platform.ui.web.model.impl.ProtectedEditableModelImpl'"
>
> I've tried all combinations of templates, widgets and subWidgets, but I
> can't get it to work... Could anybody tell me what I'm doing wrong?
>
> This is using the sources in 5.2.1-SNAPSHOT.
>
> Thank you for your time.
>
> Daniel Pérez Álvarez
> Atos Origin
> Madrid, Spain
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you receive
> this e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and
> will not be liable for any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial
> destinada solamente a la(s) persona(s) mencionadas anteriormente
> pueden estar protegidos por secreto profesional.
> Si usted recibe este correo electronico por error, gracias por informar
> inmediatamente al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin
> no se hace responsable por su contenido. Su contenido no constituye ningun
> compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
> partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus.
> ------------------------------------------------------------------
>
> _______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
> To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm