XForms in a portlet

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

XForms in a portlet

María Gil
Hello,

I am trying to integrate Orbeon Forms with a portlet in Liferay. I am using this guide, but I am having problems. Has anyone had success with this??


First of all, I've deployed orbeon.war in the server's deploy folder.

Then I try to create a portlet, but when I try to configure web.xml or portlet.xml, I have problems with orbeon-trampoline-servlet. Where is it supposed to be? Do I have to create one?

I just want a portlet where I can see my XForms...

Thanks in advance.

Regards,

María.


--
María Gil
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



--
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 in a portlet

Erik Bruchez
Administrator
The trampoline servlet is part of orbeon-xforms-filter.jar, which needs to be in your portlet application. You don't need to create your own servlet. But you need to make sure that the entries in portlet.xml and web.xml documented on that page are present in your portlet app.

Also, you need  a recent build for this to work, as this is not a feature of version 3.8.0.

-Erik

2010/10/25 María Gil <[hidden email]>
Hello,

I am trying to integrate Orbeon Forms with a portlet in Liferay. I am using this guide, but I am having problems. Has anyone had success with this??


First of all, I've deployed orbeon.war in the server's deploy folder.

Then I try to create a portlet, but when I try to configure web.xml or portlet.xml, I have problems with orbeon-trampoline-servlet. Where is it supposed to be? Do I have to create one?

I just want a portlet where I can see my XForms...

Thanks in advance.

Regards,

María.


--
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



--
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 in a portlet

María Gil
Thanks, Erik.

I am using a nightly build (yesterday's, I think). I have deployed it in /jboss-home/server/default/deploy. I've tested Orbeon Form Builder, and it is working properly (I am able to create new forms, etc...)

On the other hand, I create a Liferay portlet (with Liferay SDK in Eclipse). I include orbeon-xforms-filter.jar in /lib. I edit portlet.xml, with this:

</portlet>
    <!-- Define the Orbeon portlet XForms filter (for handling XForms within your own portlets) -->
    <filter>
        <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <filter-class>org.orbeon.oxf.portlet.OrbeonPortletXFormsFilter</filter-class>
        <lifecycle>RENDER_PHASE</lifecycle>
        <lifecycle>ACTION_PHASE</lifecycle>
        <lifecycle>RESOURCE_PHASE</lifecycle>
    </filter>

    <!-- Map the Orbeon portlet XForms filter -->
    <filter-mapping>
           <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <portlet-name>hola</portlet-name>
</filter-mapping>
</portlet-app>


I also edit web.xml


<servlet>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <servlet-class>org.orbeon.oxf.portlet.OrbeonTrampolineServlet</servlet-class>
        <init-param>
            <param-name>oxf.xforms.renderer.context</param-name>
            <param-value>/orbeon.war</param-value>
        </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <url-pattern>/xforms-trampoline</url-pattern>
    </servlet-mapping>


Do I need to change /xforms-trampoline/ ??

The third thing I need to do is enabling cross-context. I don't know if its here where I get the error. In Jboss, which is the best way to do so?  I've added

<Context path="/orbeon.war" docBase="orbeon" crossContext="true"/>
<Context path="/liferay.war" docBase="liferay" crossContext="true"/>



in /jboss-home/server/default/deploy/jboss-web.deployer/server.xml
my-app is in this case /liferay.war?

I want to display my form in view.jsp, so here I have my xhtml code, and I would like to see the form in my portlet, but it seems difficult. The only thing I see now, is just a block of words.

Can anyone help? I would be delighted with a bit of help...

Thank you and sorry for all these questions...

Best Regards,

María

El 26/10/10 04:12, Erik Bruchez escribió:
The trampoline servlet is part of orbeon-xforms-filter.jar, which needs to be in your portlet application. You don't need to create your own servlet. But you need to make sure that the entries in portlet.xml and web.xml documented on that page are present in your portlet app.

Also, you need  a recent build for this to work, as this is not a feature of version 3.8.0.

-Erik

2010/10/25 María Gil <[hidden email]>
Hello,

I am trying to integrate Orbeon Forms with a portlet in Liferay. I am using this guide, but I am having problems. Has anyone had success with this??


First of all, I've deployed orbeon.war in the server's deploy folder.

Then I try to create a portlet, but when I try to configure web.xml or portlet.xml, I have problems with orbeon-trampoline-servlet. Where is it supposed to be? Do I have to create one?

I just want a portlet where I can see my XForms...

Thanks in advance.

Regards,

María.


--
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de
                                Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



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



--
María Gil
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



--
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: Re: XForms in a portlet

Stian Sigvartsen
In reply to this post by María Gil
Message
Hi Maria
 
You appear to have an identical setup and are experiencing an identical problem to what I have been attempting to resolve.
 
The reason why you are just getting "a block of words" is because the OrbeonPortletXFormsFilter currently has a bug in it when used in conjunction with .jsp content like you described.
Essentially the filter believes there is no content, so what you're seeing in Liferay is the actual XForms mark-up which the filter should have converted into pure HTML/JavaScript.  (view the Liferay page source to see what I mean)
 
I've been able to work around this by simply not using .JSPs.  Instead I've written my portlet to read in a {someform}.xhtml file and write() this to the Portlet's RenderResponse like this:
 
File includeFile = new File(getPortletContext().getRealPath("/html/orbeontestxformportlet/someform.xhtml"));     
FileReader includeFileReader = new FileReader(includeFile);         
PrintWriter respWriter = renderResponse.getWriter();
int byteInt;
while((byteInt = includeFileReader.read()) != -1) {
 respWriter.write(byteInt);

Hope this is a viable workaround for you too, until the underlying issue with Orbeon is fixed.
This issue was recently documented in the Wiki @ http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets (See "Limitations" section)
 
P.S. If you discover a way of using .JSP output then I'd be very interested in hearing how you did it as this is a long term requirement for me too.
 
- Stian
-----Original Message-----
From: María Gil [mailto:[hidden email]]
Sent: 26 October 2010 15:34
To: [hidden email]
Subject: [ops-users] Re: Re: XForms in a portlet

Thanks, Erik.

I am using a nightly build (yesterday's, I think). I have deployed it in /jboss-home/server/default/deploy. I've tested Orbeon Form Builder, and it is working properly (I am able to create new forms, etc...)

On the other hand, I create a Liferay portlet (with Liferay SDK in Eclipse). I include orbeon-xforms-filter.jar in /lib. I edit portlet.xml, with this:

</portlet>
    <!-- Define the Orbeon portlet XForms filter (for handling XForms within your own portlets) -->
    <filter>
        <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <filter-class>org.orbeon.oxf.portlet.OrbeonPortletXFormsFilter</filter-class>
        <lifecycle>RENDER_PHASE</lifecycle>
        <lifecycle>ACTION_PHASE</lifecycle>
        <lifecycle>RESOURCE_PHASE</lifecycle>
    </filter>

    <!-- Map the Orbeon portlet XForms filter -->
    <filter-mapping>
           <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <portlet-name>hola</portlet-name>
</filter-mapping>
</portlet-app>


I also edit web.xml


<servlet>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <servlet-class>org.orbeon.oxf.portlet.OrbeonTrampolineServlet</servlet-class>
        <init-param>
            <param-name>oxf.xforms.renderer.context</param-name>
            <param-value>/orbeon.war</param-value>
        </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <url-pattern>/xforms-trampoline</url-pattern>
    </servlet-mapping>


Do I need to change /xforms-trampoline/ ??

The third thing I need to do is enabling cross-context. I don't know if its here where I get the error. In Jboss, which is the best way to do so?  I've added

<Context path="/orbeon.war" docBase="orbeon" crossContext="true"/>
<Context path="/liferay.war" docBase="liferay" crossContext="true"/>



in /jboss-home/server/default/deploy/jboss-web.deployer/server.xml
my-app is in this case /liferay.war?

I want to display my form in view.jsp, so here I have my xhtml code, and I would like to see the form in my portlet, but it seems difficult. The only thing I see now, is just a block of words.

Can anyone help? I would be delighted with a bit of help...

Thank you and sorry for all these questions...

Best Regards,

María


--
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: Re: Re: XForms in a portlet

María Gil
Hello Stian,

Thank you very much for your help.

I will try to make it work with your solution.

So, instead of using view.jsp, I use a .java with this code

File includeFile = new File(getPortletContext().getRealPath("/html/orbeontestxformportlet/someform.xhtml"));    
FileReader includeFileReader = new FileReader(includeFile);        
PrintWriter respWriter = renderResponse.getWriter();
int byteInt;
while((byteInt = includeFileReader.read()) != -1) {
 respWriter.write(byteInt);


If I have doubts , I would really appreciate if you could help me. I'll let you know.
 
And of course, if I find a solution with .JSP, I will inform you.

Thanks very much!

-María

El 26/10/10 16:53, Stian Sigvartsen escribió:
Message
Hi Maria
 
You appear to have an identical setup and are experiencing an identical problem to what I have been attempting to resolve.
 
The reason why you are just getting "a block of words" is because the OrbeonPortletXFormsFilter currently has a bug in it when used in conjunction with .jsp content like you described.
Essentially the filter believes there is no content, so what you're seeing in Liferay is the actual XForms mark-up which the filter should have converted into pure HTML/JavaScript.  (view the Liferay page source to see what I mean)
 
I've been able to work around this by simply not using .JSPs.  Instead I've written my portlet to read in a {someform}.xhtml file and write() this to the Portlet's RenderResponse like this:
 
File includeFile = new File(getPortletContext().getRealPath("/html/orbeontestxformportlet/someform.xhtml"));     
FileReader includeFileReader = new FileReader(includeFile);         
PrintWriter respWriter = renderResponse.getWriter();
int byteInt;
while((byteInt = includeFileReader.read()) != -1) {
 respWriter.write(byteInt);

Hope this is a viable workaround for you too, until the underlying issue with Orbeon is fixed.
This issue was recently documented in the Wiki @ http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets (See "Limitations" section)
 
P.S. If you discover a way of using .JSP output then I'd be very interested in hearing how you did it as this is a long term requirement for me too.
 
- Stian
-----Original Message-----
From: María Gil [[hidden email]]
Sent: 26 October 2010 15:34
To: [hidden email]
Subject: [ops-users] Re: Re: XForms in a portlet

Thanks, Erik.

I am using a nightly build (yesterday's, I think). I have deployed it in /jboss-home/server/default/deploy. I've tested Orbeon Form Builder, and it is working properly (I am able to create new forms, etc...)

On the other hand, I create a Liferay portlet (with Liferay SDK in Eclipse). I include orbeon-xforms-filter.jar in /lib. I edit portlet.xml, with this:

</portlet>
    <!-- Define the Orbeon portlet XForms filter (for handling XForms within your own portlets) -->
    <filter>
        <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <filter-class>org.orbeon.oxf.portlet.OrbeonPortletXFormsFilter</filter-class>
        <lifecycle>RENDER_PHASE</lifecycle>
        <lifecycle>ACTION_PHASE</lifecycle>
        <lifecycle>RESOURCE_PHASE</lifecycle>
    </filter>

    <!-- Map the Orbeon portlet XForms filter -->
    <filter-mapping>
           <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <portlet-name>hola</portlet-name>
</filter-mapping>
</portlet-app>


I also edit web.xml


<servlet>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <servlet-class>org.orbeon.oxf.portlet.OrbeonTrampolineServlet</servlet-class>
        <init-param>
            <param-name>oxf.xforms.renderer.context</param-name>
            <param-value>/orbeon.war</param-value>
        </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <url-pattern>/xforms-trampoline</url-pattern>
    </servlet-mapping>


Do I need to change /xforms-trampoline/ ??

The third thing I need to do is enabling cross-context. I don't know if its here where I get the error. In Jboss, which is the best way to do so?  I've added

<Context path="/orbeon.war" docBase="orbeon" crossContext="true"/>
<Context path="/liferay.war" docBase="liferay" crossContext="true"/>



in /jboss-home/server/default/deploy/jboss-web.deployer/server.xml
my-app is in this case /liferay.war?

I want to display my form in view.jsp, so here I have my xhtml code, and I would like to see the form in my portlet, but it seems difficult. The only thing I see now, is just a block of words.

Can anyone help? I would be delighted with a bit of help...

Thank you and sorry for all these questions...

Best Regards,

María

--
María Gil
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



--
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: Re: Re: XForms in a portlet

María Gil
In reply to this post by Stian Sigvartsen
Hi,

I have been trying to  Orbeon with one portlet in liferay.

Does anyone know which is the cause of the problem I am having?

I have been following this guide: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets

After following all these steps, I got a block of words in my portlet. Thanks to Stian, I found out that, the problem was that I was using .jsps, and there are some limitations with that.

But now, after doing some changes, I get this error, and when I deploy my portlet in liferay, it says: OrbeonTestXFormPortlet is temporarily unavailable.

I get this error:

INFO: Server startup in 99515 ms
09:33:17,075 ERROR [PortletRequestDispatcherImpl:93] javax.servlet.ServletException: Can't find Orbeon Forms context called '/orbeon'. Check the 'oxf.xforms.renderer.context' filter initialization parameter and the <Context crossContext="true"/> attribute.
javax.servlet.ServletException: Can't find Orbeon Forms context called '/orbeon'. Check the 'oxf.xforms.renderer.context' filter initialization parameter and the <Context crossContext="true"/> attribute.
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.getOrbeonContext(OrbeonTrampolineServlet.java:55)
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.getOrbeonDispatcher(OrbeonTrampolineServlet.java:45)
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.service(OrbeonTrampolineServlet.java:41)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
....


I know (I believe) that there must be a problem with crossContext, but I can't find it.
in server.xml :

   <Host appBase="webapps" autoDeploy="true" deployXML="false" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">

      <Context path="/orbeon" docBase="orbeon" crossContext="true"/>
      <Context path="/ROOT" docBase="ROOT" crossContext="true"/>

   </Host>


(ROOT is where liferay is placed, do I need to put  ROOT or the name of my portlet?)

I change that in server.xml, and every time I start my server it is remove...

I don't know what is my problem... can anyone help???

Thanks so much.

Regards,

María


El 26/10/10 16:53, Stian Sigvartsen escribió:
Message
Hi Maria
 
You appear to have an identical setup and are experiencing an identical problem to what I have been attempting to resolve.
 
The reason why you are just getting "a block of words" is because the OrbeonPortletXFormsFilter currently has a bug in it when used in conjunction with .jsp content like you described.
Essentially the filter believes there is no content, so what you're seeing in Liferay is the actual XForms mark-up which the filter should have converted into pure HTML/JavaScript.  (view the Liferay page source to see what I mean)
 
I've been able to work around this by simply not using .JSPs.  Instead I've written my portlet to read in a {someform}.xhtml file and write() this to the Portlet's RenderResponse like this:
 
File includeFile = new File(getPortletContext().getRealPath("/html/orbeontestxformportlet/someform.xhtml"));     
FileReader includeFileReader = new FileReader(includeFile);         
PrintWriter respWriter = renderResponse.getWriter();
int byteInt;
while((byteInt = includeFileReader.read()) != -1) {
 respWriter.write(byteInt);

Hope this is a viable workaround for you too, until the underlying issue with Orbeon is fixed.
This issue was recently documented in the Wiki @ http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets (See "Limitations" section)
 
P.S. If you discover a way of using .JSP output then I'd be very interested in hearing how you did it as this is a long term requirement for me too.
 
- Stian
-----Original Message-----
From: María Gil [[hidden email]]
Sent: 26 October 2010 15:34
To: [hidden email]
Subject: [ops-users] Re: Re: XForms in a portlet

Thanks, Erik.

I am using a nightly build (yesterday's, I think). I have deployed it in /jboss-home/server/default/deploy. I've tested Orbeon Form Builder, and it is working properly (I am able to create new forms, etc...)

On the other hand, I create a Liferay portlet (with Liferay SDK in Eclipse). I include orbeon-xforms-filter.jar in /lib. I edit portlet.xml, with this:

</portlet>
    <!-- Define the Orbeon portlet XForms filter (for handling XForms within your own portlets) -->
    <filter>
        <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <filter-class>org.orbeon.oxf.portlet.OrbeonPortletXFormsFilter</filter-class>
        <lifecycle>RENDER_PHASE</lifecycle>
        <lifecycle>ACTION_PHASE</lifecycle>
        <lifecycle>RESOURCE_PHASE</lifecycle>
    </filter>

    <!-- Map the Orbeon portlet XForms filter -->
    <filter-mapping>
           <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
        <portlet-name>hola</portlet-name>
</filter-mapping>
</portlet-app>


I also edit web.xml


<servlet>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <servlet-class>org.orbeon.oxf.portlet.OrbeonTrampolineServlet</servlet-class>
        <init-param>
            <param-name>oxf.xforms.renderer.context</param-name>
            <param-value>/orbeon.war</param-value>
        </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>orbeon-trampoline-servlet</servlet-name>
        <url-pattern>/xforms-trampoline</url-pattern>
    </servlet-mapping>


Do I need to change /xforms-trampoline/ ??

The third thing I need to do is enabling cross-context. I don't know if its here where I get the error. In Jboss, which is the best way to do so?  I've added

<Context path="/orbeon.war" docBase="orbeon" crossContext="true"/>
<Context path="/liferay.war" docBase="liferay" crossContext="true"/>



in /jboss-home/server/default/deploy/jboss-web.deployer/server.xml
my-app is in this case /liferay.war?

I want to display my form in view.jsp, so here I have my xhtml code, and I would like to see the form in my portlet, but it seems difficult. The only thing I see now, is just a block of words.

Can anyone help? I would be delighted with a bit of help...

Thank you and sorry for all these questions...

Best Regards,

María

--
María Gil
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



--
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: RE: Re: Re: XForms in a portlet

Stian Sigvartsen
In reply to this post by María Gil
Message
Hi Maria
 
I belive Liferay IDE 1.1 creates a context.xml file in the META-INF which contains no mention of crossContext="true".
If I remember correctly (it was a while ago)... I edited this file to contain the following content:
 
<?xml version="1.0" encoding="UTF-8"?>
<Context crossContext="true" path="/DCCOrbeonXFormPortlet-portlet" reloadable="true"/>
 
Basically you need to make sure that Liferay IDE doesn't replace the file without the crossContext attribute set correctly each time you use the "deploy" target of the Liferay IDE generated Ant build file.
 
In additon (maybe duplicating effort), I added two files to the \conf\Catalina\localhost directory within the Tomcat home directory:
 
orbeon.xml :: Containing:  <Context path="/orbeon" crossContext="true"/>
DCCOrbeonXFormPortlet-portlet.xml  :: Containing:  <Context path="/DCCOrbeonXFormPortlet-portlet" crossContext="true"/>
 
These two filenames match the context directory names of each of the web applications.
 
I believe Liferay IDE 1.1 doesn't touch these files, but I may have done something to prevent it touching these through the Eclipse project configuration for the latter.
 
Good luck!
 
- Stian
-----Original Message-----
From: María Gil [mailto:[hidden email]]
Sent: 27 October 2010 11:51
To: [hidden email]
Subject: [ops-users] Re: RE: Re: Re: XForms in a portlet

Hi,

I have been trying to  Orbeon with one portlet in liferay.

Does anyone know which is the cause of the problem I am having?

I have been following this guide: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets

After following all these steps, I got a block of words in my portlet. Thanks to Stian, I found out that, the problem was that I was using .jsps, and there are some limitations with that.

But now, after doing some changes, I get this error, and when I deploy my portlet in liferay, it says: OrbeonTestXFormPortlet is temporarily unavailable.

I get this error:

INFO: Server startup in 99515 ms
09:33:17,075 ERROR [PortletRequestDispatcherImpl:93] javax.servlet.ServletException: Can't find Orbeon Forms context called '/orbeon'. Check the 'oxf.xforms.renderer.context' filter initialization parameter and the <Context crossContext="true"/> attribute.
javax.servlet.ServletException: Can't find Orbeon Forms context called '/orbeon'. Check the 'oxf.xforms.renderer.context' filter initialization parameter and the <Context crossContext="true"/> attribute.
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.getOrbeonContext(OrbeonTrampolineServlet.java:55)
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.getOrbeonDispatcher(OrbeonTrampolineServlet.java:45)
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.service(OrbeonTrampolineServlet.java:41)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
....


I know (I believe) that there must be a problem with crossContext, but I can't find it.
in server.xml :

   <Host appBase="webapps" autoDeploy="true" deployXML="false" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">

      <Context path="/orbeon" docBase="orbeon" crossContext="true"/>
      <Context path="/ROOT" docBase="ROOT" crossContext="true"/>

   </Host>


(ROOT is where liferay is placed, do I need to put  ROOT or the name of my portlet?)

I change that in server.xml, and every time I start my server it is remove...

I don't know what is my problem... can anyone help???

Thanks so much.

Regards,

María

 



--
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: Re: RE: Re: Re: XForms in a portlet

María Gil
Hello Stian,

This is correct, every time I autodeploy de portlet, there is a context.xml in META-INF, but I can't change it, it changes everytime I change something in Eclipse.
I belive Liferay IDE 1.1 creates a context.xml file in the META-INF which contains no mention of crossContext="true".
If I remember correctly (it was a while ago)... I edited this file to contain the following content:
 
<?xml version="1.0" encoding="UTF-8"?>
<Context crossContext="true" path="/DCCOrbeonXFormPortlet-portlet" reloadable="true"/>
 
How can I do that??

Basically you need to make sure that Liferay IDE doesn't replace the file without the crossContext attribute set correctly each time you use the "deploy" target of the Liferay IDE generated Ant build file.
 
In additon (maybe duplicating effort), I added two files to the \conf\Catalina\localhost directory within the Tomcat home directory:
 
orbeon.xml :: Containing:  <Context path="/orbeon" crossContext="true"/>
DCCOrbeonXFormPortlet-portlet.xml  :: Containing:  <Context path="/DCCOrbeonXFormPortlet-portlet" crossContext="true"/>
 
These two filenames match the context directory names of each of the web applications.
 
I believe Liferay IDE 1.1 doesn't touch these files, but I may have done something to prevent it touching these through the Eclipse project configuration for the latter.
 
I am trying to solve it...

Thanks,

Maria

El 27/10/10 14:11, Stian Sigvartsen escribió:
Message
Hi Maria
 
I belive Liferay IDE 1.1 creates a context.xml file in the META-INF which contains no mention of crossContext="true".
If I remember correctly (it was a while ago)... I edited this file to contain the following content:
 
<?xml version="1.0" encoding="UTF-8"?>
<Context crossContext="true" path="/DCCOrbeonXFormPortlet-portlet" reloadable="true"/>
 
Basically you need to make sure that Liferay IDE doesn't replace the file without the crossContext attribute set correctly each time you use the "deploy" target of the Liferay IDE generated Ant build file.
 
In additon (maybe duplicating effort), I added two files to the \conf\Catalina\localhost directory within the Tomcat home directory:
 
orbeon.xml :: Containing:  <Context path="/orbeon" crossContext="true"/>
DCCOrbeonXFormPortlet-portlet.xml  :: Containing:  <Context path="/DCCOrbeonXFormPortlet-portlet" crossContext="true"/>
 
These two filenames match the context directory names of each of the web applications.
 
I believe Liferay IDE 1.1 doesn't touch these files, but I may have done something to prevent it touching these through the Eclipse project configuration for the latter.
 
Good luck!
 
- Stian
-----Original Message-----
From: María Gil [[hidden email]]
Sent: 27 October 2010 11:51
To: [hidden email]
Subject: [ops-users] Re: RE: Re: Re: XForms in a portlet

Hi,

I have been trying to  Orbeon with one portlet in liferay.

Does anyone know which is the cause of the problem I am having?

I have been following this guide: http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets

After following all these steps, I got a block of words in my portlet. Thanks to Stian, I found out that, the problem was that I was using .jsps, and there are some limitations with that.

But now, after doing some changes, I get this error, and when I deploy my portlet in liferay, it says: OrbeonTestXFormPortlet is temporarily unavailable.

I get this error:

INFO: Server startup in 99515 ms
09:33:17,075 ERROR [PortletRequestDispatcherImpl:93] javax.servlet.ServletException: Can't find Orbeon Forms context called '/orbeon'. Check the 'oxf.xforms.renderer.context' filter initialization parameter and the <Context crossContext="true"/> attribute.
javax.servlet.ServletException: Can't find Orbeon Forms context called '/orbeon'. Check the 'oxf.xforms.renderer.context' filter initialization parameter and the <Context crossContext="true"/> attribute.
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.getOrbeonContext(OrbeonTrampolineServlet.java:55)
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.getOrbeonDispatcher(OrbeonTrampolineServlet.java:45)
    at org.orbeon.oxf.portlet.OrbeonTrampolineServlet.service(OrbeonTrampolineServlet.java:41)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
....


I know (I believe) that there must be a problem with crossContext, but I can't find it.
in server.xml :

   <Host appBase="webapps" autoDeploy="true" deployXML="false" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">

      <Context path="/orbeon" docBase="orbeon" crossContext="true"/>
      <Context path="/ROOT" docBase="ROOT" crossContext="true"/>

   </Host>


(ROOT is where liferay is placed, do I need to put  ROOT or the name of my portlet?)

I change that in server.xml, and every time I start my server it is remove...

I don't know what is my problem... can anyone help???

Thanks so much.

Regards,

María

 


--
María Gil
MARÍA GIL
R&D Engineer
T: +34 94 641 60 66
M: +34 672 263 122
F: +34 94 431 82 86
[hidden email]
www.andago.com

Síguenos en:
Twitter - Facebook - LinkedIn - YouTube


ÁNDAGO INGENIERÍA
Álcalde Ángel Arroyo, 10, 1º
28904, Getafe, Madrid (Spain)

ÁNDAGO LABS
Bizkaia Technology Park
Kanala Bidea, Edif-103, 1º izq.
E-48170, Zamudio, Bizkaia (Spain)


logotipo de Andago

ÁNDAGO INTERAMÉRICAS
Ciudad del Saber
Edificio 223, 3ºA.
Ciudad de Panamá (Panamá)
Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestra mano.
Consider the environment before printing this mail.

AVISO LEGAL


ANDAGO CONSULTING SL / ANDAGO INGENIERÍA, SL le informa que los datos facilitados por Ud. y utilizados para el envío de esta comunicación serán objeto de tratamiento automatizado o no en nuestros ficheros, con la finalidad de gestionar la agenda de contactos de nuestra empresa y para el envío de comunicaciones profesionales por cualquier medio electrónico o no. Vd. podrá en cualquier momento ejercer el derecho de acceso, rectificación, cancelación y oposición en los términos establecidos en la Ley Orgánica 15/1999. El responsable del tratamiento es ANDAGO CONSULTING SL / ANDAGO INGENIERIA SL, con domicilio en C/ ALCALDE ANGEL ARROYO, 10, 28904, Getafe (Madrid).

El contenido de esta comunicación, así como el de toda la documentación anexa, es confidencial y va dirigido únicamente al destinatario del mismo. En el supuesto de que usted no fuera el destinatario, le solicitamos que nos lo indique y no comunique su contenido a terceros, procediendo a su destrucción.

DISCLAIMER


The content of this communication and any attached information is confidential and exclusively for the use of the addressee. If you are not the addressee, we ask you to notify to the sender and do not pass its content to another person, and please be sure you destroy it.



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