Re: RE: Re: RE: Re: Separate portlet app deploy. OrbeonPortletXFormFilter getContent() ()

Posted by Erik Bruchez on
URL: https://discuss.orbeon.com/Separate-portlet-app-deploy-OrbeonPortletXFormFilter-getContent-tp2955736p2994717.html

Stian,

Great to hear you have made progress! I voted on the Liferay post,
although it probably makes no difference.

The JavaScript-free mode is called "Noscript mode". It is not
automatically enabled based on what's in the browser: you have to
enable it with xxforms:noscript="true" on your XForms model.

Note that this feature only works in Orbeon Forms PE as of 3.8.

Form Runner supports this too and presents an "Accessible Version"
link at the top of forms so you can switch to that version.

-Erik

On Wed, Oct 13, 2010 at 11:12 AM, Stian Sigvartsen
<[hidden email]> wrote:

> Hi Eric
>
> I'm still experiencing issues with this unfortunately.  Liferay throws exceptions when it tries to get my wrapped RenderResponse object which I've been using to attempt to work out which of the methods are called from the .jsp when it writes its output.  I reported this on the Liferay forum earlier:  http://www.liferay.com/community/forums/-/message_boards/message/6143020
>
> After much frustration, I decided today park this for a while, and attempt to approach this problem differently by eliminating the .jsp from the equation.  I appear to have had some success!
>
> It's basically using the workaround you put on the wiki page.  Instead of including a .jsp, I stored xForm markup to a file (copy of view.xhtml from the "xforms-hello" example that ships with Orbeon) and simply read this file and wrote the bytes to the RenderResponse of my portlet doView() method.
>
> So now it looks like it's working ok in Liferay.  Even the AJAX requests are going through Liferay which I thought was impressing.  I'm hoping that certain <xforms:submission/> will call through to the doAction() method of my portlet, which in my mind makes this a workable solution.
> Obviously not an ideal approach because you cannot use .jsp tags to create dynamic content amongst the xForms markup.
>
> Are you aware of any other issues I am likely to face if I proceed with this approach?
>
> One thing which is a requirement for me is to be able to have my portlet function without javascript support (accessibility requirement).  I was hoping it would fall back to a non-AJAX approach when no JavaScript is detected.  This doesn't appear to be the case and rather a message is simply put up saying you need JavaScript support.  Can this be configured through the TrampolineServlet maybe?
>
> Stian
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: 11 October 2010 02:54
> To: [hidden email]
> Subject: [ops-users] Re: RE: Re: Separate portlet app deploy. OrbeonPortletXFormFilter getContent() ()
>
>
> Stian,
>
>> It certainly sounds like we're experiencing the same problem.
>> And it's a very generic problem so will need to be fixed if this new Orbeon use case will be of any use to anyone...
>
> It is still useful if you don't use JSP. Of course I agree that it's a
> drag that it doesn't work with JSP. I updated the wiki page to mention
> this limitation:
>
> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deployment-with-portlets#TOC-Limitations
>
>> I'm going to have a look into what methods on ServletResponse object the servlet code generated for a .jsp makes reference to.
>> I'm hoping that all that is needed is to override some more methods.  Do you concur?
>
> I am not sure: either that, or it's a hopeless Liferay bug!
>
>> This is of course unless there is some kind of serialisation to HTTP + deserialisation from HTTP (on the localhost) happening when you use the request dispatcher to forward/include the .jsp in a servlet.  This seems unlikely to be the case, but if it was then of course no ServletResponse wrapper pattern would ever work for this.
>>
>> P.S. I suspect you will not get much response to your forum topic on the Liferay site because this is really a generic portlet filter issue.
>
> Definitely keep us posted if you find anything!
>
> -Erik
>
>>
>> Stian Sigvartsen
>>
>>
>> -----Original Message-----
>> From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
>> Sent: 08 October 2010 04:30
>> To: [hidden email]
>> Subject: [ops-users] Re: Separate portlet app deploy. OrbeonPortletXFormFilter getContent() ()
>>
>>
>> Stian,
>>
>> You might be hitting this issue I reported on the Liferay forums
>> (assuming you are using Liferay):
>>
>> http://www.liferay.com/community/forums/-/message_boards/message/5682233
>>
>> I seems to me that this is a bug of the portlet implementation,
>> whereby the filter does not obtain the content of the filtered
>> resource. But I could be wrong!
>>
>> (The separate deployment with portlets is very new, and the use case
>> it was developed for does not produce content with JSP.)
>>
>> -Erik
>>
>> On Tue, Oct 5, 2010 at 3:19 AM, Stian Sigvartsen
>> <[hidden email]> wrote:
>>> Hi
>>>
>>> I've been trying to the separate portlet app deployment method to work
>>> (http://wiki.orbeon.com/forms/doc/developer-guide/xforms-separate-deploy
>>> ment-with-portlets).
>>>
>>> However, when the OrbeonPortletXFormsFilter processes the response from
>>> my .jsp, it doesn't appear to find any content.  This is reflected by
>>> responseWrapper.getContent() returning null or empty string (I used
>>> Eclipse debugger to determine this is the issue).
>>>
>>> The code snippet which evaluates this from
>>> OrbeonPortletXFormsFilter.doFilter() is:
>>>
>>>        // Set document if not present AND output was intercepted
>>>        final boolean isEmptyContent;
>>>        if
>>> (renderRequest.getAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBU
>>> TE_NAME) == null) {
>>>            final String content = responseWrapper.getContent();
>>>            if (content != null) {
>>>
>>> renderRequest.setAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBUT
>>> E_NAME, content);
>>>            }
>>>            isEmptyContent = OrbeonXFormsFilter.isBlank(content);
>>>        } else {
>>>            // Assume content is not blank
>>>            isEmptyContent = false;
>>>        }
>>>
>>> After this code runs, isEmptyContent is set to false and hence the
>>> OrbeonTrampolineServlet is never used to replace xforms markup with
>>> HTML.
>>>
>>> Has anyone encountered this problem before?
>>>
>>> I'm using an Orbeon xforms nightly build from the end of August.
>>>
>>> I've spent a lot of time researching this issue with no luck.  I
>>> encountered a forum post describing the same problem, but no solution
>>> was posted
>>> (http://orbeon-forms-ops-users.24843.n4.nabble.com/OrbeonXFormsFilter-ne
>>> ver-forwards-to-Orbeon-td931256.html).
>>> I would really appreciate any help anyone can offer.
>>>
>>> Kind regards,
>>> Stian Sigvartsen
>>>
>>>
>>> --
>>> 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
>
>


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