durusmail: quixote-users: Need Form Help
Need Form Help
2005-07-21
2005-07-21
2005-07-21
2005-07-21
2005-08-17
Need Form Help
Orr, Steve
2005-08-17
Regarding...
>>  In the base quixote.form.Form class there's an annoying line in the
>> _render_finish() method...
>>      r += htmltext('
') >> >> This creates an HTML break. So I subclassed Form and overwrote the >> method. I shouldn't have to do that for mere formatting should I? > You can just add a css rule to not show this element. Or you can just > call not call _render_finish() How would one "add a css rule to not show this element?" I did the following but it creates formatting problems within an HTML table. br.quixoteform { clear: both; line-height 0; display: none; } I want to use the _render_finish() method in the base quixote.form.Form class. It's my contention that I shouldn't have to over-ride a base class to merely avoid
tags. To me the
tags should NOT be there in the first place as this is an unnecessary inter-mixing of presentation HTML code and logic code. What do you think? -----Original Message----- From: Mario Ruggier [mailto:mario@ruggier.org] Sent: Thursday, July 21, 2005 4:51 PM To: Orr, Steve Cc: quixote-users@mems-exchange.org Subject: Re: [Quixote-users] Need Form Help On Jul 21, 2005, at 10:22 PM, Orr, Steve wrote: > THANKS!!! This was very helpful. After a little work I was able to get > something working. > > In the base quixote.form.Form class there's an annoying line in the > _render_finish() method... >     r += htmltext('
') > > This creates an HTML break. So I subclassed Form and overwrote the > method. I shouldn't have to do that for mere formatting should I? I > found no such "quixoteform" class in the css.py. Is this a bug? You can just add a css rule to not show this element. Or you can just call not call _render_finish(), but just write it out in your render func. There is this wiki entry that may be of interest: http://www.quixote.ca/qx/CustomFormRendering > This brings up another question... Are there some quixote classes > which are commonly subclassed to add custom functionality or > formatting? Are there any classes which developers routinely subclass? > And what's the impact of then having to code against your subclasses > versus the base classes? I typically write my own renderer, as i did in your sample. You may need to specify your own _parse(). One thing I find doing at times, because of the way pasre works (setting value of widget automatically) is to simply force the value directly on the request set request.form['name']. Ugly... any better ways to do this simply? mario
reply