Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Column<vTO, vTO>
- createReissueButtonColumn(String columnName) {
- ActionCell<VolunteerTO> reListCell = new ActionCell<VTO>("Reissue",
- new ActionCell.Delegate<VTO>() {
- @Override
- public void execute(VTO object) {
- // code to be executed
- }
- })
- {
- @Override
- public void render(Cell.Context context,VTO value,SafeHtmlBuilder sb) {
- if(null != value.getStatus() && !"".equalsIgnoreCase(value.getStatus())) {
- super.render(context,value,sb);
- }
- }
- };
- Column<VTO, VTO> reListColumn = new Column<VTO, VTO>(reListCell) {
- @Override
- public VTO getValue(VTO object) {
- return object;
- }
- };
- reListColumn.setDataStoreName(columnName);
- reListColumn.setSortable(false);
- return reListColumn;
- }
- unitTable.addCellPreviewHandler(new Handler<Unit>() {
- @Override
- public void onCellPreview(CellPreviewEvent<Unit> event) {
- if ("click".equals(event.getNativeEvent().getType())) {
- if (event.getColumn() != myTable.getColumnIndex(reListColumn)) {
- // Check some condition. If necessary:
- event.setCanceled(true);
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement