On Thursday, February 17, 2011 11:51:03 AM UTC-5, Carlos wrote:
>
> Hi,
>
> I can see the book says the following in chapter 7:
>
> http://www.web2py.com/book/default/chapter/07
>
> "The class SQLFORM is defined in "gluon/sqlhtml.py". It can be easily
> extended by overloading its xml method, the method that serializes the
> objects, to change its output."
>
> Can you please explain me how SQLFORM xml serialization can be "easily
> extended"?, what exactly is 'overloading'?, where is this 'xml' method (I
> can't find in the SQLFORM class in sqlhtml.py)?.
>
Note, SQLFORM extends the FORM class, so the xml method is in the FORM
class: http://code.google.com/p/web2py/source/browse/gluon/html.py#1765. It
looks like FORM.xml ultimately calls DIV.xml (
http://code.google.com/p/web2py/source/browse/gluon/html.py#778).
Anthony