Code Monkey home page Code Monkey logo

Comments (4)

axls avatar axls commented on September 27, 2024

Make sure that the table is attached (by adding in parent container, for example) before calling table.addColumn.

from gwt-material-table.

drmzperx avatar drmzperx commented on September 27, 2024

I use the following uibuider code:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:m="urn:import:gwt.material.design.client.ui"
xmlns:combobox="urn:import:gwt.material.design.addins.client.combobox"
xmlns:w="urn:import:com.xunox.sewicowebapp.client.widgets"
xmlns:m.table='urn:import:gwt.material.design.client.ui.table'>

<m:MaterialContainer ui:field="content">
	<m:MaterialRow>
		<m:MaterialColumn grid="s12 m6 l4">
			<combobox:MaterialComboBox ui:field="cbLocation" />
		</m:MaterialColumn>
		<m:MaterialColumn grid="s12 m6 l4">
			<combobox:MaterialComboBox ui:field="cbSensorType" />
		</m:MaterialColumn>
	</m:MaterialRow>
	<m:MaterialRow ui:field="rowTable" />
	<g:HTMLPanel>
	    <m.table:MaterialDataTable ui:field="table"
                           shadow="1"
                           height="calc(100vh - 131px)"
                           useStickyHeader="true"
                           useCategories="false"
                           useRowExpansion="true"
                           selectionType="SINGLE"/>
    </g:HTMLPanel>
</m:MaterialContainer>

</ui:UiBinder>

and in java code bind the table with

@UiField
MaterialDataTable<Person> table;

command.

After run the web app the table main header show correctly, but get an error see earlier and the generated data (the same as demo) are not shown.

from gwt-material-table.

axls avatar axls commented on September 27, 2024

I think you have to move table initialization code (table.addColumn and so on) in overrided onLoad method of the DashboardTableView.

from gwt-material-table.

drmzperx avatar drmzperx commented on September 27, 2024

I use mvp4gwt framework, and when I change the table initialization from view to presenter after call the:

view.asWidget()

method the table fill the data correctly. So you right, thank your help!

from gwt-material-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.