Hey guys i am making a celltable of contacts and would like to add the functionality to upload a picture with each contact. How can I add a FileUpload button to the cell table?
Asked
Active
Viewed 184 times
1 Answers
0
You need a column that's ButtonCell
then set a FieldUpdater tat pops up your upload dialog
final ButtonCell buttonCell = new ButtonCell();
Column column = new Column<Row,String>(buttonCell)
{
@Override
public String getValue(Row object)
{
return (String) object.getCellValue(code);
}
};
column.setFieldUpdater(new FieldUpdater<Row, String>()
{
public void update(int index, Row row, String value)
{
//show upload dialog
}
}

Spiff
- 3,873
- 4
- 25
- 50