2010-06-01 22 views

回答

0

好吧,一個解決方案可能使用JSNI。你會寫一個本地的js方法來獲取你的單元格(像document.getElementsByTagName),然後使用純js爲它分配一個id。

我不確定在GWT中是否有某種TableCell類(我相當有信心) - 你可以嘗試setAttribute方法。

0

使用.getElement()。setAttribute(「attribute」,「value」)設置屬性時,您總是可以繞過GWT限制。

0

您可以使用此:

FlexTable ft=new FlexTable(); 
ft.setWidget(5, 5, new Label()); 
ft.getCellFormatter().getElement(5, 5).setId("containerArea"); 
0

像這樣: getElement().setAttribute("id", "elementId");