Jorge Godoy wrote:
> "Adam Jones" <[EMAIL PROTECTED]> writes:
>
> > Yes, that should work. Your template would look something like this:
> >
> > <div class="tabber">
> >     <div class="tabbertab"><h2>atitle</h2>
> >         ${mywidget.display(data)}
> >     </div>
> >     ...
> > </div>
>
> It would be interesting if there was some widget we could insert in a form
> just to mark the place for a new "div".  This would allow coding multiple
> forms in an easy way...
>
> Hmmm...  Creating one shouldn't be all that hard and since I'm willing to use
> this on a project of mine I might give it a try tonight (I mean, later
> tonight).
>
> Any suggestions on the name of that widget?  ;-)  I thought about something
> like widgets.TabberTab to mimic the class name.

widgets.TabberTab sounds fine to me.

>
> My needs should be rendered like this:
>
> <form>
>   <!--! Common part to all tabs -->
>   <div class="tabbertab"><h2>Tab1</h2>
>        <!-- Widgets inside the first tab -->
>   </div>
>   <div class="tabbertab"><h2>Tab2</h2>
>        <!-- Widgets inside the first tab -->
>   </div>
>   <div class="tabbertab"><h2>Tab3</h2>
>        <!-- Widgets inside the first tab -->
>   </div>
>   <input type="submit">
> </form>
>
> Where I'd have probably a TableForm for the form, some widgets for the common
> part, containers (widgets.TabberTab) and their contents.

I tried that earlier, didn't get terribly far due to being really
tired. Unless I am seriously missing something the TableForm idea won't
work as it hardcodes its own form tag (and associated
name/action/method attrs) and submit button. If you were suggesting
that multiple parts of a single form be split up, that also does not
work with a TableForm as it expects a label attribute for each field,
and would practically implode when trying to convey form errors.

>
> Using multiple forms is already possible today with minimum effort so I won't
> worry with that...

While I was at it I wrote up something for that, as it seems to pop up
on the list pretty often. I'd like to work on this and make it a good
set of tabber-related code. You can get an svn co here:

https://recursivethought.googlecode.com/svn/tabber/trunk

>
> Anyone needing something more elaborated than that and willing me to take a
> look at it for a new widget?

I can think of a few:

* A tabber widget that loads each tab through AJAX instead of during
the page request.
* A paginate-aware tabber, possibly based on the above.

Both of these probably belong in the "that would be nice" pile, if not
the "lets dream up something that sounds cool and is impossible to
implement" pile.

-Adam

> 
> 
> Be seeing you,
> -- 
> Jorge Godoy      <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to turbogears@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to