Monday, May 31, 2010

Re: Personalized table using thead / tfoot / tbody

On 31 mai, 12:53, Rizen <vianney.dep...@gmail.com> wrote:
> Hello everybody !
>
> I'm trying to create a table using thead, tfoot and tbody.
> Moreover I have to reuse an existing CSS file. This one is using few
> table
> properties like thead, tbody, tfoot and others styles name.
> So I must create a personalized table thanks to the DOM tree.
>
> First of all, I tried to use the function DOM.createTable(). But my
> table is hugh and it's
> very long to coding step by step.
> Then I used the innerHTML method, faster but I don't think it's the
> best solution.

You won't find anything faster; but yes you have to be careful about
the HTML you're producing.

> Is the TableElement class better ?

TableElement isn't different from DOM.createTable(). It's a different
API around the exact same underlying DOM manipulation; just that the
DOM class will be deprecated in a future release and TableElement
should be preferred in new development (code is more readable too).

> Cause I don't know how to create a
> tbody element in my HTML page with this.

Document.get().createTBodyElement()

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment