GWT Grid How to add id table
as in Table Grid specify cell id = 开发者_开发问答""
well, one solution might be using JSNI. You would write a native js method that would get your cell (sth like document.getElementsByTagName) and then use pure js to assign it an id.
I'm not sure if there is some kind of TableCell class in GWT (I'm quite confident that there is) - you can try with setAttribute method.
You can always get around GWT limitation on setting attributes using .getElement().setAttribute( "attribute", "value" ).
You can use this:
FlexTable ft=new FlexTable();
ft.setWidget(5, 5, new Label());
ft.getCellFormatter().getElement(5, 5).setId("containerArea");
Like this:
getElement().setAttribute("id", "elementId");
精彩评论