Hi,
I have to insert some datas with a complexschema in my document
I try (with no succes) in this testcase to insert the datas in my document
type. I use the example in nuxeo-core-api testcases (with complexSchema.xsd)
After testing, I receive wel my document (document.xml) correct but without the
datas I tryed to put in.
And I want to put those datas in ! :-)
--------------------------------------------
*I receive the error :*
4:23:47,074 ERROR [application]
org.nuxeo.ecm.core.api.model.InvalidPropertyValueException: /p:holdOn/bottles
javax.faces.el.EvaluationException:
org.nuxeo.ecm.core.api.model.InvalidPropertyValueException: /p:holdOn/bottles
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:387)
at
org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
at
org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
--------------------------------------------
--------------------------------------------
*There is my class (as seam object)*
....
private List<Map<String, Object>> bottles = new ArrayList<Map<String,
Object>>();
private Map<String, Object> bottle = new HashMap<String, Object>();
private Map<String, Object> holdOn = new HashMap<String, Object>();
public void addBottles() throws Exception {
doc = navigationContext.getChangeableDocument();
bottle.put("p:substance", "mysubstance");
bottle.put("u1", "unite1");
bottle.put("u2", "unite2");
bottle.put("q1", Float.valueOf(10));
bottle.put("q2", Float.valueOf(10));
bottles.add(bottle);
holdOn.put("bottle", bottles);
doc.setPropertyValue("p:holdOn",
(Serializable) holdOn);
}
...
*and there is my schema*
....
<xs:element name="holdOn" type="p:holdOn" />
<xs:complexType name="holdOn">
<xs:sequence>
<xs:element name="bottles" type="p:bottles" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="bottles">
<xs:sequence>
<xs:element name="bottle" type="p:bottle" minOccurs="0"
maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="bottle">
<xs:sequence>
<xs:element name="q1" type="xs:decimal" />
<xs:element name="q2" type="xs:decimal" />
<xs:element name="u1" type="xs:string" />
<xs:element name="u2" type="xs:string" />
<xs:element name="substance" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
....
--
Posted by "meghRF4" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread:
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2666#7575>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm