cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew <andrewm...@gmail.com>
Subject Ajax - 'No handler found for element head' - 'No handler found for element body'
Date Fri, 21 Jul 2006 21:15:53 GMT
Hi,
I have an ajaxified form which has a number of required fields. If you
submit the form without filling in any of the required fields 2 alert are
displayed. The first says 'No handler found for element head. Show server
response?', and the second alert says 'No handler found for element body.
Show server response?'. If you click yes to both questions another window
opens up showing your form page minus any of the form fields! If all
required fields are entered correctly then the form submits as normal. What
could be the issue here? When the page firtst loads I get the following dojo
debug lines:

DEBUG: Loading URIresources/dojo/../forms/js/__package__.js
DEBUG: Loading URIresources/dojo/../forms/js/common.js
DEBUG: Loading URIresources/dojo/../forms/js/CFormsForm.js
DEBUG: Loading URIresources/dojo/../ajax/js/BUHandler.js
DEBUG: Loading URIresources/dojo/../ajax/js/insertion.js
DEBUG: Loading URIresources/dojo/../forms/js/CFormsRepeater.js
DEBUG: Loading URIresources/dojo/../forms/js/CFormsSuggest.js
DEBUG: Loading URIresources/dojo/src/widget/html/ComboBox.js
DEBUG: Loading URIresources/dojo/src/widget/ComboBox.js
DEBUG: Loading URIresources/dojo/src/widget/html/stabile.js
DEBUG: Loading URIresources/dojo/src/widget/InlineEditBox.js

My sitemap is as follows:

            <map:match pattern="**viewform-*.xml">
                <map:generate type="newjx" src="jx/{2}.jx"/>
                <map:transform type="browser-update"/>
                <map:transform type="cinclude"/>
                <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="html"/>
                  </map:otherwise>
                </map:select>
            </map:match>

and my JX form is as follows:

<jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml
"/>
    <tableR>
      <ft:form-template action="saveNewAccount.kont" name="Form1"
method="POST" ajax="true">
        <ft:continuation-id/>
            <table width="294" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><img src="images/tool.gif" width="5" height="16" /></td>
              <td width="265"><img src="images/tool.gif" width="289"
height="16" /></td>
            </tr>
            <tr>
              <td colspan="2"><img src="images/detailtitle.gif" width="294"
height="25" /></td>
            </tr>
            <tr>
              <td colspan="2"><img src="images/tool.gif" width="1"
height="5" /></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265" class="newstext">
                  <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/firstname.gif" width="89" height="16" /></td>
                      <td width="220" valign="top" align="left">
                        <fi:group>
                                        <ft:widget id="fname">
                                            <fi:styling type="text"
size="22" class="keyinbox"/>
                                        </ft:widget>
                            </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5"><img src="images/tool.gif" width="5" height="10"
/></td>
              <td width="265">
                  <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/lastname.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="lname">
                                        <fi:styling type="text" size="25"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265">
                  <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/address1.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="address1">
                                        <fi:styling size="30"
class="keyinbox" type="text" />
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265">
                  <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/address2.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="address2">
                                        <fi:styling size="25"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265">
                 <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/address3.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="address3">
                                        <fi:styling size="25"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/postcode.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="postcode">
                                        <fi:styling size="15"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/country.gif" width="72" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="country">
                                        <fi:styling size="20"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td width="5">&nbsp;</td>
              <td width="265"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/email.gif" width="72" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="email">
                                        <fi:styling size="25"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/hometelephone.gif" width="128" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="hphone">
                                        <fi:styling size="20"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/mobile.gif" width="72" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                    <ft:widget id="mphone">
                                        <fi:styling size="20"
class="keyinbox"/>
                                    </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/username.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                  <ft:widget id="user">
                                      <fi:styling size="20"
class="keyinbox"/>
                                  </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                    <tr>
                      <td width="55" valign="bottom"><img
src="images/password.gif" width="89" height="16" /></td>
                      <td width="220" valign="top">
                        <fi:group>
                                  <ft:widget id="pass">
                                      <fi:styling size="20"
class="keyinbox"/>
                                  </ft:widget>
                        </fi:group>
                      </td>
                    </tr>
                </table></td>
            </tr>
            <tr>
              <td colspan="2"><img src="images/tool.gif" width="20"
height="5" /></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
                  <tr>
                    <!--<td width="42"><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"><input type="submit" id="save"
value="Save" class="button"/></td>
                    <td width="4"><img src="images/tool.gif" width="4"
height="8" /></td>
                    <td width="42"><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>&nbsp;</td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td colspan="2"><img src="images/tool.gif" width="20"
height="5" /></td>
            </tr>
            <tr>
                <td colspan="2"><span
class="indextext2">&nbsp;${msg}</span></td>
            </tr>
            <tr>
              <td colspan="2"><img src="images/tool.gif" width="1"
height="11" /></td>
            </tr>
          </table>
        </ft:form-template>
    </tableR>

regards

Andrew

Mime
View raw message