Search code examples
smartgwt

how to create a custom formItem composed of 2 buttons and a table in smartgwt?


I want to create a formItem composed of 2 buttons (addButton, removeButton) and a table, the addButton adds a line to the table and the removeButtons removes the selected line.

Please Help.


Solution

  • The simplest when you want something special in a dynamicForm is to use the CanvasItem which allow you to "wrap" anything you like inside a formitem uniform. So in your case you can put a Layout (H or V) with the members you likeIButton, GridList, Label .... and set the Canvas of your CanvasItem to this Layout (setCanvas() method).