cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Madu" <andrewm...@gmail.com>
Subject Re: Ajax form reloading problem
Date Tue, 27 Feb 2007 16:13:16 GMT
Hi Grzegorz,
as requested I have included snippets from my sitemap plus various other
related files.

initial_sitemap_flow_call:

            <map:match pattern="">
                <map:call function="login"/>
            </map:match>

flow_snippet:

function login() {

    if (userGlobal == null) {

        var form = new Form("forms/login.xml");
        form.showForm("viewform-login_new.xml"); //In relation to sitemap
snippet

        userGlobal = cocoon.session.getAttribute("user");

    }

    //Redirect user to registered area of site
    cocoon.sendPage("registered_section1.xml", {"msg":msg,
"userGlobal":userGlobal});

}

sitemap_ajax_call_snippet:

            <map:match pattern="**viewform-*.xml">
                <map:generate type="newjx" src="jx/{2}.jx"/>
                <map:transform type="cinclude"/>
                <map:transform type="xslt-saxon" src="style/{2}.xsl"/>
                <map:transform type="cinclude"/>
                <map:transform type="browser-update"/>
                <map:transform type="i18n">
                  <map:parameter name="locale" value="en-US"/>
                </map:transform>
                <map:transform src="template-style/forms-samples-styling.xsl
"/>
                <map:transform type="i18n">
                  <map:parameter name="locale" value="en-US"/>
                </map:transform>
                <map:select type="ajax-request">
                  <map:when test="true">
                    <map:serialize type="xml"/>
                  </map:when>
                  <map:otherwise>
                    <map:serialize type="xhtml"/> //Problem line. If changed
to html all is fine
                  </map:otherwise>
                </map:select>
            </map:match>

login_page_snippet (login_new.xsl/login_new.jx):

I have attached these documents to this email. The first chuck of code in
the jx file pertains to the login process

login_page_validation (login.xml):

I have attached this document to the email

onload_javascript_snippet:

I have attached this document to the email

html_rendered_page_snippet (login_view_source.html):

I have attached this document to the email. This document contains the
complete source as viewed in the browser. In it you can quite clearly see
that the form tags are not being handeled correctly.

I have attached the various documents only so as to give a complete view of
the login process.

--
Regards

Andrew

On 27/02/07, Grzegorz Kossakowski <grek@tuffmail.com> wrote:
>
> Andrew Madu napisaƂ(a):
> > Hi Grzegorz,
> >
> >
> >     Could not reproduce. I have onload="alert('loaded')" in body tag
> >     and all
> >     forms work well in Ajax mode.
> >
> >
> > Ah! It may help if I provide a link to my site for which you can see
> > the main login form page in action:
> >
> > www.beyarecords.com < http://www.beyarecords.com>
> >
> The site is down. The best way is to provide as small as possible
> example where error occurs. I mean, you should extract small portion of
> your application and test it separated from the rest. After doing it,
> you will still have no clue provide sitemap fragments, form definitions,
> templates, flowscripts and all related files.
>
> --
> Grzegorz Kossakowski
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
Mime
View raw message