Oskar Eriksson
Oskar Eriksson

Reputation: 855

Table in GWT-Bootstrap

Trying to add a table to my GWT app with Bootstrap, using UIBinder. From what I understad there is some sort of table ported to GWT-Bootstrap but I don't know which one to use and how to use it (couldn't find any documentation either).

I want something like this, with Bootstrap style of course:

<b:CellTable>
    <<ROW>
        <<COLUMN>>
           Text blabla
        <</COLUMN>>
        <<COLUMN>>
           Text blabla
        <</COLUMN>>
    <</ROW>>            
</b:CellTable>

Thanks!

Upvotes: 3

Views: 3113

Answers (1)

&#220;mit
&#220;mit

Reputation: 17489

I think you are mixing up some things.

<b:CellTable> is basically a normal GWT CellTable with bootstrap styles (it extends normal CellTable and injects a custom Resource for the styles).

Bootstrap and GWT-Bootstrap also have styles for normal HTML tables.
You can either use the <b:Table> widget or you can just define <table> and add the corresponding bootstrap classname.

So there are three choices:

  • If you need the functionality of CellWidgets (rendering a lot of records, fast performance) and want to have it with bootstrap styling then use <b:CellTable>
  • If you just need a bootstrap styled HTML table and also want to interact with it use the <b:Table> widget.
  • If you just need a static bootstrap styled HTML table then just use <table class="table table-striped">

Upvotes: 4

Related Questions