Directory

← Back

MyTableGenerator

Write small web applications faster and easier

Author

Rating

Popularity

<100

With the help of this addon you can have the following options:

  • Make your persisting class, put the proper annotations and let this addon do the rest

  • Ability to have different types of tables with or without searchability of each column

  • Edit, Delete row is there by default

  • Import, New and Export are also available on the bottom of the table

  • Search can be immediate or after clicking on the search button (depends on your taste)

Sample code

@SuppressWarnings("serial")
@Theme("mytablegeneratordemo")
public class MyDemoUI extends MyUI {

	@WebServlet(value = "/*", asyncSupported = true)
	@VaadinServletConfiguration(productionMode = false, ui = MyDemoUI.class)
	public static class Servlet extends VaadinServlet {
	}

	@Override
	protected void init(VaadinRequest request) {
		Page.getCurrent().setTitle("MyTableGeneratorDemo");
		
		VerticalLayout vl = new VerticalLayout();
		
		GenerateTableInPanel p = new GenerateTableInPanel(Country.class);
		p.setWidth("90%");
		vl.addComponent(p);
		
		vl.setComponentAlignment(p, Alignment.MIDDLE_CENTER);
		
		setSizeUndefined();
		setContent(vl);
	}

}
@Entity
@Table(name = "country", catalog = "mydemo", uniqueConstraints = @UniqueConstraint(columnNames = "name"))
@MyTable(caption = "Countries", popupCaption = "Country", height = 300)
public class Country implements java.io.Serializable {

	private static final long serialVersionUID = -9109914244009012874L;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private Integer id;
	
	@Column(name = "name", unique = true, nullable = false, length = 100)
	@MyEdit(caption = "Name")
	private String name;
	
	@Column(name = "population")
	@MyEdit(caption = "Population")
	private Integer population;

	@Temporal(TemporalType.DATE)
	@Column(name = "lastUpdate", length = 10)
	@MyEdit(caption = "Last Update")
	private Date lastUpdate;
	
	@Column(name = "year")
	@MyEdit(caption = "Year")
	private Integer year;

	
	public Country() {
	}

	public Country(String name, Integer population, Date lastUpdate, Integer year) {
		this.name = name;
		this.population = population;
		this.lastUpdate = lastUpdate;
		this.year = year;
	}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2013-07-12
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.0+
Browser
Firefox
Safari
Google Chrome
Internet Explorer

MyTableGenerator - Vaadin Add-on Directory

Write small web applications faster and easier MyTableGenerator - Vaadin Add-on Directory
With the help of this addon you can have the following options: - Make your persisting class, put the proper annotations and let this addon do the rest - Ability to have different types of tables with or without searchability of each column - Edit, Delete row is there by default - Import, New and Export are also available on the bottom of the table - Search can be immediate or after clicking on the search button (depends on your taste)
Online