Hi,
I have integrated the orbeon with struts as a separate application following the steps given in :"Using the Orbeon Forms XForms Engine with Java Applications" in www.orbeon.com
I am able to run the application sucessfully.
-- 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 |
Hi,
I have integrated the orbeon with struts as a separate application following the steps given in :"Using the Orbeon Forms XForms Engine with Java Applications" in <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.orbeon.com/" target="_blank">www.orbeon.com
I am able to run the application sucessfully.
1. I have the filter mapping in web.xml as,
<filter>
s-filter</filter-name> <filter-class>org.orbeon.oxf.servlet.OPSXFormsFilter</filter-class> <init-param> <param-name>oxf.xforms.renderer.context</param-name> <param-value>/orbeon</param-value> </init-param> </filter> <filter-mapping> <filter-name>ops-xforms-filter</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> <filter-mapping> <filter-name>ops-xforms-filter</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> <filter-mapping> <filter-name>ops-xforms-filter</filter-name> <url-pattern>/orbeon/*</url-pattern> </filter-mapping> 2. In my struts action class SampleAction,
String str = "<Students xmlns=""><Student><name>sathish</name><age>23</age></Student></Students>";
response.setContentType("application/xml");
ServletOutputStream is = response.getOutputStream();
is.write(combineSpec.getBytes());
// is.flush();
return mapping.findForward("done");
please note that i didnt flush the stream.
Scnario 1 : When I submit the xform to the above action, if the action forwards to the same xform from which the request has been sent, I got the perfect orbeon xform output. for example : In struts-config.xml <action path="/sampleAction" name="combForm" type="a.b.c.d.action.SampleAction" scope="request"> <forward name="page_one" path="/xforms-jsp/PageOne.jsp"/> <forward name="page_two" path="/xforms-jsp/PageTwo.jsp"/> </action> In PageOne.jsp : <xforms:model id="StudentModel"> <xforms:instance id="StudentInstance"> <Students xmlns="" ><Student> <name/> <age/></Student> <Students> </xforms:instance> <xforms:submission action="../sampleAction.do" id="load" method="post" ref="instance('StudentInstance')" replace="instance" instance="CombineSpecificationInstance" serialization="none" /> </xforms:model> <xforms:trigger> <xforms:label>Import</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:send submission="load"></xforms:send> </xforms:action> </xforms:trigger>
Please note that I have enough fields to display the above instancein jsp. I send the request from PageOne.jsp, if the action forwards to the PageOne.jsp again. I AM GETTING THE XFORMS OUTPUT PROPERLY. PROBLEM : I send the request from PageOne.jsp, if the action forwards to the PageTwo.jsp. Im getting the PageOne.jsp again after submission. I tried the following submissions : (IF THE METHOD IS "GET", ITS FORWARDING TO PageTwo.jsp BUT I CAN SEE ONLY CONTROLS, NOT VALUES BOUND TO THAT CONTROLS, IF IT IS "POST", IT COMES BACK TO THE SAME PAGE AGAIN (PageOne.jsp) ) 1. <xforms:submission action="sampleAction.do" id="load" method="get" ref="instance('StudentInstance')" replace="all"/> 2. <xforms:submission action="sampleAction.do" id="load" method="get" serialization="none" /> 3. <xforms:submission action="sampleAction.do" id="load" method="post" ref="instance('StudentInstance')" replace="none"/> 4. <xforms:submission action="sampleAction.do" id="load" method="post" ref="instance('StudentInstance')" replace="all"/> And also i tried writing the xml to OutputStream from jsp, still getting the same problem. Please correct me if I am mistaken. Your help in this regard would be so much worth while for me. Thanks in Advance, DhanaSekar.T
-- 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
|
It has been a while since I last worked with Struts, so bear with me
on this one. Isn't your code in SampleAction supposed to do a return mapping.findForward("page_one") or return mapping.findForward("page_two") instead of return mapping.findForward("done")? Alex On Mon, Jun 30, 2008 at 1:07 PM, Dhanasekar T <[hidden email]> wrote: > Hi, > > I have integrated the orbeon with struts as a separate application > following the steps given in :"Using the Orbeon Forms XForms Engine with > Java Applications" in www.orbeon.com > > I am able to run the application sucessfully. > > > > 1. I have the filter mapping in web.xml as, > > > > <filter> > > s-filter</filter-name> > > > <filter-class>org.orbeon.oxf.servlet.OPSXFormsFilter</filter-class> > > <init-param> > > <param-name>oxf.xforms.renderer.context</param-name> > > <param-value>/orbeon</param-value> > > </init-param> > > </filter> > > <filter-mapping> > > <filter-name>ops-xforms-filter</filter-name> > > <url-pattern>*.jsp</url-pattern> > > </filter-mapping> > > <filter-mapping> > > <filter-name>ops-xforms-filter</filter-name> > > <url-pattern>*.do</url-pattern> > > </filter-mapping> > > <filter-mapping> > > <filter-name>ops-xforms-filter</filter-name> > > <url-pattern>/orbeon/*</url-pattern> > > </filter-mapping> > > 2. In my struts action class SampleAction, > > String str = "<Students > xmlns=""><Student><name>sathish</name><age>23</age></Student></Students>"; > response.setContentType("application/xml"); > > ServletOutputStream is = response.getOutputStream(); > > is.write(combineSpec.getBytes()); > > // is.flush(); > > return mapping.findForward("done"); > > > > please note that i didnt flush the stream. > > > > Scnario 1 : > > When I submit the xform to the above action, if the > action forwards to the same xform from which the request has been sent, I > got the perfect orbeon xform output. > > for example : In struts-config.xml > > <action path="/sampleAction" name="combForm" > type="a.b.c.d.action.SampleAction" scope="request"> > > <forward name="page_one" > path="/xforms-jsp/PageOne.jsp"/> > > <forward name="page_two" > path="/xforms-jsp/PageTwo.jsp"/> > > </action> > > In PageOne.jsp : > > <xforms:model id="StudentModel"> > > <xforms:instance id="StudentInstance"> > > <Students xmlns="" > > > <Student> > > <name/> > > <age/> > > </Student> > > <Students> > > </xforms:instance> > > <xforms:submission action="../sampleAction.do" > id="load" method="post" ref="instance('StudentInstance')" > replace="instance" > instance="CombineSpecificationInstance" serialization="none" /> > > </xforms:model> > > <xforms:trigger> > > <xforms:label>Import</xforms:label> > > <xforms:action ev:event="DOMActivate"> > > <xforms:send submission="load"></xforms:send> > > </xforms:action> > > </xforms:trigger> > > > > Please note that I have enough fields to display the above instancein jsp. I > send the request from PageOne.jsp, if the action forwards to > the PageOne.jsp again. I AM GETTING THE XFORMS OUTPUT PROPERLY. > > PROBLEM : > > I send the request from PageOne.jsp, if the action forwards to > the PageTwo.jsp. Im getting the PageOne.jsp again after submission. > > I tried the following submissions : (IF THE METHOD IS "GET", ITS > FORWARDING TO PageTwo.jsp BUT I CAN SEE ONLY CONTROLS, NOT VALUES BOUND TO > THAT CONTROLS, IF IT IS "POST", IT COMES BACK TO THE SAME PAGE AGAIN > (PageOne.jsp) ) > > 1. <xforms:submission action="sampleAction.do" id="load" > method="get" ref="instance('StudentInstance')" replace="all"/> > > 2. <xforms:submission action="sampleAction.do" id="load" > method="get" serialization="none" /> > > 3. <xforms:submission action="sampleAction.do" id="load" > method="post" ref="instance('StudentInstance')" replace="none"/> > > 4. <xforms:submission action="sampleAction.do" id="load" > method="post" ref="instance('StudentInstance')" replace="all"/> > > And also i tried writing the xml to OutputStream from jsp, still getting the > same problem. > > Please correct me if I am mistaken. > > Your help in this regard would be so much worth while for me. > > Thanks in Advance, > > DhanaSekar.T > > > > > > > > > > > > > > > > > > > -- > 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 > > -- 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 |
Hi
Alex,
Sorry i typed mistakenly,it should be mapping.findForward("page_two"). Do u have solution for this problem? Regards, Dhanasekar.T On Wed, Jul 2, 2008 at 7:54 AM, Alessandro Vernet <[hidden email]> wrote: It has been a while since I last worked with Struts, so bear with me -- 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
|
On Wed, Jul 2, 2008 at 5:47 AM, Dhanasekar T
<[hidden email]> wrote: > Sorry i typed mistakenly,it should be mapping.findForward("page_two"). > Do u have solution for this problem? Your previous message from Jul 2nd fell through the cracks. Sorry about that. Have you found a solution to this problem since then? 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 |