cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew <andrewm...@gmail.com>
Subject Re: Cocoon-Ajax issue
Date Tue, 18 Jul 2006 19:11:49 GMT
Ok..,
si i've managed to get the head elements working but now I can't get the
body elements to be processed by forms-samples-styling.xsl and the html
output I get for the jx part of the body section is:

<body
.........

<form-template action="login.kont" ajax="true" name="Form1" method="POST">
     <continuation-id>2f100f7a6b895a7f583278820a44736b7a7b465f</continuation-id>
       <div id="output">
	<table border="0" cellspacing="0" cellpadding="0">

	<tr>
	<td width="55" valign="bottom"><img src="images/user.gif" width="55"
height="16" /></td>
	<td width="220" valign="top">
	<group>
	<styling type="tabs" />
	<state>
        <field id="activetab" state="active"
required="false"><datatype type="integer" /></field>
         </state>

	<items>
	<field id="username" state="active" required="true"><datatype type="string" />
        <styling size="30" type="text" class="keyinbox" /></field>
        </items>
	</group>
	</td>
	</tr>
	</table>

.........

	</div>		
        </form-template>
        </body>

What is going on here?!?!

regards

Andrew

p.s. Once again, my sitemap is:

            <map:match pattern="**viewform-*">
                <map:generate type="jx" src="jx/{2}.jx"/>
                <map:transform type="browser-update"/>
                <!--<map:transform type="forms"/>-->
                <map:transform type="xslt-saxon" src="style/{2}.xsl"/>
                <map:transform type="cinclude"/>
                <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"/>
                  </map:otherwise>
                </map:select>
            </map:match>

and my jx page is:

<page
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:cinclude="http://apache.org/cocoon/include/1.0"
xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">

<jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml
"/>
    <login_fields>
        <jx:choose>
          <jx:when test="${userGlobal==null}">
              <ft:form-template action="login.kont" name="Form1"
method="POST" ajax="true">
                <ft:continuation-id/>
                   <div id="output">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="55" valign="bottom"><img
src="images/user.gif" width="55" height="16" /></td>
                          <td width="220" valign="top">
                            <fi:group>
                                  <fi:styling type="tabs"/>
                                      <fi:state>
                                          <ft:widget id="activetab" />
                                      </fi:state>
                                      <fi:items>
                                          <ft:widget id="username">
                                              <fi:styling size="30"
type="text" class="keyinbox"/>
                                          </ft:widget>
                                      </fi:items>
                            </fi:group>
                          </td>
                        </tr>
                      </table>
                      <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="55" valign="bottom"><img
src="images/passwords.gif" width="89" height="16" /></td>
                          <td width="220" valign="top">
                            <fi:group>
                                  <fi:styling type="tabs" />
                                      <fi:state>
                                          <ft:widget id="activetab" />
                                      </fi:state>
                                      <fi:items>
                                          <ft:widget id="password">
                                              <fi:styling size="30"
type="password" class="keyinbox"/>
                                          </ft:widget>
                                      </fi:items>
                            </fi:group>
                          </td>
                        </tr>
                      </table>
                      <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td colspan="6" align="right"><img
src="images/tool.gif" width="2" border="0" height="5" /></td>
                        </tr>
                        <tr>
                          <td><img src="images/tool.gif" width="3"
border="0" height="1" /></td>
                          <td width="55" valign="bottom"
class="indextext"><img src="captcha.jpeg" /></td>
                          <td width="220" valign="top">
                              <table border="0" cellspacing="0"
cellpadding="0">
                              <tr>
                                  <td><img src="images/tool.gif" width="3"
border="0" height="1" /></td>
                                  <td valign="top">
                                    <fi:group>
                                          <fi:styling type="tabs"/>
                                              <fi:state>
                                                  <ft:widget id="activetab"
/>
                                              </fi:state>
                                              <fi:items>
                                                  <ft:widget
id="captcha_code">
                                                      <fi:styling
listbox-size="30" type="text" class="keyinbox"/>
                                                  </ft:widget>
                                              </fi:items>
                                    </fi:group>
                                  </td>
                              </tr>
                              </table>
                          </td>
                        </tr>
                      </table>
                      <table width="100%" border="0" cellspacing="0"
cellpadding="0">
                        <tr>
                          <td colspan="6" align="right"><img
src="images/tool.gif" width="2" border="0" height="10" /></td>
                        </tr>
                        <tr>
                          <td align="right">
                          <table width="100%" cellpadding="0"
cellspacing="0" border="0">
                          <tr>
                              <td align="left" valign="bottom"
class="indextext"><a
href="javascript:popup('sendDetailsPopUp.xml','${userGlobal}')">&#160;Forgotten
your Password?</a></td>
                              <td align="right"><img src="images/plus.gif"
width="8" height="14" /></td>
                          </tr>
                          </table>
                          </td>
                          <td width="8" align="left"><img
src="images/plus.gif" width="8" height="14" /></td>
                          <td width="42" align="left"><a
href="javascript:formSubmit(document.Form1)"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('sumit','','images/sumit-over.gif',1)"><img
src="images/sumit-none.gif" alt="sumit" name="sumit" width="42" height="15"
border="0" /></a></td>
                          <td width="42" align="center" valign="middle"><a
href="javascript:formReset(document.Form1)" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('cancel','','images/cancel-over.gif',1)"><img
src="images/cancel-none.gif" alt="cancel" name="cancel" width="42"
height="15" border="0" /></a></td>
                          <td width="20" align="center" valign="middle"><img
src="images/tool.gif" width="20" height="8" /></td>
                        </tr>
                      </table>
                </div>
              </ft:form-template>
            </jx:when>

regards

Andrew



On 18/07/06, Andrew <andrewmadu@gmail.com> wrote:
>
> Hi Mark,
> you are understanding the question very well ;-) The head section of my
> XSLT file never matches with the head matacher in forms-samples-style.xsland as a result
none of the require ajax/dojo script code is wrtten to the
> head area of my code. My sitemap pipe is as follows:
>
>
>             <map:match pattern="**viewform-*">
>                 <map:generate type="jx" src="jx/{2}.jx"/>
>                 <map:transform type="forms"/>
>                 <map:transform type="browser-update"/>
>                 <map:transform type="i18n">
>                   <map:parameter name="locale" value="en-US"/>
>                 </map:transform>
>                 <map:transform type="xslt-saxon" src="style/{2}.xsl"/>
>                 <map:transform type="cinclude"/>
>                 <map:transform src="template-style/forms-
> samples-styling.xsl"/>
>                 <map:transform type="cinclude"/>
>                 <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"/>
>                   </map:otherwise>
>                 </map:select>
>             </map:match>
>
> and my xsl file is as follows:
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>     <xsl:stylesheet version="1.0"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>         xmlns:cinclude=" http://apache.org/cocoon/include/1.0">
>         <xsl:template match="/">
>           <page>
>                 <head>
>                     <title>beyaRecords - Home Page</title>
>                     <link rel="stylesheet" type="text/css">
>                         <xsl:attribute
> name="href">stylesheets/beya.css</xsl:attribute>
>                         <xsl:attribute name="media">all</xsl:attribute>
>                     </link>
>
>                     <link rel="stylesheet" type="text/css">
>                         <xsl:attribute
> name="href">stylesheets/style.css</xsl:attribute>
>                         <xsl:attribute name="media">all</xsl:attribute>
>                     </link>
>
>                     <script>
>                         <xsl:attribute
> name="type">text/javascript</xsl:attribute>
>                         <xsl:attribute
> name="src">js_files/upwarddownward.js</xsl:attribute>
>                     </script>
>
>                     <script>
>                         <xsl:attribute
> name="type">text/javascript</xsl:attribute>
>                         <xsl:attribute
> name="src">js_files/form.js</xsl:attribute>
>                     </script>
>
>                 </head>
>             <body leftmargin="0" marginheight="0" topmargin="0"
> marginwidth="0"
> onload="InitialiseScrollableArea();preloadImages('images/scroller_up_on.gif','images/scroller_down_on.gif');MM_swapImage('images/sumit-
> over.gif','images/cancel-over.gif','images/emaillink-over.gif')">
>             <script>
>                 <xsl:attribute name="type">text/javascript</xsl:attribute>
>                 <xsl:attribute
> name="src">js_files/reload.js</xsl:attribute>
>             </script>
>             <table width="1024" border="0" cellspacing="0"
> cellpadding="0">
>             <tr>
>               <td width="221" rowspan="3"><img src="images/bgleft1.jpg"
> width="222" height="460" /></td>
>               <td colspan="4" background="images/bg1.gif" class="bgcol"
> width="583"><xsl:apply-templates select="//menu"/></td>
>               <td width="220" rowspan="3"><img src="images/bgright1.gif"
> width="220" height="460" /></td>
>             </tr>
>             <tr>
>               <td width="18" class="bgcol"><img src="images/tool.gif"
> width="18" height="365" /></td>
>               <td width="301" valign="top" class="bgcol">
>               <table width="261" border="0" cellspacing="0"
> cellpadding="0">
>                   <tr>
>                     <td><img src="images/tool.gif" width="20" height="16"
> /></td>
>                   </tr>
>                   <xsl:apply-templates select="//new_music"/>
>                   <tr>
>                     <td><img src="images/tool.gif" width="20" height="5"
> /></td>
>                   </tr>
>                   <tr>
>                     <td valign="top"><xsl:apply-templates
> select="//login_welcome"/></td>
>                   </tr>
>                   <tr>
>                      <td colspan="2"><img src="images/tool.gif" width="20"
> height="3" /></td>
>                   </tr>
>                   <tr>
>                     <td><xsl:apply-templates
> select="//login_fields"/></td>
>                   </tr>
>                 </table></td>
>               <td width="19" class="bgcol">&#160;</td>
>               <td width="245" valign="top" class="bgcol"><table
> width="100%" border="0" cellspacing="0" cellpadding="0">
>                   <tr>
>                     <td><img src="images/tool.gif" width="20" height="16"
> /></td>
>                   </tr>
>                   <tr>
>                     <td><img src="images/newstitle.gif" width="245"
> height="27" /></td>
>                   </tr>
>                   <tr>
>                     <td><img src="images/tool.gif" width="20" height="300"
> /></td>
>                   </tr>
>                 </table></td>
>             </tr>
>             <tr>
>               <td colspan="4" class="bgcol"><a href="mailto:
> info@beyarecords.com" onMouseOut="MM_swapImgRestore()"
> onMouseOver="MM_swapImage('email','','images/bottombar-over.gif',0)"><img
> src="images/bottombar- none.gif" name="email" width="583" height="22"
> border="0" /></a></td>
>             </tr>
>           </table>
>           <table width="100%" border="0" cellspacing="0" cellpadding="0">
>             <tr>
>               <td bgcolor="B9B5AC"><img src="images/tool.gif" width="1"
> height="1" /></td>
>             </tr>
>           </table>
>           <table width="100%" border="0" cellspacing="0" cellpadding="0">
>             <tr>
>                 <td></td>
>                 <td><img src="images/tool.gif" width="1" height="5"
> /></td>
>             </tr>
>             <cinclude:include src="style/copyright.xml"
> element="included"/>
>             <cinclude:include src="style/designed-by-littleghost.xml"
> element="included"/>
>         </table>
>         <P align="center">&#160;</P>
>         <div id="divUpControl">
>           <table width="100%" border="0" cellspacing="0" cellpadding="0">
>             <tr>
>               <td>&#160;</td>
>               <td width="24">
>                 <a onmouseover="PerformScroll(-7);displayStatusMsg('Scroll
> Up');swapImage('images/scroller_up_button','','images/scroller_up_on.gif',1);return
> document.returnValue" onmouseout="CeaseScroll();swapImgRestore()"
> href="javascript:;"><img height="18" alt="godown"
> src="images/scroller_up_on.gif" width="24" border="0"
> name="scroller_up_button"/></a>
>               </td>
>             </tr>
>             <tr>
>               <td>&#160;</td>
>               <td><img src="images/scrollbg.gif" width="24"
> height="154"/></td>
>             </tr>
>           </table>
>           <p>&#160;</p>
>           <p>&#160;</p>
>           <p>&#160;</p>
>           <p>&#160;</p>
>           <p>&#160;</p>
>           <p>&#160; </p>
>         </div>
>         <div id="divDownControl">
>             <a onmouseover="PerformScroll(7);displayStatusMsg('Scroll
> Down');swapImage('images/scroller_down_button','','images/scroller_down_on.gif',1);return
> document.returnValue" onmouseout="CeaseScroll();swapImgRestore()"
> href="javascript:;"><IMG height="18" alt="goup"
> src="images/scroller_down_on.gif" width="24" border="0"
> name="scroller_down_button"/></a>
>         </div>
>         <div id="divContainer">
>           <div id="divContent">
>                 <p class="newstext">
>                         <xsl:apply-templates select="//news"/>
>
>                 </p>
>               <br/>
>              <p/>
>           </div>
>         </div>
>         <P align="center">&#160;</P>
>         <P align="center">&#160;</P>
>         <P align="center">&#160;</P>
>         <P align="center">&#160;</P>
>         <P align="center">&#160;</P>
>         <P align="center">&#160;</P>
> </body>
> </page>
> </xsl:template>
>
> regards
>
> Andrew
>
>
> On 18/07/06, Mark Lundquist < ml@wrinkledog.com> wrote:
> >
> > Hi Andrew,
> >
> > On Jul 18, 2006, at 7:44 AM, Andrew wrote:
> >
> > > what's up with these machers:
> > >
> > > <xsl:apply-templates select="." mode="forms-page"/>
> > > <xsl:apply-templates select="." mode="forms-field"/>
> > >
> > > which are never matached in forms-sample-styling.xsl or:
> > >
> > > <xsl:apply-templates select="." mode="forms-calendar"/>
> > > <xsl:apply-templates select="." mode="forms-htmlarea"/>
> > >
> > > in forms-advanced-field styling.xsl?
> >
> > Not sure I understand... those are not "matchers".  They are found in
> > templates like <xsl:template match="head"> and <xsl:template
> > match="body">.  Do you mean that those templates are never matched, and
> > if so, why? (they certainly should be matched if they are being applied
> > to HTML!)
> >
> > > Where in my design xslt page am I meant p speacify any of the above
> > > 'mode' attributes and values?
> >
> > You don't.  The modeless templates just match, and then they invoke the
> > moded templates which are found in the forms-*-stying.xsl stylesheets.
> >
> > Does this help?  Maybe I'm misunderstanding the question(s)... :-)
> >
> > cheers,
> > —ml—
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
>

Mime
View raw message