I have tried doing that.
My code is something like follows
public class EditPasswordTextCell extends EditTextCell {
@Override
protected void edit(Context context, Element parent, String value) {
setValue(context, parent, value);
InputElement input = getInputElement(parent);
input.setAttribute("type", "password"); //$NON-NLS-1$ //$NON-NLS-2$
input.focus();
input.select();
}
}
This brings up a password box when clicking on the cell. But after finished editing and the value shown in the column is in plain text. Then i decided to override the renderer methods. But most of the methods in EditTextCell class are private, so i ended up overriding
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
value = "******"; //$NON-NLS-1$
super.render(context, value, sb);
}
The above code works fine for first rendering and not for the subsequent.
Now the question arises, should i extend from EditTextCell or AbstractEditableCell?
Can anyone please help me in this?
On Friday, 17 August 2012 23:29:52 UTC+5:30, Juan Pablo Gardella wrote:
You must write a custom EditTextCell.
I have CellTable with password as one column. I want the password column to be editable.
I have used EditTextCell to make the password as editable, but the problem is, the password is shown as plain text.
As like we have PasswordTextBox, do we have any alternative for EditTextCell? or i need to write my own by extending EditTextCell?
Can anyone please help me in this?