Mobile xforms (Javascript free)

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

Mobile xforms (Javascript free)

Andrew Bailey
Hi,

I saw that there are plans to write a version of orbeon that doesnt
use javascript.
Is this true, if so is there any release date scheduled?
What needs to be done?
How complex is it?
Maybe we can help out with the development.

I am really interested to use orbeon for mobile application development.

Also does anyone have experience with yahoo go - blueprint?
As I understand there is no data binding yet.

Andy Bailey
http://www.hazlorealidad.com


--
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: Mobile xforms (Javascript free)

Erik Bruchez
Administrator
The code is already in. Working pretty well already, and integrated  
with Form Runner.

Some developer documentation:

   http://wiki.orbeon.com/forms/developer-documentation/noscript-mode

-Erik

On Aug 3, 2008, at 8:43 PM, Andrew Bailey wrote:

> Hi,
>
> I saw that there are plans to write a version of orbeon that doesnt
> use javascript.
> Is this true, if so is there any release date scheduled?
> What needs to be done?
> How complex is it?
> Maybe we can help out with the development.
>
> I am really interested to use orbeon for mobile application  
> development.
>
> Also does anyone have experience with yahoo go - blueprint?
> As I understand there is no data binding yet.
>
> Andy Bailey
> http://www.hazlorealidad.com
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: Mobile xforms (Javascript free)

Andrew Bailey
Erik,

> The code is already in. Working pretty well already, and integrated with
> Form Runner.
Thanks thats great news.

In the page http://wiki.orbeon.com/forms/developer-documentation/noscript-mode

It says
#  Enabling noscript mode:

    * Form author-based property
    * Option for automatic detection of JavaScript on the client [TODO]
Posts to /xforms-server-submit are detected with a hidden form field
called $noscript set to true

Would this not be possible to do by sending the page with the form
controls set up as if it were to run in noscript mode
and then change the value of the hidden field in javascript

Mode is enabled with xxforms:noscript="true" property, either global
or per page

Andy Bailey
http://www.hazlorealidad.com


--
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: Mobile xforms (Javascript free)

Andrew Bailey
Oops I accidentally sent the mail before I had finished it.

What I wanted to add is that it would be great if you didnt have to
add anything to get the noscript functionality to work, that it just
automatically kicked in. I imagine something like this, the same page
gets sent to the client whether or not they have javascript,
there is an onload handler that checks if the javascript
implementation present supports xforms, I imagine that if there is
javascript on a mobile device that it may not have all the capabilites
necessary, and if so changes the value of the hidden form fields to a
different value so that the server knows. Is this possible? That would
just be so cool.

By the way, maybe Im asking too much, but what about a cookie free
xforms implementation? Is this possible. Its not so important but that
would really give xforms an edge on other technologies, automatically
supporting javascriptless and cookie free environments wow!

(Sorry about the double posting)

Andy Bailey
http://www.hazlorealidad.com


--
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: Mobile xforms (Javascript free)

Erik Bruchez
Administrator
> What I wanted to add is that it would be great if you didnt have to
> add anything to get the noscript functionality to work, that it just
> automatically kicked in. I imagine something like this, the same page
> gets sent to the client whether or not they have javascript,
> there is an onload handler that checks if the javascript
> implementation present supports xforms, I imagine that if there is
> javascript on a mobile device that it may not have all the capabilites
> necessary, and if so changes the value of the hidden form fields to a
> different value so that the server knows. Is this possible? That would
> just be so cool.

It may be possible, at least to a certain extent, and I can see how it  
would be very cool, but it is not done this way now.

Forms are handled a little differently in noscript mode:

* The full XHTML+XForms content is kept on the server, which is not  
the case of the JavaScript mode. In case your client supports  
JavaScript, then you would be keeping that information for nothing.

* Client-side repeat templates are not added to the XHTML in noscript  
mode.

* Triggers as links (appearance="minimal") can't work without script,  
so they are output differently in the two modes ("fake" links in  
noscript mode).

So solutions would have to be found for all the above issues.

I don't think we will do this right now as we have lots of things to  
deal with, but I am putting those notes on our wiki:

   http://wiki.orbeon.com/forms/developer-documentation/noscript-mode

In the meanwhile, you can do user agent-sniffing. It is not great, but  
it will work in many situations.

> By the way, maybe Im asking too much, but what about a cookie free
> xforms implementation? Is this possible. Its not so important but that
> would really give xforms an edge on other technologies, automatically
> supporting javascriptless and cookie free environments wow!

You need a way to implement session handling. This could be done with  
URL rewriting. It is certainly doable in theory, but we don't plan to  
work on this at the moment. If there is any taker...

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: Mobile xforms (Javascript free)

Andrew Bailey
Erik,

Thanks for the prompt reply

> Forms are handled a little differently in noscript mode:
>
> * The full XHTML+XForms content is kept on the server, which is not the case
> of the JavaScript mode. In case your client supports JavaScript, then you
> would be keeping that information for nothing.

Thats true but only for the first page until you determine if the
client has javascript or not, then store that value in the users
session.
We could assume that the user wont change the options of javascript in
his session, or configure a warning message
If the user disables javascript in the session
if (session.javascript==true)<noscript>You appear to have just
disabled javascript. The current form submission will not work.
...</noscript>
and then detect that the javascript is now disabled change the session
variable to false and then create the xforms server side content.
If the user has just enabled javascript then I imagine that its
easier, just ignore the noscript server side state and set the session
variable.

I think that you could avoid the overhead when it is not needed.

> * Client-side repeat templates are not added to the XHTML in noscript mode.

Is that not the same case as the last one, ie send them on the first
form and dont send them after that.

The logic as I see it would be

If the session.javascript property is true or no session.javascript
property exists then
send client side repeat templates

If the session.javascript property is false or no session.javascript
property exists then
store server side xfoms data

detect on every page request if javascript is enabled/disabled and
change the value of the session.javascript variable

> * Triggers as links (appearance="minimal") can't work without script, so
> they are output differently in the two modes ("fake" links in noscript
> mode).
Im not sure what the problem is
I imagine that you know the styling can be done in css
<html>
<head>
<style>
input.minimal {background:transparent; border: 0px; color:blue;
font-family:serif; text-decoration: underline; font-size:110%;}
input.minimal:hover {color:purple; }
</style>
</head>
<body>
<form action="">
<input type="submit" class="minimal" value="Button"/>
</form>
<a href="" >Link</a>
</body>
</html>

and the functionality of the link should be doable having a
redirect/forward from the page that receives the form post.

>
> So solutions would have to be found for all the above issues.
>
> I don't think we will do this right now as we have lots of things to deal
> with, but I am putting those notes on our wiki:

Pity, for me it would be a great selling point for orbeon xforms, it
would work for event the 5% of users that have javascript disabled.

> In the meanwhile, you can do user agent-sniffing. It is not great, but it
> will work in many situations.

I imagine putting some javascript on a page before the user gets to
the xform part of the site that changes the value of a link/hidden
form variable.

I dont understand how to set the per page property, can you explain that please?
Can you expand on how to configure the noscript xforms for the clients session.

>> By the way, maybe Im asking too much, but what about a cookie free
>> xforms implementation? Is this possible. Its not so important but that
>> would really give xforms an edge on other technologies, automatically
>> supporting javascriptless and cookie free environments wow!
>
> You need a way to implement session handling. This could be done with URL
> rewriting. It is certainly doable in theory, but we don't plan to work on
> this at the moment. If there is any taker...

hmm Ill think about it

Andy Bailey
http://www.hazlorealidad.com


--
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: Mobile xforms (Javascript free)

Erik Bruchez
Administrator
> Thats true but only for the first page until you determine if the
> client has javascript or not, then store that value in the users
> session.

[...]

> I think that you could avoid the overhead when it is not needed.

Not quite. The static data associated with an XForms page is cacheable  
and reusable between requests from multiple clients. So you would have  
to keep the XHTML around anyway in case there is a client which  
requires noscript.

> Is that not the same case as the last one, ie send them on the first
> form and dont send them after that.

If users mostly use one form, then you would still send the templates.  
But it is probably not a huge deal, as we send them in JavaScript mode.

> m not sure what the problem is
> I imagine that you know the styling can be done in css

[...]

> and the functionality of the link should be doable having a
> redirect/forward from the page that receives the form post.

That's what we do already for noscript mode. But in JavaScript mode,  
you really want an actual link, as link-styled buttons still do not  
quite behave as links.

> Pity, for me it would be a great selling point for orbeon xforms, it
> would work for event the 5% of users that have javascript disabled.

It's just a matter of implementing it. Feel free ;-)

And even now, you can put a link at the top of the page to direct your  
JavaScript-free users to the noscript version of the page.

> I imagine putting some javascript on a page before the user gets to
> the xform part of the site that changes the value of a link/hidden
> form variable.
>
> I dont understand how to set the per page property, can you explain  
> that please?
> Can you expand on how to configure the noscript xforms for the  
> clients session.

<xforms:model xxforms:noscript="true" ...>

If you produce the page using XSLT, as does Form Runner, then you can  
do this based on a URL parameter, etc.

 From XForms, property('xxforms:noscript') returns the value of the  
property.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: Mobile xforms (Javascript free)

Andrew Bailey
Hi Erik et al,

>> and the functionality of the link should be doable having a
>> redirect/forward from the page that receives the form post.
>
> That's what we do already for noscript mode. But in JavaScript mode, you
> really want an actual link, as link-styled buttons still do not quite behave
> as links.

What is the issue?
I thought everything was possible to change using a combination of css
and javascript.

>
>> Pity, for me it would be a great selling point for orbeon xforms, it
>> would work for event the 5% of users that have javascript disabled.
>
> It's just a matter of implementing it. Feel free ;-)

Ok Ill look into it. Can you point us to what files would need to be
changed for
transparent javascript support and also for the URLrewrite no cookie
functionality.

>> Can you expand on how to configure the noscript xforms for the clients
>> session.
>
> <xforms:model xxforms:noscript="true" ...>

Is there any way to do that from an xml submission from the page flow?
I dont create the xforms from xslt at the moment and it might spoil
cacheability.
It would be great if it could be triggered by the xml submission.

Andy Bailey
http://www.hazlorealidad.com


--
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: Mobile xforms (Javascript free)

Erik Bruchez
Administrator
> What is the issue?
> I thought everything was possible to change using a combination of css
> and javascript.

There is no JavaScript in noscript mode ;-)

CSS can make a button look fairly close to a link, but you can still  
tell that it is not a native link.

Try for example the latest Bookcast example in Form Runner, go to the  
Accessible version, and check the language links at the top right  
corner. You will notice for example that they depress a little bit  
when you click on them (Firefox 3). I am not sure that is fixable.

>>> Pity, for me it would be a great selling point for orbeon xforms, it
>>> would work for event the 5% of users that have javascript disabled.
>>
>> It's just a matter of implementing it. Feel free ;-)
>
> Ok Ill look into it. Can you point us to what files would need to be
> changed for
> transparent javascript support and also for the URLrewrite no cookie
> functionality.

Quite a bunch. One way to start would be to check the usages of:

* XFormsProperties.isNoscript()
* HandlerBase.isNoscript

To check for usages is easy with an IDE like IntelliJ.

This will tell you where in the code we check for the noscript mode.

Also, you would need a piece of JavaScript that runs on the client and  
loads the other JavaScript files on-demand when JavaScript is  
encountered.

Regarding cookies, I think in the end everything goes through  
URLRewriter.java. This could possibly be the place where the session  
id URL parameter would be added to the URLs produced.

(The above just on top of my head.)

> Is there any way to do that from an xml submission from the page flow?
> I dont create the xforms from xslt at the moment and it might spoil
> cacheability.
> It would be great if it could be triggered by the xml submission.

You can't do this from a submission at the moment.

Note that Form Runner uses XSLT, yet is cacheable. As long as you only  
depend on certain things, like URL parameters in oxf:request, you  
should be fine.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: Mobile xforms (Javascript free)

Andrew Bailey
HI

I thought everything was possible to change using a combination of css
and javascript.

There is no JavaScript in noscript mode ;-)
Ok ok, I thought you meant the problem was when using javascript :)

CSS can make a button look fairly close to a link, but you can still tell that it is not a native link.

Apart from the fact that you cant use the :visited pseudo class selector and that you cant drag a button
(I dont think either of the two are so important) in firefox 3 I cant tell the difference between the two

Demo:
<html>
<head>
<style>
body { background:antiquewhite; }
form { display:inline; }
input.minimal {display:inline; background:transparent; border: 0px; color:blue; font-family:serif; text-decoration: underline; font-size:12pt;cursor:pointer;}
input.minimal:hover {color:#551a8b; }
/* This doesnt work input.minimal:visited {color:purple; }*/
input.minimal:active {color:red; }
</style>
</head>
<body>
<form action="">
<input type="submit" class="minimal" value="Button"/>
</form>
<a href="">Link</a>
</body>
</html>


I couldnt find the accessible bookcast version that you mentioned.

Quite a bunch. One way to start would be to check the usages of:

* XFormsProperties.isNoscript()
* HandlerBase.isNoscript

To check for usages is easy with an IDE like IntelliJ.
or grep

 grep -R isNoscript java
java/org/orbeon/oxf/xforms/processor/handlers/XHTMLBodyHandler.java:                "class", isNoscript ? "xforms-form xforms-noscript" : "xforms-form",
java/org/orbeon/oxf/xforms/processor/handlers/XHTMLBodyHandler.java:                "onsubmit", isNoscript ? null : "return false",
java/org/orbeon/oxf/xforms/processor/handlers/XHTMLBodyHandler.java:        if (!isNoscript) {
java/org/orbeon/oxf/xforms/processor/handlers/HandlerBase.java:    protected boolean isNoscript;
java/org/orbeon/oxf/xforms/processor/handlers/HandlerBase.java:        isNoscript = XFormsProperties.isNoscript(containingDocument);
java/org/orbeon/oxf/xforms/processor/handlers/XFormsTriggerHandler.java:            if (isNoscript && originalAppearance != null && XFormsConstants.XFORMS_MINIMAL_APPEARANCE_QNAME.equals(originalAppearance))
java/org/orbeon/oxf/xforms/processor/handlers/XFormsTriggerHandler.java:            if (isNoscript) {
java/org/orbeon/oxf/xforms/processor/handlers/XFormsRepeatHandler.java:        if (isMustGenerateTemplate && !isNoscript) {// don't generate templates in noscript mode as they won't be used
java/org/orbeon/oxf/xforms/processor/handlers/XHTMLHeadHandler.java:        if (!isNoscript && !XFormsProperties.isReadonly(containingDocument)) {
java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java:        return isStaticReadonly(xformsControl) || !isFull || !isNoscript;
java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java:                final String elementName = isNoscript ? "fieldset" : "span";
java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java:                    if (isNoscript) {
java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java:                if (!isNoscript) {// don't generate templates in noscript mode as they won't be used
java/org/orbeon/oxf/xforms/processor/XFormsServer.java:                final boolean isNoscript = XFormsProperties.isNoscript(containingDocument);
java/org/orbeon/oxf/xforms/processor/XFormsServer.java:                    if (isNoscript) {
java/org/orbeon/oxf/xforms/processor/XFormsServer.java:                    if (!isNoscript) {
java/org/orbeon/oxf/xforms/XFormsContainingDocument.java:        if (XFormsProperties.isNoscript(this))
java/org/orbeon/oxf/xforms/XFormsProperties.java:    public static boolean isNoscript(XFormsContainingDocument containingDocument) {
java/org/orbeon/oxf/xforms/XFormsModelSubmission.java:                final boolean isNoscript = XFormsProperties.isNoscript(containingDocument);
java/org/orbeon/oxf/xforms/XFormsModelSubmission.java:                final boolean isDeferredSubmission = !isNoscript && isPossibleDeferredSubmission;
java/org/orbeon/oxf/xforms/XFormsModelSubmission.java:                               && !isNoscript // This SHOULD work with isNoscript as well, but it turns out we get exceptions related to content handlers, so disable for now
java/org/orbeon/oxf/xforms/XFormsModelSubmission.java:                                    if (isNoscript && resolvedXXFormsTarget != null) {
java/org/orbeon/oxf/xforms/action/actions/XFormsLoadAction.java:            final boolean generateAbsoluteURL = XFormsProperties.isNoscript(containingDocument);
[andy@mail src]$ grep -R isNoscript java | wc -l
     23    

23 lines, I had a quick look, I think its just a case of changing the ifs but I realised that I would have to understand the whole orbeon architecture in order to change them. Any takers?

Also, you would need a piece of JavaScript that runs on the client and loads the other JavaScript files on-demand when JavaScript is encountered.
 
Wouldnt the normal page orbeon sends be ok with the <script src=""/>
if there is no javascript they just dont get loaded.
 

Regarding cookies, I think in the end everything goes through URLRewriter.java. This could possibly be the place where the session id URL parameter would be added to the URLs produced.

I checked the source and it seems to be a fairly easy change, I was wondering if it could be included in the next release of orbeon. However I havent checked it and didnt look at the logic for
public static String rewriteResourceURL as it already receives the response, I think it should be refactored to only have 1 return and then the encodeURL could be called in one place.

I added this method to URLRewiter (changes are highlighted in the html version of the email)
 /**
     * Rewrite a URL based on the request URL, a URL string, and a rewriting mode.
     *
     * @param request       incoming request
     * @param response       outgoing response
     * @param urlString     URL string to rewrite
     * @param rewriteMode   rewrite mode (see ExternalContext.Response)
     * @return              rewritten URL string
     */   
    public static String rewriteURL(ExternalContext.Request request,ExternalContext.Response response, String urlString, int rewriteMode) {
        String url=rewriteURL(request,urlString,rewriteMode);
        Object nativeResponse=response.getNativeResponse();
        if (nativeResponse instanceof HttpServletResponse)
        {
            HttpServletResponse httpServletResponse=(HttpServletResponse)nativeResponse;
            url=httpServletResponse.encodeURL(url);
        }
        else if (nativeResponse instanceof PortletResponse)
        {
            PortletResponse portletResponse=(PortletResponse)nativeResponse;
            url=portletResponse.encodeURL(url);
        }
        //else return the url unchanged
        
        return url;
    }

changed some methods in ServletExternalContext
public String rewriteActionURL(String urlString) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
        }

        public String rewriteRenderURL(String urlString) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
        }

        public String rewriteActionURL(String urlString, String portletMode, String windowState) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
        }

        public String rewriteRenderURL(String urlString, String portletMode, String windowState) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
        }

        public String rewriteResourceURL(String urlString, boolean generateAbsoluteURL) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, generateAbsoluteURL ? REWRITE_MODE_ABSOLUTE : REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
        }

        public String rewriteResourceURL(String urlString, int rewriteMode) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, rewriteMode);
        }
 
And in PortletExternalContext changed
   public String rewriteResourceURL(String urlString, int rewriteMode) {
            // NOTE: We could encode the URL a la WSRP, but for resources, we can always produce an URL here, so we
            // just do so!

            // It seems reasonable to always produce an absolute path unless the URL is already absolute.
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, Response.REWRITE_MODE_ABSOLUTE_PATH);
        }

In  XForms Utils
 public static String resolveResourceURL(PipelineContext pipelineContext, Element currentElement, String url, boolean generateAbsoluteURL) {

        final URI resolvedURI = resolveXMLBase(currentElement, url);
        final String resolvedURIString = resolvedURI.toString();
        final ExternalContext externalContext = (ExternalContext) pipelineContext.getAttribute(PipelineContext.EXTERNAL_CONTEXT);

        return URLRewriter.rewriteURL(externalContext.getRequest(),externalContext.getResponse(), resolvedURIString,
                generateAbsoluteURL ? ExternalContext.Response.REWRITE_MODE_ABSOLUTE : ExternalContext.Response.REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
    }

public static String resolveRenderOrActionURL(boolean isPortletLoad, PipelineContext pipelineContext, Element currentElement, String url, boolean generateAbsoluteURL) {
        ...
        if (!isPortletLoad) {
            // XForms page was loaded from a servlet
            externalURL = URLRewriter.rewriteURL(externalContext.getRequest(),externalContext.getResponse(), resolvedURIString,
                generateAbsoluteURL ? ExternalContext.Response.REWRITE_MODE_ABSOLUTE : ExternalContext.Response.REWRITE_MODE_ABSOLUTE_PATH_OR_RELATIVE);
       ...
        return externalURL;
    }

In CommandLineExternalContext

public String rewriteResourceURL(String urlString, int rewriteMode) {
            return URLRewriter.rewriteURL(getRequest(),getResponse(), urlString, rewriteMode);
        }

In XformsServer

  private static void outputNoscriptResponse(XFormsContainingDocument containingDocument, PipelineContext pipelineContext, ContentHandler contentHandler, XFormsStateManager.XFormsDecodedClientState xformsDecodedClientState, boolean allEvents, ExternalContext externalContext) throws IOException, SAXException {
 ...
            // Send redirect
            final String absoluteURL = URLRewriter.rewriteURL(externalContext.getRequest(),
                    externalContext.getResponse(),load.getResource(), ExternalContext.Response.REWRITE_MODE_ABSOLUTE);
    ...

If you like I can send the modified files.


Note that Form Runner uses XSLT, yet is cacheable. As long as you only depend on certain things, like URL parameters in oxf:request, you should be fine.
great

Any chance of transparent noscript suport and cookieless pages for Orbeon 3.7 ???

Andy Bailey
http://www.hazlorealidad.com


--
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: Mobile xforms (Javascript free)

Andrew Bailey
Hi,

Just spotted another change needed in ServletExternalContext 

public void sendRedirect(String pathInfo, Map parameters, boolean isServerSide, boolean isExitPortal) throws IOException {
           ...
                // Client-side redirect: send the redirect to the client
                String redirectURLString = NetUtils.pathInfoParametersToPathInfoQueryString(pathInfo, parameters);
                if (redirectURLString.startsWith("/") && !(nativeResponse instanceof ExternalContextToHttpServletResponseWrapper))
                    nativeResponse.sendRedirect(nativeResponse.encodeRedirectURL(request.getContextPath() + redirectURLString));
                else
                    nativeResponse.sendRedirect(nativeResponse.encodeRedirectURL(redirectURLString));
            }
        }

There may be more!

Andy Bailey



--
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: Mobile xforms (Javascript free)

Erik Bruchez
Administrator
In reply to this post by Andrew Bailey
> Apart from the fact that you cant use the :visited pseudo class  
> selector and that you cant drag a button
> (I dont think either of the two are so important) in firefox 3 I  
> cant tell the difference between the two

I realize I meant IE. The button does depress with IE 6, and the text  
alignment is different. Not sure if that is fixable.

Also, you can't select the text within the button, but you can select  
the text within a link. This with FF and IE.

The bottom line is this:

* If you *have to*, then using a button is ok
* But in the general case, it is not a very good alternative to an  
actual link

This doesn't kill your proposal, just that for the JavaScript version  
links would still have to somehow be made anchors, and/or that this  
mode would have to remain optional.

> I couldnt find the accessible bookcast version that you mentioned.

With a recent nightly, click on the Bookcast link under Form Builder  
in the list of examples, then you will see the "Accessible version"  
link at the top left.

> Wouldnt the normal page orbeon sends be ok with the <script src=""/>
> if there is no javascript they just dont get loaded.

I think you are right, we could still send the <script> elements.  
Right now, we don't send them in noscript mode, because we know they  
are unneeded

> If you like I can send the modified files.

Sure please do, it's easier to diff this way.

Just to make sure: do these changes actually work, i.e. does  Orbeon  
Forms worked without cookies this way?

> Any chance of transparent noscript suport and cookieless pages for  
> Orbeon 3.7 ???

Strongly doubt it regarding noscript as we probably won't have any  
time to work on that. But that will also depend on when 3.7 is  
actually released.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



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