Monday, October 24, 2011

SelectionCell problem

Hi i have some problem with SelectionCell class....

here is my code

//////////////////////////////////////////////////////////

List<String> ptNames = new ArrayList<String>();
for (PaymentType pt : PaymentType.values()) {
ptNames.add(pt.toString());
}
SelectionCell ptCell = new SelectionCell(ptNames);
Column<Operation, String> ptColumn = new Column<Operation,
String>(ptCell) {
@Override
public String getValue(Operation object) {
return object.getPaymentType().toString();
}
};
accountingTable.addColumn(ptColumn,
Resourcei18n.constants.paymentStatus());
ptColumn.setFieldUpdater(new FieldUpdater<Operation, String>() {
public void update(int index, Operation object, String value) {
for (PaymentType pt : PaymentType.values()) {
if (pt.toString().equals(value)) {
object.setPaymentType(pt);
}
}
// server side refresh :D
}
});

//////////////////////////////////////////////////////////

but it doesn' t work when i try to render the table it doesn't appear
pls help me :(

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate