Xforms functionnalities called from java application

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Xforms functionnalities called from java application

rfleury
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.
Reply | Threaded
Open this post in threaded view
|

Re: Xforms functionnalities called from java application

ilango_g
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
rfleury wrote
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.
Reply | Threaded
Open this post in threaded view
|

Re: Xforms functionnalities called from java application

Erik Bruchez
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?
I am really sorry, but I don't understand your question! Is there a  
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  
> pdf
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Xforms functionnalities called from java application

rfleury
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.

ilango_g wrote
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
rfleury wrote
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.
Reply | Threaded
Open this post in threaded view
|

Re: Xforms functionnalities called from java application

rfleury
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.

Erik Bruchez wrote
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?

I am really sorry, but I don't understand your question! Is there a  
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  
> pdf
> 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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Xforms functionnalities called from java application

ilangostl
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:

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.


ilango_g wrote:
>
> 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
>
> rfleury wrote:
>>
>> 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.
>>
>
>

--
View this message in context: http://www.nabble.com/Xforms-functionnalities-called-from-java-application-tp17425796p17492748.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Xforms functionnalities called from java application

Alessandro Vernet
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