Re: Ajax - 'No handler found for element head' - 'No handler found for element body'

2006-07-21 Thread Andrew
Hi Jason,question? Why will the ajax process only be initiated with:and not: ? When the _javascript_ methodology to submit a page is used, the whole page reload!regardsAndrewOn 22/07/06, 
Andrew <[EMAIL PROTECTED]> wrote:
Jason,Eureka! At last I have ajax working with my formsMany thanks for pointing me in the right direction.regardsAndrew
On 22/07/06, 
Jason Johnston <[EMAIL PROTECTED]> wrote:

Andrew wrote:> 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:>> 
> > > 
> > > 
>   > > 

> samples-styling.xsl"/>> >   > 
> >   > >   
>   > >   > > 
Andrew--I think you need to understand how the AJAX publishing works, inparticular the browser-update transformer.When an AJAX request is received, the response to the browser should notbe the entire document (that's not very AJAX-ey!), but only the parts
that need to be updated in the DOM.  This is the job of thebrowser-update transformer; it filters out everything except elements inthe "bu:" namespace (produced by the CForms JX macros), which the

client-side _javascript_ (Dojo) knows how to handle.In your pipeline it looks like the browser-update transformer isexecuting, filtering out everything but the "bu:" elements which containthe form fields that need to be updated.  But then you pass it through
some other transformation stages which *add* content back in!  All of asudden you've got a document with much more than the "bu:" elementsrecognized by Dojo, so it pukes on those unrecognized elements.
I believe you need to restructure your pipeline so the browser-updatetransformer comes after the transforms that add content.Hope that helps--Jason-
To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: 
[EMAIL PROTECTED]





Re: Ajax - 'No handler found for element head' - 'No handler found for element body'

2006-07-21 Thread Andrew
Jason,Eureka! At last I have ajax working with my formsMany thanks for pointing me in the right direction.regardsAndrewOn 22/07/06, 
Jason Johnston <[EMAIL PROTECTED]> wrote:
Andrew wrote:> 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:>> 
> > > 
> > > 
>   > > 
> samples-styling.xsl"/>> >   > 
> >   > >   
>   > >   > > 
Andrew--I think you need to understand how the AJAX publishing works, inparticular the browser-update transformer.When an AJAX request is received, the response to the browser should notbe the entire document (that's not very AJAX-ey!), but only the parts
that need to be updated in the DOM.  This is the job of thebrowser-update transformer; it filters out everything except elements inthe "bu:" namespace (produced by the CForms JX macros), which the
client-side _javascript_ (Dojo) knows how to handle.In your pipeline it looks like the browser-update transformer isexecuting, filtering out everything but the "bu:" elements which containthe form fields that need to be updated.  But then you pass it through
some other transformation stages which *add* content back in!  All of asudden you've got a document with much more than the "bu:" elementsrecognized by Dojo, so it pukes on those unrecognized elements.
I believe you need to restructure your pipeline so the browser-updatetransformer comes after the transforms that add content.Hope that helps--Jason-
To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]



Re: XSL: match all elements except one section... node()[not(self::login_fields)]

2006-07-21 Thread Andrew
Hi Jason,I have resolved this issue by doing:                  
      Many regards for your reply.AndrewOn 22/07/06, Jason Johnston <
[EMAIL PROTECTED]> wrote:Andrew wrote:> Any ideas anyone?>
Not totally sure I get what you're after, but my best guess is maybe youjust want to do an  in your firststylesheet?  That copies it through untouched.
>> On 19/07/06, *Andrew* <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:>> Hi,
> I have an xsl template for which I wish to match (process) all> elements in the document except one:>> node()[not(self::login_fields)]>> I have placed this at the bottom of my xsl document. What am I
> wishing to achieve you ask? Well I have 2 stylesheets> transformations in a sitemap pipe. The first xsl document contains> the section I want ignored, and the second,> forms-samples-styling.xsl
, is the document I want to handle the> transformation of the section ignored in the first xsl document.> Clear?!? My sitemap looks like:>> > > > src="" // This is the xsl doc containing the section
> > type="cinclude"/>// I want> transformed by forms-samples-styling> 
> > samples-styling.xsl"/ So my xsl document, style/{2}.xsl looks like:>> > > xmlns:xsl=" http://www.w3.org/1999/XSL/Transform
"> xmlns:cinclude=" http://apache.org/cocoon/include/1.0">> >   
> > ...> >> >  > cellpadding="0">>   ..>   >  > select="//login_fields"/> //I don't want this transformed here!
>   > > > > >> 
> > >> >   > > select="@*|xmlns|node()[not(self::login_fields)]"/>>   > >> 
>   > > >> When I load the page the section I don't want processed is still> being processed within the document it is contained in, what am I
> missing here?>> regards>> Andrew>>-To unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]


Re: Ajax - 'No handler found for element head' - 'No handler found for element body'

2006-07-21 Thread Jason Johnston

Andrew wrote:

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:








  




  


  

  
  

  




Andrew--

I think you need to understand how the AJAX publishing works, in 
particular the browser-update transformer.


When an AJAX request is received, the response to the browser should not 
be the entire document (that's not very AJAX-ey!), but only the parts 
that need to be updated in the DOM.  This is the job of the 
browser-update transformer; it filters out everything except elements in 
the "bu:" namespace (produced by the CForms JX macros), which the 
client-side JavaScript (Dojo) knows how to handle.


In your pipeline it looks like the browser-update transformer is 
executing, filtering out everything but the "bu:" elements which contain 
the form fields that need to be updated.  But then you pass it through 
some other transformation stages which *add* content back in!  All of a 
sudden you've got a document with much more than the "bu:" elements 
recognized by Dojo, so it pukes on those unrecognized elements.


I believe you need to restructure your pipeline so the browser-update 
transformer comes after the transforms that add content.


Hope that helps
--Jason





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AJAX enabling custom widget

2006-07-21 Thread Jason Johnston

Christofer Dutz wrote:

Hi

I am migrating an existing application to ajax. I managed to update 
almost everything. The only problem I am still having is my custom 
styling for a field which I use for view-selection.


When using the default (drop-down-box) styling, everything works. My 
custom styling outputs HTML-code which displays tabs with links for 
switching the active tag. When clicking on a link the view state changes 
correctly. Unfortunately the control itself has to be updated as well. 
This does not work.



How can I make Cocoon/Ajax update the content and the control?


Not sure we can help without seeing the code in question.  Could you 
paste the XSL template you use for your custom styling into this thread?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XSL: match all elements except one section... node()[not(self::login_fields)]

2006-07-21 Thread Jason Johnston

Andrew wrote:

Any ideas anyone?



Not totally sure I get what you're after, but my best guess is maybe you 
just want to do an  in your first 
stylesheet?  That copies it through untouched.





On 19/07/06, *Andrew* <[EMAIL PROTECTED] 
> wrote:


Hi,
I have an xsl template for which I wish to match (process) all
elements in the document except one:

node()[not(self::login_fields)]

I have placed this at the bottom of my xsl document. What am I
wishing to achieve you ask? Well I have 2 stylesheets
transformations in a sitemap pipe. The first xsl document contains
the section I want ignored, and the second,
forms-samples-styling.xsl, is the document I want to handle the
transformation of the section ignored in the first xsl document.
Clear?!? My sitemap looks like:



 // This is the xsl doc containing the section
// I want
transformed by forms-samples-styling




So my xsl document, style/{2}.xsl looks like:


http://www.w3.org/1999/XSL/Transform";
xmlns:cinclude=" http://apache.org/cocoon/include/1.0";>

  

...

   


 
  ..
  
  //I don't want this transformed here!
  










  

  



  



When I load the page the section I don't want processed is still
being processed within the document it is contained in, what am I
missing here?

regards

Andrew





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Xhtml serialized document with ajax="true" results in 'cocoon not defined'

2006-07-21 Thread Andrew
SOLVED: This issue has been resolved.AndrewOn 21/07/06, Andrew <[EMAIL PROTECTED]> wrote:
Hi,
I have an xhtml document:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">which uses, or is trying to use!, ajax. When ajax is declared as "true", transformation/serialization yields the following (x)html output:

cocoon.forms.ajax = true;script>

based on:

               
                 
                   
                 

                 
                                     


Now that little bit of _javascript_,