Dear all,
I am working on a java web application (but not developping it directly) in which an xforms (orbeon) is deployed. Both java and orbeon environment have to interact one with eachother. For example, one button in the application will be clickable by the user only if the form has been validated against the xsd schema. This work fine, but I would like now to improve some functionalities: - Concerning the example I was giving above, as I add controls on some fields of my form that don't appear in the xsd schema, but directly in the xhtml file in the <bind> (constraint), what happen is that the user is able to click on the button of the application even if the "constraint" of the <bind> is not OK! Is there any way for all these binding to be taken into account by the java application? - I would like to find a way to use the pdf template functionnality of Orbeon called from the java application. One button of the java application would have to call my submission (in my xhtml) that call itself the pdf template processor. I think that maybe the answer to the first question could bring the answer to the second one. I hope someone could help me on this. Thanks in advance. Regards, Romain. |
Hi Romain
Interestingly I am going to be creating a separate FOP service for printing out my XForm This separate java service would create a PDF. I think a button on my XForm would have to invoke this service. I am not sure if I have addressed any of your questions. But this is my direction so far. ilango
|
Administrator
|
In reply to this post by rfleury
Romain,
> I am working on a java web application (but not developping it > directly) in > which an xforms (orbeon) is deployed. Both java and orbeon > environment have > to interact one with eachother. For example, one button in the > application > will be clickable by the user only if the form has been validated > against > the xsd schema. This work fine, but I would like now to improve some > functionalities: > > - Concerning the example I was giving above, as I add controls on > some > fields of my form that don't appear in the xsd schema, but directly > in the > xhtml file in the <bind> (constraint), what happen is that the user > is able > to click on the button of the application even if the "constraint" > of the > <bind> is not OK! Is there any way for all these binding to be taken > into > account by the java application? way you could reformulate it? > - I would like to find a way to use the pdf template functionnality > of > Orbeon called from the java application. One button of the java > application > would have to call my submission (in my xhtml) that call itself the > template processor. You could create a service with XPL which calls the PDF Template processor and returns a binary result. This is possible with Orbeon Forms. This part would not use any XHTML/XForms at all, just a pipeline and the PDF Template processor. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
In reply to this post by ilango_g
Hi ilango,
Thanks very much for answering to me. I don't know exactly what is a FOP service. I've looked a little bit on internet and I think that it does not fit exactly what I want to do. What I want is to generate a pdf from a template empty pdf that I am able to fill in with my instance data. This work perfectly in standalone with Orbeon. Now I would like to call this functionnality from my java application ensuring before that the form is correctly filled (xsd validation, calculate and constraint bindings...) Romain.
|
In reply to this post by Erik Bruchez
Hi Erik,
I will try to reformulate my question: I am using a form that contains different kind of controls. For example, the form contains a field "Date of birth"; this field has the following type defined in the xsd: <xs:simpleType name="DateType"> <xs:restriction base="xs:date"> <xs:pattern value="(1[9][0-9][0-9]|2[0-9][0-9][0-9])-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[012])"/> </xs:restriction> </xs:simpleType> Then I want to be able to check the age of the person, This is done thanks to a bind in the xhtml: <xforms:bind nodeset="/Person/BirthDate" constraint="if (. castable as xs:date) then current-date() - xs:yearMonthDuration('P18Y') >= xs:date(.) else (.)" /> But then if a person older than 18 years old enter her date of birth in the form with a good format. The field will be flagged in error because of the bind. But from my java application, the check of the form will be done only against the xsd, so the user will be able to reach the next step... So what I would like to be able to do is to take these kind of bindings into account when validating the form from my java application. Hope I formulate my problem in a better way than last time... Concerning the other question about the use of the pdf template generation from the java application: I would like to be sure I understood what you said: the service you are speaking about is created directly in the java application? With this service I should be able to call a processor that validate my form (I've seen that a validation processor exists, so I just need now to be able to validate the form against the bindings too) and then call the pdf template processor. Thank you very much to give me help on this. Romain.
|
In reply to this post by rfleury
Hi Romain
I was referring to Apache FOP (formatting objects..).Sorry about not being very clear with the acronym. I used XSL-FO for this. Interestingly I also wrote code for calculating the age of a person, with not perfect results.I would like to try your age-related code. and see if it will solve the problem of having wrong age at the boundaries. thanks ilango On Tue, May 27, 2008 at 11:14 AM, rfleury <[hidden email]> wrote:
-- 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
|
In reply to this post by rfleury
On Tue, May 27, 2008 at 9:06 AM, rfleury <[hidden email]> wrote:
> So what I would like to be able to do is to take these kind of bindings into > account when validating the form from my java application. One way to do this is to store in the instance information about the result of the XForms validation. Say you have on the root element an attribute xforms-considers-instance-valid="true|false". Before you submit the instance to the Java code, you set the value of this attribute with <xforms:setvalue>, using xxforms:valid(). More on http://localhost:8080/orbeon/doc/reference-xforms-2#ops-extensions. Note that you will need to use a fairly recent build for this. Now of course, you could do this validity check before you do the submission to the Java code, so the data is not submitted to the Java code in the first place if it is not valid. 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 |
Free forum by Nabble | Edit this page |