Hi Krish,
Actually even I had the same experience a while before but seems
tw.forms has improved.
I got your point and I too generally prefer the plain html way, but at
times tw.forms or formbuild comes handy.
What I particularly like is the dinforms library.
But still I don't know what are the ids of the widgets generated using
tosca.
Since we just provide the name of the widgit while initialisation, I
don't know what Ids are getting assigned to the widgets inside the form.
So I can't use getElementById.
Happy hacking.
Krishnakant.
On Sunday 08 August 2010 03:49 PM, [email protected] wrote:
Hello Krishnakant,
Toscowidget instrument the form and generate the complete form through
python code. webhelpers just emit html code and it cannot be compared
to toscawidget approach. In toscawidget, form is an object and form
elements are like members of object just like python object model.
Webhelpers doesn't do object orientation, rather provide useful set of
APIs and utility class which are commonly used. I somehow don't like
the customization of toscawidget, then I use the plain form and
webhelper approach to generate the form using mako template. I have
explored toscawidget one and half years before now it could have been
improved.
In my opinion, toscawidget should never part of webhelpers library..
Regards,
Krish
On Aug 7, 10:01 pm, Krishnakant Mane<[email protected]> wrote:
Hello all,
The question might sound beard, but I have a reason to ask it.
When we generate a form using webhelpers, its python code which creates
the widgets, and I know the ids of every widget.
So if I do document.getElementById it works fine.
I see that tw.forms also generates widgets using python code and while
reading the docs, I found that there is some thing in common between the 2.
But one thing I did not understand is, when I create the form using
tw.forms, how do I find an element using getElementById?
I don't see a place where I set an id for a widget in tw.forms?
May be I am doing it the right way?
But just missing out some thing.
I want to use tw.forms along with webhelpers and want to know if there
is a trick to find or guess the id of an widget generated by tw.forms.
Happy hacking.
Krishnakant.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.