Hello,
I am trying to implement some repeat instances in Form Builder re-working the Bookcast example. First insertion of data works always well. The second is always not validated so I cannot save. Have somebody an idea what could be wrong? Thanks A. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Adrian,
On Sun, Jul 27, 2008 at 5:15 AM, Adrian Butnaru <[hidden email]> wrote: > I am trying to implement some repeat instances in Form Builder re-working > the Bookcast example. > First insertion of data works always well. The second is always not > validated so I cannot save. What do you mean by "repeated instances"? Form Builder doesn't support XForms repeats yet (even if Form Runner does), so I guess that is not what you are talking about. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Alessandro,
You're right. Actually I am talking about the my form based on the Bookcast example which is not a real Form Builder result. I think Form Builder/Form Runner is an excellent initiative and I would like to keep going in this direction even if the normal XForms approach could be easier to complete. I took the example you gave me before with repeating section in Bookcast app and I applied it in my case. My problems now are: 1. in repeats the second item is not validating. 2. when I add a pdf in my repeat section just the first one is validated. Actually I want to load for each item of the repeat a pdf that should be stored in the server. These pdf's should be available to be downloaded too. I put some code below. Solving the problem on the repeat of "relatedproject-template" and "deliverable-template" will implicitly solve my other problems too. Thanks a lot for your help. Adrian *The relevant code is:* <xforms:model id="fr-form-model" xxforms:help-tooltip="false"> <!-- Inline schema --> <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"> <!-- Top-level element --> <xs:element name="projects"> <xs:complexType> <!-- Allow 0 to n projects --> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element ref="project"/> </xs:sequence> </xs:complexType> </xs:element> <!-- Individual project element --> <xs:element name="project"> <xs:complexType> <xs:sequence> <xs:element name="details" type="details"/> <xs:element name="keydeliverables" type="keydeliverables"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="details"> <xs:sequence> <xs:element name="acronym" type="xs:string"/> <xs:element name="projectname" type="xs:string"/> <xs:element name="subjectarea" type="subjectarea"/> <xs:element name="coordinator" type="xs:string"/> <xs:element name="startdate" type="xs:date"/> <xs:element name="duration" type="xs:double"/> <xs:element name="budget" type="xs:double"/> <xs:element name="funding" type="xs:double"/> <xs:element name="url" type="link"/> <xs:element name="category" type="category"/> <xs:element name="eucategory" type="eucategory"/> <xs:element name="eutype" type="eutype"/> <xs:element name="abstract" type="xs:string"/> <xs:element name="achievement" type="xs:string"/> <xs:element name="summary" type="xs:string"/> <xs:element name="relatedprojects" type="relatedprojects"/> <xs:element name="topics" type="topics"/> <xs:element name="stakeholders" type="stakeholders"/> <xs:element name="policies" type="xs:string"/> <xs:element name="keywords" type="keywords"/> </xs:sequence> </xs:complexType> <!-- Type for subjectarea --> <xs:simpleType name="subjectarea"> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> <xs:enumeration value="3"/> </xs:restriction> </xs:simpleType> <!-- Type for category --> <xs:simpleType name="category"> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> <xs:enumeration value="3"/> </xs:restriction> </xs:simpleType> <!-- Type for eucategory --> <xs:simpleType name="eucategory"> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> <xs:enumeration value="3"/> </xs:restriction> </xs:simpleType> <!-- Type for eutype --> <xs:simpleType name="eutype"> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> </xs:restriction> </xs:simpleType> <!-- Type for link --> <xs:simpleType name="link"> <xs:restriction base="xs:string"> <!-- Approximative regexp for HTTP URLs --> <xs:pattern value="(https?\://([^/?#]+).([^?#]*)(\?([^?#]+))?(#(.*))?)?"/> </xs:restriction> </xs:simpleType> <!-- Type for relatedprojects --> <xs:complexType name="relatedprojects"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="relatedproject" type="relatedproject"/> </xs:sequence> </xs:complexType> <!-- Type for relatedproject --> <xs:complexType name="relatedproject"> <xs:sequence> <xs:element name="relatedprojectname" type="xs:string"/> <xs:element name="relatedprojecturl" type="link"/> </xs:sequence> </xs:complexType> <!-- Type for topics --> <xs:complexType name="topics"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="topic" type="topic"/> </xs:sequence> </xs:complexType> <!-- Type for topic --> <xs:complexType name="topic"> <xs:sequence> <xs:element name="topicname" type="xs:string"/> </xs:sequence> </xs:complexType> <!-- Type for category stakeholders --> <xs:simpleType name="stakeholders"> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> <xs:enumeration value="3"/> <xs:enumeration value="4"/> </xs:restriction> </xs:simpleType> <!-- Type for keywords --> <xs:complexType name="keywords"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="keyword" type="keyword"/> </xs:sequence> </xs:complexType> <!-- Type for keyword --> <xs:complexType name="keyword"> <xs:sequence> <xs:element name="keywordname" type="xs:string"/> </xs:sequence> </xs:complexType> <!-- Type for keydeliverables --> <xs:complexType name="keydeliverables"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="deliverable" type="deliverable"/> </xs:sequence> </xs:complexType> <!-- Type for deliverable --> <xs:complexType name="deliverable"> <xs:sequence> <xs:element name="keytitle" type="xs:string"/> <xs:element name="keydate" type="xs:date"/> <xs:element name="keyorganisation" type="xs:string"/> <xs:element name="keyabstract" type="xs:string"/> <xs:element name="keypdf" type="xs:anyURI"/> </xs:sequence> </xs:complexType> </xs:schema> <!-- Instance that contains all the projects --> <xforms:instance id="fr-form-instance" xxforms:validation="strict"> <project xmlns=""> <details> <acronym/> <projectname/> <subjectarea/> <coordinator/> <startdate/> <duration/> <budget/> <funding/> <url/> <category/> <eucategory/> <eutype/> <abstract/> <achievement/> <summary/> <relatedprojects> </relatedprojects> <topics> <topic> <topicname/> </topic> </topics> <stakeholders/> <policies/> <keywords> <keyword> <keywordname/> </keyword> </keywords> </details> <keydeliverables> <deliverable> <keytitle/> <keydate/> <keyorganisation/> <keyabstract/> <keypdf filename="" mediatype="" size=""/> </deliverable> </keydeliverables> </project> </xforms:instance> <xforms:bind id="fr-form-binds" nodeset="."> <xforms:bind nodeset="details"> <xforms:bind id="acronym-bind" nodeset="acronym" required="true()"/> <xforms:bind id="projectname-bind" nodeset="projectname" required="true()"/> <xforms:bind id="subjectarea-bind" nodeset="subjectarea" required="true()"/> <xforms:bind id="coordinator-bind" nodeset="coordinator" required="true()"/> <xforms:bind id="startdate-bind" nodeset="startdate" required="true()"/> <xforms:bind id="duration-bind" nodeset="duration" required="true()"/> <xforms:bind id="budget-bind" nodeset="budget" required="true()"/> <xforms:bind id="funding-bind" nodeset="funding" required="true()"/> <xforms:bind id="url-bind" nodeset="url" required="true()"/> <xforms:bind id="category-bind" nodeset="category" required="true()"/> <xforms:bind id="eucategory-bind" nodeset="eucategory" required="true()"/> <xforms:bind id="eutype-bind" nodeset="eutype" required="true()"/> <xforms:bind id="abstract-bind" nodeset="abstract" required="true()"/> <xforms:bind id="achievement-bind" nodeset="achievement" required="true()"/> <xforms:bind id="summary-bind" nodeset="summary" required="true()"/> <xforms:bind nodeset="relatedprojects/relatedproject"> <xforms:bind id="relatedprojectname-bind" nodeset="relatedprojectname" required="true()"/> <xforms:bind id="relatedprojecturl-bind" nodeset="relatedprojecturl" required="true()"/> </xforms:bind> <xforms:bind nodeset="topics/topic"> <xforms:bind id="topicname-bind" nodeset="topicname" required="true()"/> </xforms:bind> <xforms:bind nodeset="keywords/keyword"> <xforms:bind id="keywordname-bind" nodeset="keywordname" required="true()"/> </xforms:bind> <xforms:bind id="stakeholders-bind" nodeset="stakeholders" required="true()"/> <xforms:bind id="policies-bind" nodeset="policies" required="true()"/> </xforms:bind> <xforms:bind nodeset="keydeliverables/deliverable"> <xforms:bind id="keytitle-bind" nodeset="keytitle" required="true()"/> <xforms:bind id="keydate-bind" nodeset="keydate" required="true()"/> <xforms:bind id="keyorganisation-bind" nodeset="keyorganisation" required="true()"/> <xforms:bind id="keyabstract-bind" nodeset="keyabstract" required="true()"/> <xforms:bind id="keypdf-bind" nodeset="keypdf" type="xs:anyURI"/> </xforms:bind> </xforms:bind> *The templates for repeat are:* <xforms:instance id="relatedproject-template"> <relatedproject xmlns=""> <relatedprojectname /> <relatedprojecturl /> </relatedproject> </xforms:instance> <xforms:instance id="deliverable-template"> <deliverable xmlns=""> <keytitle /> <keydate /> <keyorganisation /> <keyabstract /> <keypdf /> </deliverable> </xforms:instance> <xforms:instance id="topics-template"> <topic xmlns=""> <topicname /> </topic> </xforms:instance> <xforms:instance id="keywords-template"> <keywords xmlns=""> <keywordname /> </keywords> </xforms:instance> </xforms:model> *And the repeats I am doing like that:* <fr:repeat nodeset="topic" id="topics-repeat" origin="instance('topics-template')" columns="1" appearance="xxforms:table"> <tr> <td> <xforms:textarea ref="topicname" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/topics/label"/> <xforms:hint ref="$form-resources/topics/hint"/> <xforms:help ref="$form-resources/topics/help"/> <xforms:alert ref="$form-resources/topics/alert"/> </xforms:textarea> </td> </tr> </fr:repeat> <fr:repeat nodeset="relatedproject" id="relatedprojects-repeat" origin="instance('relatedproject-template')" columns="2" appearance="xxforms:table"> <tr> <td> <xforms:textarea ref="relatedprojectname" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/relatedprojectname/label"/> <xforms:hint ref="$form-resources/relatedprojectname/hint"/> <xforms:help ref="$form-resources/relatedprojectname/help"/> <xforms:alert ref="$form-resources/relatedprojectname/alert"/> </xforms:textarea> </td> <td> <xforms:textarea ref="relatedprojecturl" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/relatedprojecturl/label"/> <xforms:hint ref="$form-resources/relatedprojecturl/hint"/> <xforms:help ref="$form-resources/relatedprojecturl/help"/> <xforms:alert ref="$form-resources/relatedprojecturl/alert"/> </xforms:textarea> </td> </tr> </fr:repeat> <fr:section id="keydeliverables-section" context="keydeliverables"> <xforms:label ref="$form-resources/keydeliverables/label"/> <fr:grid columns="5"> <tr> <td> <fr:repeat nodeset="deliverable" id="keydeliverables-repeat" origin="instance('deliverable-template')" columns="5" appearance="xxforms:table"> <xforms:label>Deliverables</xforms:label> <tr> <td width="100px"> <xforms:textarea ref="keytitle" bind="keytitle-bind" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/keytitle/label"/> <xforms:hint ref="$form-resources/keytitle/hint"/> <xforms:help ref="$form-resources/keytitle/help"/> <xforms:alert ref="$form-resources/keytitle/alert"/> </xforms:textarea> </td> <td width="100px"> <xforms:textarea ref="keydate" bind="keydate-bind" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/keydate/label"/> <xforms:hint ref="$form-resources/keydate/hint"/> <xforms:help ref="$form-resources/keydate/help"/> <xforms:alert ref="$form-resources/keydate/alert"/> </xforms:textarea> </td> <td width="100px"> <xforms:textarea ref="keyorganisation" bind="keyorganisation-bind" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/keyorganisation/label"/> <xforms:hint ref="$form-resources/keyorganisation/hint"/> <xforms:help ref="$form-resources/keyorganisation/help"/> <xforms:alert ref="$form-resources/keyorganisation/alert"/> </xforms:textarea> </td> <td width="200px"> <xforms:textarea ref="keyabstract" bind="keyabstract-bind" appearance="xxforms:autosize" incremental="true"> <xforms:label ref="$form-resources/keyabstract/label"/> <xforms:hint ref="$form-resources/keyabstract/hint"/> <xforms:help ref="$form-resources/keyabstract/help"/> <xforms:alert ref="$form-resources/keyabstract/alert"/> </xforms:textarea> </td> <td width="200px"> <xforms:upload id="keypdf-control" bind="keypdf-bind" class="fr-attachment"> <xforms:label ref="$form-resources/keypdf/label"/> <xforms:hint ref="$form-resources/keypdf/hint"/> <xforms:help ref="$form-resources/keypdf/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> <xforms:filename ref="@filename"/> <xforms:mediatype ref="@mediatype"/> <xxforms:size ref="@size"/> </xforms:upload> </td> </tr> </fr:repeat> </td> </tr> </fr:grid> </fr:section> Alessandro Vernet schreef: > Adrian, > > On Sun, Jul 27, 2008 at 5:15 AM, Adrian Butnaru <[hidden email]> wrote: > >> I am trying to implement some repeat instances in Form Builder re-working >> the Bookcast example. >> First insertion of data works always well. The second is always not >> validated so I cannot save. >> > > What do you mean by "repeated instances"? Form Builder doesn't support > XForms repeats yet (even if Form Runner does), so I guess that is not > what you are talking about. > > Alex > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
I succeeded to make it working.
I moved all my repeats inside new separate sections and now is OK. However I Still have problems with the pdf uploading. I can fill all the data in the form and I can save the document. If I am uploading a file in the control upload "keypdf" I am not able to save the document anymore and the application reports"Errors on form".What can be the cause? A.
|
Administrator
|
Adrian,
On Mon, Jul 28, 2008 at 4:50 AM, abutnaru <[hidden email]> wrote: > However I Still have problems with the pdf uploading. > I can fill all the data in the form and I can save the document. > If I am uploading a file in the control upload "keypdf" I am not able to > save the document anymore and the application reports"Errors on form".What > can be the cause? I thought for a second that it would be enough to add an upload field to reproduce this problem, but that doesn't seem to be the case (i.e. validation works as expected in the example I created). Could you attach your updated XForms? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Alessandro,
Attached you will find the updated XForms. It works perfect with form runner,except when a new item is added in the last repeat in the section keydeliverables. I suspect is because of the upload control when I am trying to attach pdf files. Adrian form.xhtml |
In reply to this post by Alessandro Vernet
Alessandro,
Attached you will find the updated XForms. It works perfect with form runner,except when a new item is added in the last repeat in the section keydeliverables. I suspect is because of the upload control when I am trying to attach pdf files. Adrian form.xhtml |
In reply to this post by Alessandro Vernet
I checked the XForms with the repeat having no upload control inside and
it works. I am sure I am doing something wrong with this control. Is this type of control "acting" as the textarea for example with "ref"? What else can be wrong? Help will be very much appreciated. A. Alessandro Vernet schreef: > Adrian, > > On Mon, Jul 28, 2008 at 4:50 AM, abutnaru <[hidden email]> wrote: > >> However I Still have problems with the pdf uploading. >> I can fill all the data in the form and I can save the document. >> If I am uploading a file in the control upload "keypdf" I am not able to >> save the document anymore and the application reports"Errors on form".What >> can be the cause? >> > > I thought for a second that it would be enough to add an upload field > to reproduce this problem, but that doesn't seem to be the case (i.e. > validation works as expected in the example I created). Could you > attach your updated XForms? > > Alex > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |