durusmail: quixote-users: form2 considerations
form2 considerations
2004-03-01
2004-03-01
form2 considerations
Oscar Rambla
2004-03-01
On Monday 01 March 2004 08:03, Neil Schemenauer wrote:
> On Mon, Mar 01, 2004 at 07:42:29AM -0800, Oscar Rambla wrote:
> >   Is add method the recomended method for population in form2 ? or
> >   is add_component the (next) prefered and add its maintained for
> > compatibility reasons to facilitate the migration
> >   from the form(1) framework that worked with widgets inside the form?
> >
> >   In my case, wich method recommend?
>
> If you are adding a widget, use add().  add_component() is a
> lower-level interface that does not wrap your widget inside a
> 'component_class' instance.  Using a component instead of a widget
> gives you more control but is also more work.
>
> > Suggestions:
> >
> >   Since both metods are public shouldn't add_component know also about
> > component_class default?
>
> No, that would defeat the purpose of add_component().
>

Right, I understand. I'll use add_component method as is.

> > - Form submition.
> >
> > I use GET methods for initialitzation proposes in these situations
> > when URL parameters/values corresponds to form inputs. Otherwise I use
> > the 'script side' of the URL.
> > Then I parse the request as ordinarily and it's Ok.
> > But still need to provide an 'is_submitted' conveniently modified method
> > to render the form.
> >
> > I've read several times in the list about troubles with GET method always
> > involved with initialization proposes.
> >
> > I'm not an expert on HTTP matter at all, but from a practical point of
> > view:
> >
> > Since POST is the recomended and default method for form submition
> > in this framework, What do you think about GET method requests be
> > defaulted to not submitted?
>
> I wouldn't say POST is recommended.  As a general rule, you should
> use POST for anything that modifies server side state and GET for
> everything else.
>

I insist was talking from a practical!  point of view.

Oscar


reply