ERRATA CORRIGE: errors contacting orbeon filter

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

ERRATA CORRIGE: errors contacting orbeon filter

daniele ippoliti
Hello guys,

It's my first day with orbeon so I would like to share with you some errors that I'm getting

from my java code I would like to contact orbeon simply passing my page that has to be translated in HTML.


I use freeMarker to build the xml and I have xform defined in an ftl file that in the code is referenced by ftlTemplate, while the templateModel is where I put some parameter to pass to my ftl template, so with the following instruction I'm generating an xml file that start in this way:

<?xml version="1.0" encoding="UTF-8"?>

<!-- START ORBEON MIGRATION -->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xf="http://www.w3.org/2002/xforms"
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
      xmlns:ev="http://www.w3.org/2001/xml-events"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- END ORBEON MIGRATION -->     
     
    <head>
        <title>General Information</title>
        <!--link rel="stylesheet" type="text/css" href="/alfresco/s/acm/xforms/
bfResources/scripts/dojo/resources/dojo.css"/>
        <link rel="stylesheet" type="text/css" href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/tundra/tundra.css" /-->
        <!-- START ORBEON MIGRATION -->
        <!--link rel="stylesheet" type="text/css" href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/amadeus_theme/amadeus_custom_theme.css" /-->
        <!-- END ORBEON MIGRATION -->
      
   [...]

The insteruction that merge the ftlTemplate and the parameter retrieved putting all in the temlpate Out is the following

freeMarkerProcessor.process(ftlTemplate, templateModel, templateOut);

then I have to contact orbeon to pass my templateOut

I have tried two ways:

1)            httpRequest.setAttribute("oxf.xforms.renderer.document", templateOut.toString());
              orbeonDispatcher.forward(httpRequest, httpResponse);


ERROR: Orbeon Error "html" is not allowed here.
maybe beacuse my templateOut is not real xml but has Xforms and HTML element so I adopted the second solution

2)         DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance();
            DocumentBuilder db= dbf.newDocumentBuilder();
            Document doc=db.parse(new InputSource(new SharedCharArrayReader(templateOut)));
            httpRequest.setAttribute("oxf.xforms.renderer.document", doc);

ERROR: In this case I saw my page reload (while I should see just my iFrame reloaded because I put this process inside a little iFrame in the page so the result of orbeon computation should impact and reload just the little iFrame. Even if when the page is reloaded I'm not able to see the xform part opened.

Am I doing the right things?
How can I solve the step 1) ?

thank you Daniele Ippoliti


--
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: ERRATA CORRIGE: errors contacting orbeon filter

Erik Bruchez
Administrator
Daniele,

Did you find a solution for this?

-Erik

On Wed, Nov 16, 2011 at 3:24 AM, daniele ippoliti <[hidden email]> wrote:

> Hello guys,
>
> It's my first day with orbeon so I would like to share with you some errors
> that I'm getting
>
> from my java code I would like to contact orbeon simply passing my page that
> has to be translated in HTML.
>
>
> I use freeMarker to build the xml and I have xform defined in an ftl file
> that in the code is referenced by ftlTemplate, while the templateModel is
> where I put some parameter to pass to my ftl template, so with the following
> instruction I'm generating an xml file that start in this way:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- START ORBEON MIGRATION -->
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:xf="http://www.w3.org/2002/xforms"
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>       xmlns:ev="http://www.w3.org/2001/xml-events"
>       xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <!-- END ORBEON MIGRATION -->
>
>     <head>
>         <title>General Information</title>
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/
> bfResources/scripts/dojo/resources/dojo.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/tundra/tundra.css"
> /-->
>         <!-- START ORBEON MIGRATION -->
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/amadeus_theme/amadeus_custom_theme.css"
> /-->
>         <!-- END ORBEON MIGRATION -->
>
>    [...]
>
> The insteruction that merge the ftlTemplate and the parameter retrieved
> putting all in the temlpate Out is the following
>
> freeMarkerProcessor.process(ftlTemplate, templateModel, templateOut);
>
> then I have to contact orbeon to pass my templateOut
>
> I have tried two ways:
>
> 1)            httpRequest.setAttribute("oxf.xforms.renderer.document",
> templateOut.toString());
>               orbeonDispatcher.forward(httpRequest, httpResponse);
>
> ERROR: Orbeon Error "html" is not allowed here.
> maybe beacuse my templateOut is not real xml but has Xforms and HTML element
> so I adopted the second solution
>
> 2)         DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance();
>             DocumentBuilder db= dbf.newDocumentBuilder();
>             Document doc=db.parse(new InputSource(new
> SharedCharArrayReader(templateOut)));
>             httpRequest.setAttribute("oxf.xforms.renderer.document", doc);
>
> ERROR: In this case I saw my page reload (while I should see just my iFrame
> reloaded because I put this process inside a little iFrame in the page so
> the result of orbeon computation should impact and reload just the little
> iFrame. Even if when the page is reloaded I'm not able to see the xform part
> opened.
>
> Am I doing the right things?
> How can I solve the step 1) ?
>
> thank you Daniele Ippoliti
>
>
> --
> 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: ERRATA CORRIGE: errors contacting orbeon filter

daniele ippoliti
Hello Eric,
yes I found the solution now I would like to understand how can I integrate orbeon in my app.
You have to imagine that I have my app with my UI, I can create an i-frame that point to the Orbeon Runner specifying the url of the form that i want to load in the runner.

then for form developer i can use the Orbeon builder to deploy the form in the orbeon context...

and for the persistence layer since I'm using Alfresco I have to implement the REST API...

Hva I undesrtood well?

thank you

Daniele

2011/11/30 Erik Bruchez <[hidden email]>
Daniele,

Did you find a solution for this?

-Erik

On Wed, Nov 16, 2011 at 3:24 AM, daniele ippoliti <[hidden email]> wrote:
> Hello guys,
>
> It's my first day with orbeon so I would like to share with you some errors
> that I'm getting
>
> from my java code I would like to contact orbeon simply passing my page that
> has to be translated in HTML.
>
>
> I use freeMarker to build the xml and I have xform defined in an ftl file
> that in the code is referenced by ftlTemplate, while the templateModel is
> where I put some parameter to pass to my ftl template, so with the following
> instruction I'm generating an xml file that start in this way:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- START ORBEON MIGRATION -->
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:xf="http://www.w3.org/2002/xforms"
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>       xmlns:ev="http://www.w3.org/2001/xml-events"
>       xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <!-- END ORBEON MIGRATION -->
>
>     <head>
>         <title>General Information</title>
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/
> bfResources/scripts/dojo/resources/dojo.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/tundra/tundra.css"
> /-->
>         <!-- START ORBEON MIGRATION -->
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/amadeus_theme/amadeus_custom_theme.css"
> /-->
>         <!-- END ORBEON MIGRATION -->
>
>    [...]
>
> The insteruction that merge the ftlTemplate and the parameter retrieved
> putting all in the temlpate Out is the following
>
> freeMarkerProcessor.process(ftlTemplate, templateModel, templateOut);
>
> then I have to contact orbeon to pass my templateOut
>
> I have tried two ways:
>
> 1)            httpRequest.setAttribute("oxf.xforms.renderer.document",
> templateOut.toString());
>               orbeonDispatcher.forward(httpRequest, httpResponse);
>
> ERROR: Orbeon Error "html" is not allowed here.
> maybe beacuse my templateOut is not real xml but has Xforms and HTML element
> so I adopted the second solution
>
> 2)         DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance();
>             DocumentBuilder db= dbf.newDocumentBuilder();
>             Document doc=db.parse(new InputSource(new
> SharedCharArrayReader(templateOut)));
>             httpRequest.setAttribute("oxf.xforms.renderer.document", doc);
>
> ERROR: In this case I saw my page reload (while I should see just my iFrame
> reloaded because I put this process inside a little iFrame in the page so
> the result of orbeon computation should impact and reload just the little
> iFrame. Even if when the page is reloaded I'm not able to see the xform part
> opened.
>
> Am I doing the right things?
> How can I solve the step 1) ?
>
> thank you Daniele Ippoliti
>
>
> --
> 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




--
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: ERRATA CORRIGE: errors contacting orbeon filter

daniele ippoliti
sorry Erik not Eric :)

2011/11/30 daniele ippoliti <[hidden email]>
Hello Eric,
yes I found the solution now I would like to understand how can I integrate orbeon in my app.
You have to imagine that I have my app with my UI, I can create an i-frame that point to the Orbeon Runner specifying the url of the form that i want to load in the runner.

then for form developer i can use the Orbeon builder to deploy the form in the orbeon context...

and for the persistence layer since I'm using Alfresco I have to implement the REST API...

Hva I undesrtood well?

thank you

Daniele


2011/11/30 Erik Bruchez <[hidden email]>
Daniele,

Did you find a solution for this?

-Erik

On Wed, Nov 16, 2011 at 3:24 AM, daniele ippoliti <[hidden email]> wrote:
> Hello guys,
>
> It's my first day with orbeon so I would like to share with you some errors
> that I'm getting
>
> from my java code I would like to contact orbeon simply passing my page that
> has to be translated in HTML.
>
>
> I use freeMarker to build the xml and I have xform defined in an ftl file
> that in the code is referenced by ftlTemplate, while the templateModel is
> where I put some parameter to pass to my ftl template, so with the following
> instruction I'm generating an xml file that start in this way:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- START ORBEON MIGRATION -->
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:xf="http://www.w3.org/2002/xforms"
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>       xmlns:ev="http://www.w3.org/2001/xml-events"
>       xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <!-- END ORBEON MIGRATION -->
>
>     <head>
>         <title>General Information</title>
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/
> bfResources/scripts/dojo/resources/dojo.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/tundra/tundra.css"
> /-->
>         <!-- START ORBEON MIGRATION -->
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/amadeus_theme/amadeus_custom_theme.css"
> /-->
>         <!-- END ORBEON MIGRATION -->
>
>    [...]
>
> The insteruction that merge the ftlTemplate and the parameter retrieved
> putting all in the temlpate Out is the following
>
> freeMarkerProcessor.process(ftlTemplate, templateModel, templateOut);
>
> then I have to contact orbeon to pass my templateOut
>
> I have tried two ways:
>
> 1)            httpRequest.setAttribute("oxf.xforms.renderer.document",
> templateOut.toString());
>               orbeonDispatcher.forward(httpRequest, httpResponse);
>
> ERROR: Orbeon Error "html" is not allowed here.
> maybe beacuse my templateOut is not real xml but has Xforms and HTML element
> so I adopted the second solution
>
> 2)         DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance();
>             DocumentBuilder db= dbf.newDocumentBuilder();
>             Document doc=db.parse(new InputSource(new
> SharedCharArrayReader(templateOut)));
>             httpRequest.setAttribute("oxf.xforms.renderer.document", doc);
>
> ERROR: In this case I saw my page reload (while I should see just my iFrame
> reloaded because I put this process inside a little iFrame in the page so
> the result of orbeon computation should impact and reload just the little
> iFrame. Even if when the page is reloaded I'm not able to see the xform part
> opened.
>
> Am I doing the right things?
> How can I solve the step 1) ?
>
> thank you Daniele Ippoliti
>
>
> --
> 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





--
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: ERRATA CORRIGE: errors contacting orbeon filter

daniele ippoliti
Hello Erik I have just read your answer so thank you for your help now all it's clear...

nice day
Daniele

2011/11/30 daniele ippoliti <[hidden email]>
sorry Erik not Eric :)


2011/11/30 daniele ippoliti <[hidden email]>
Hello Eric,
yes I found the solution now I would like to understand how can I integrate orbeon in my app.
You have to imagine that I have my app with my UI, I can create an i-frame that point to the Orbeon Runner specifying the url of the form that i want to load in the runner.

then for form developer i can use the Orbeon builder to deploy the form in the orbeon context...

and for the persistence layer since I'm using Alfresco I have to implement the REST API...

Hva I undesrtood well?

thank you

Daniele


2011/11/30 Erik Bruchez <[hidden email]>
Daniele,

Did you find a solution for this?

-Erik

On Wed, Nov 16, 2011 at 3:24 AM, daniele ippoliti <[hidden email]> wrote:
> Hello guys,
>
> It's my first day with orbeon so I would like to share with you some errors
> that I'm getting
>
> from my java code I would like to contact orbeon simply passing my page that
> has to be translated in HTML.
>
>
> I use freeMarker to build the xml and I have xform defined in an ftl file
> that in the code is referenced by ftlTemplate, while the templateModel is
> where I put some parameter to pass to my ftl template, so with the following
> instruction I'm generating an xml file that start in this way:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!-- START ORBEON MIGRATION -->
> <html xmlns="http://www.w3.org/1999/xhtml"
>       xmlns:xf="http://www.w3.org/2002/xforms"
>       xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>       xmlns:ev="http://www.w3.org/2001/xml-events"
>       xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <!-- END ORBEON MIGRATION -->
>
>     <head>
>         <title>General Information</title>
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/
> bfResources/scripts/dojo/resources/dojo.css"/>
>         <link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/tundra/tundra.css"
> /-->
>         <!-- START ORBEON MIGRATION -->
>         <!--link rel="stylesheet" type="text/css"
> href="/alfresco/s/acm/xforms/bfResources/scripts/dijit/themes/amadeus_theme/amadeus_custom_theme.css"
> /-->
>         <!-- END ORBEON MIGRATION -->
>
>    [...]
>
> The insteruction that merge the ftlTemplate and the parameter retrieved
> putting all in the temlpate Out is the following
>
> freeMarkerProcessor.process(ftlTemplate, templateModel, templateOut);
>
> then I have to contact orbeon to pass my templateOut
>
> I have tried two ways:
>
> 1)            httpRequest.setAttribute("oxf.xforms.renderer.document",
> templateOut.toString());
>               orbeonDispatcher.forward(httpRequest, httpResponse);
>
> ERROR: Orbeon Error "html" is not allowed here.
> maybe beacuse my templateOut is not real xml but has Xforms and HTML element
> so I adopted the second solution
>
> 2)         DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance();
>             DocumentBuilder db= dbf.newDocumentBuilder();
>             Document doc=db.parse(new InputSource(new
> SharedCharArrayReader(templateOut)));
>             httpRequest.setAttribute("oxf.xforms.renderer.document", doc);
>
> ERROR: In this case I saw my page reload (while I should see just my iFrame
> reloaded because I put this process inside a little iFrame in the page so
> the result of orbeon computation should impact and reload just the little
> iFrame. Even if when the page is reloaded I'm not able to see the xform part
> opened.
>
> Am I doing the right things?
> How can I solve the step 1) ?
>
> thank you Daniele Ippoliti
>
>
> --
> 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






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