Table example

Source Code

  override def renderExampleContents()(implicit fsc: FSContext): NodeSeq = {
    new Table5Base
      with Table5BaseBootrapSupport
      with Table5StandardColumns {
      override type R = Country



      val ColName = ColStr("Name", _.name.common)
      val ColCapital = ColStr("Capital", _.capital.mkString(", "))
      val ColRegion = ColStr("Region", _.region)
      val ColArea = ColStr("Area", _.area.toString)

      override def columns(): List[C] = List(
        ColName
        , ColCapital
        , ColRegion
        , ColArea
      )

      override def rows(hints: Seq[RowsHint]): Seq[Country] = CountriesData.data
    }.render()
  }
NameCapitalRegionArea
ArubaOranjestadAmericas180.0
AfghanistanKabulAsia652230.0
AngolaLuandaAfrica1246700.0
AnguillaThe ValleyAmericas91.0
Åland IslandsMariehamnEurope1580.0
AlbaniaTiranaEurope28748.0
AndorraAndorra la VellaEurope468.0
United Arab EmiratesAbu DhabiAsia83600.0
ArgentinaBuenos AiresAmericas2780400.0
ArmeniaYerevanAsia29743.0
American SamoaPago PagoOceania199.0
AntarcticaAntarctic1.4E7
French Southern and Antarctic LandsPort-aux-FrançaisAntarctic7747.0
Antigua and BarbudaSaint John'sAmericas442.0
AustraliaCanberraOceania7692024.0
AustriaViennaEurope83871.0
AzerbaijanBakuAsia86600.0
BurundiGitegaAfrica27834.0
BelgiumBrusselsEurope30528.0
BeninPorto-NovoAfrica112622.0
Burkina FasoOuagadougouAfrica272967.0
BangladeshDhakaAsia147570.0
BulgariaSofiaEurope110879.0
BahrainManamaAsia765.0
BahamasNassauAmericas13943.0
Bosnia and HerzegovinaSarajevoEurope51209.0
Saint BarthélemyGustaviaAmericas21.0
Saint Helena, Ascension and Tristan da CunhaJamestownAfrica394.0
BelarusMinskEurope207600.0
BelizeBelmopanAmericas22966.0
BermudaHamiltonAmericas54.0
BoliviaSucreAmericas1098581.0
Caribbean NetherlandsAmericas328.0
BrazilBrasíliaAmericas8515767.0
BarbadosBridgetownAmericas430.0
BruneiBandar Seri BegawanAsia5765.0
BhutanThimphuAsia38394.0
Bouvet IslandAntarctic49.0
BotswanaGaboroneAfrica582000.0
Central African RepublicBanguiAfrica622984.0
CanadaOttawaAmericas9984670.0
Cocos (Keeling) IslandsWest IslandOceania14.0
SwitzerlandBernEurope41284.0
ChileSantiagoAmericas756102.0
ChinaBeijingAsia9706961.0
Ivory CoastYamoussoukroAfrica322463.0
CameroonYaoundéAfrica475442.0
DR CongoKinshasaAfrica2344858.0
Republic of the CongoBrazzavilleAfrica342000.0
Cook IslandsAvaruaOceania236.0
ColombiaBogotáAmericas1141748.0
ComorosMoroniAfrica1862.0
Cape VerdePraiaAfrica4033.0
Costa RicaSan JoséAmericas51100.0
CubaHavanaAmericas109884.0
CuraçaoWillemstadAmericas444.0
Christmas IslandFlying Fish CoveOceania135.0
Cayman IslandsGeorge TownAmericas264.0
CyprusNicosiaEurope9251.0
CzechiaPragueEurope78865.0
GermanyBerlinEurope357114.0
DjiboutiDjiboutiAfrica23200.0
DominicaRoseauAmericas751.0
DenmarkCopenhagenEurope43094.0
Dominican RepublicSanto DomingoAmericas48671.0
AlgeriaAlgiersAfrica2381741.0
EcuadorQuitoAmericas276841.0
EgyptCairoAfrica1002450.0
EritreaAsmaraAfrica117600.0
Western SaharaEl AaiúnAfrica266000.0
SpainMadridEurope505992.0
EstoniaTallinnEurope45227.0
EthiopiaAddis AbabaAfrica1104300.0
FinlandHelsinkiEurope338424.0
FijiSuvaOceania18272.0
Falkland IslandsStanleyAmericas12173.0
FranceParisEurope551695.0
Faroe IslandsTórshavnEurope1393.0
MicronesiaPalikirOceania702.0
GabonLibrevilleAfrica267668.0
United KingdomLondonEurope242900.0
GeorgiaTbilisiAsia69700.0
GuernseySt. Peter PortEurope78.0
GhanaAccraAfrica238533.0
GibraltarGibraltarEurope6.0
GuineaConakryAfrica245857.0
GuadeloupeBasse-TerreAmericas1628.0
GambiaBanjulAfrica10689.0
Guinea-BissauBissauAfrica36125.0
Equatorial GuineaMalaboAfrica28051.0
GreeceAthensEurope131990.0
GrenadaSt. George'sAmericas344.0
GreenlandNuukAmericas2166086.0
GuatemalaGuatemala CityAmericas108889.0
French GuianaCayenneAmericas83534.0
GuamHagåtñaOceania549.0
GuyanaGeorgetownAmericas214969.0
Hong KongCity of VictoriaAsia1104.0
Heard Island and McDonald IslandsAntarctic412.0
HondurasTegucigalpaAmericas112492.0
CroatiaZagrebEurope56594.0
HaitiPort-au-PrinceAmericas27750.0
HungaryBudapestEurope93028.0
IndonesiaJakartaAsia1904569.0
Isle of ManDouglasEurope572.0
IndiaNew DelhiAsia3287590.0
British Indian Ocean TerritoryDiego GarciaAfrica60.0
IrelandDublinEurope70273.0
IranTehranAsia1648195.0
IraqBaghdadAsia438317.0
IcelandReykjavikEurope103000.0
IsraelJerusalemAsia20770.0
ItalyRomeEurope301336.0
JamaicaKingstonAmericas10991.0
JerseySaint HelierEurope116.0
JordanAmmanAsia89342.0
JapanTokyoAsia377930.0
KazakhstanNur-SultanAsia2724900.0
KenyaNairobiAfrica580367.0
KyrgyzstanBishkekAsia199951.0
CambodiaPhnom PenhAsia181035.0
KiribatiSouth TarawaOceania811.0
Saint Kitts and NevisBasseterreAmericas261.0
South KoreaSeoulAsia100210.0
KosovoPristinaEurope10908.0
KuwaitKuwait CityAsia17818.0
LaosVientianeAsia236800.0
LebanonBeirutAsia10452.0
LiberiaMonroviaAfrica111369.0
LibyaTripoliAfrica1759540.0
Saint LuciaCastriesAmericas616.0
LiechtensteinVaduzEurope160.0
Sri LankaColomboAsia65610.0
LesothoMaseruAfrica30355.0
LithuaniaVilniusEurope65300.0
LuxembourgLuxembourgEurope2586.0
LatviaRigaEurope64559.0
MacauAsia30.0
Saint MartinMarigotAmericas53.0
MoroccoRabatAfrica446550.0
MonacoMonacoEurope2.02
MoldovaChișinăuEurope33846.0
MadagascarAntananarivoAfrica587041.0
MaldivesMaléAsia300.0
MexicoMexico CityAmericas1964375.0
Marshall IslandsMajuroOceania181.0
North MacedoniaSkopjeEurope25713.0
MaliBamakoAfrica1240192.0
MaltaVallettaEurope316.0
MyanmarNaypyidawAsia676578.0
MontenegroPodgoricaEurope13812.0
MongoliaUlan BatorAsia1564110.0
Northern Mariana IslandsSaipanOceania464.0
MozambiqueMaputoAfrica801590.0
MauritaniaNouakchottAfrica1030700.0
MontserratPlymouthAmericas102.0
MartiniqueFort-de-FranceAmericas1128.0
MauritiusPort LouisAfrica2040.0
MalawiLilongweAfrica118484.0
MalaysiaKuala LumpurAsia330803.0
MayotteMamoudzouAfrica374.0
NamibiaWindhoekAfrica825615.0
New CaledoniaNouméaOceania18575.0
NigerNiameyAfrica1267000.0
Norfolk IslandKingstonOceania36.0
NigeriaAbujaAfrica923768.0
NicaraguaManaguaAmericas130373.0
NiueAlofiOceania260.0
NetherlandsAmsterdamEurope41850.0
NorwayOsloEurope323802.0
NepalKathmanduAsia147181.0
NauruYarenOceania21.0
New ZealandWellingtonOceania270467.0
OmanMuscatAsia309500.0
PakistanIslamabadAsia881912.0
PanamaPanama CityAmericas75417.0
Pitcairn IslandsAdamstownOceania47.0
PeruLimaAmericas1285216.0
PhilippinesManilaAsia342353.0
PalauNgerulmudOceania459.0
Papua New GuineaPort MoresbyOceania462840.0
PolandWarsawEurope312679.0
Puerto RicoSan JuanAmericas8870.0
North KoreaPyongyangAsia120538.0
PortugalLisbonEurope92090.0
ParaguayAsunciónAmericas406752.0
PalestineRamallahAsia6220.0
French PolynesiaPapeetēOceania4167.0
QatarDohaAsia11586.0
RéunionSaint-DenisAfrica2511.0
RomaniaBucharestEurope238391.0
RussiaMoscowEurope1.7098242E7
RwandaKigaliAfrica26338.0
Saudi ArabiaRiyadhAsia2149690.0
SudanKhartoumAfrica1886068.0
SenegalDakarAfrica196722.0
SingaporeSingaporeAsia710.0
South GeorgiaKing Edward PointAntarctic3903.0
Svalbard and Jan MayenLongyearbyenEurope-1.0
Solomon IslandsHoniaraOceania28896.0
Sierra LeoneFreetownAfrica71740.0
El SalvadorSan SalvadorAmericas21041.0
San MarinoCity of San MarinoEurope61.0
SomaliaMogadishuAfrica637657.0
Saint Pierre and MiquelonSaint-PierreAmericas242.0
SerbiaBelgradeEurope88361.0
South SudanJubaAfrica619745.0
São Tomé and PríncipeSão ToméAfrica964.0
SurinameParamariboAmericas163820.0
SlovakiaBratislavaEurope49037.0
SloveniaLjubljanaEurope20273.0
SwedenStockholmEurope450295.0
EswatiniLobambaAfrica17364.0
Sint MaartenPhilipsburgAmericas34.0
SeychellesVictoriaAfrica452.0
SyriaDamascusAsia185180.0
Turks and Caicos IslandsCockburn TownAmericas948.0
ChadN'DjamenaAfrica1284000.0
TogoLoméAfrica56785.0
ThailandBangkokAsia513120.0
TajikistanDushanbeAsia143100.0
TokelauFakaofoOceania12.0
TurkmenistanAshgabatAsia488100.0
Timor-LesteDiliAsia14874.0
TongaNuku'alofaOceania747.0
Trinidad and TobagoPort of SpainAmericas5130.0
TunisiaTunisAfrica163610.0
TurkeyAnkaraAsia783562.0
TuvaluFunafutiOceania26.0
TaiwanTaipeiAsia36193.0
TanzaniaDodomaAfrica945087.0
UgandaKampalaAfrica241550.0
UkraineKyivEurope603500.0
United States Minor Outlying IslandsAmericas34.2
UruguayMontevideoAmericas181034.0
United StatesWashington D.C.Americas9372610.0
UzbekistanTashkentAsia447400.0
Vatican CityVatican CityEurope0.44
Saint Vincent and the GrenadinesKingstownAmericas389.0
VenezuelaCaracasAmericas916445.0
British Virgin IslandsRoad TownAmericas151.0
United States Virgin IslandsCharlotte AmalieAmericas347.0
VietnamHanoiAsia331212.0
VanuatuPort VilaOceania12189.0
Wallis and FutunaMata-UtuOceania142.0
SamoaApiaOceania2842.0
YemenSana'aAsia527968.0
South AfricaPretoria, Bloemfontein, Cape TownAfrica1221037.0
ZambiaLusakaAfrica752612.0
ZimbabweHarareAfrica390757.0