On Wed, 2007-21-03 at 06:13 +0100, Alberto Valverde wrote:
>
> On Mar 21, 2007, at 4:50 AM, iain duncan wrote:
>
> >
> > So, in my mucking about with integrating widgets and ajax, I just
> > discovered that the widget forms do not ouput valid xhtml! None of the
> > input tags are closed. I discovered this because it was choking the
> > update function in ajax.js. And on checking the output of a rendered
> > form page ( which I was trying to dump into a dom element ) I see all
> > the input tags in remote form and table form are like so:
> >
> > <td><input blah blah ></td>
> >
> >
> > This means that we can not render them and then pass around that
> > output
> > through templates. So you can not render a form widget and pass the
> > rendered version to kid to display as:
> >
> > ${XML( rendered_widget ) }
> >
> > I assume this is not supposed to be the case? Anyone know how to
> > fix it
> > in the short term through a custom template?
>
> They render valid html if kid is configured to do so in the config
> file. To make a particular widget output xhtml do:
>
> widget.render(format='xhtml')
>
> However, I'd recomend using display instead of render as it outputs
> an element stream which is more efficient than serializing and re-
> parsing with XML.
Given that kid demands valid xhtml, is there any reason not to have the
widgets default to format xhtml?
Thanks Alberto!
Iain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---