Hi all,
I've put te widget RemoteForm (Ajax Grid) um my Project, based on a
example on the TurboGears trac [1]:
<code>
class GeraCampos(WidgetsList):
campo1 = TextField()
campo2 = PasswordField()
class ContasContabeis:
@expose(template="tgorcamentos.templates.contascontabeis_cadastro")
def cadastro(self):
name = "AJAX Form"
xxx = GeraCampos()
item_searchform = RemoteForm(
name="FormCtaContabil",
fields=GeraCampos(),
submit_text="Enviar")
return dict(item_searchform=item_searchform)
@turbogears.expose(format = "json")
def do_search(self, **kw):
time.sleep(5)
""" Echo the parameters back, json formatted. """
return """Received data:<br />%r""" % kw
<code/>
It works great, but I can't put the "GeraCampos" class outsite of the
method "cadastro", and It's not correct put this class inside of the
method (I guess!). There is another way to do this widget work?
[1] http://trac.turbogears.org/turbogears/wiki/RemoteForm
thanks!
Marcos Daniel Petry
www.petry.inf.br
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---