errors contacting orbeon filter

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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 so I jaust build a


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 -->
      
   [...]


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