I'm using a celltable and trying to send the register key when the user click in one item. My first doubt is about the correct way to send and get this value.
This the code to send the value
selectionModel
.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
Banco selected = selectionModel.getSelectedObject();
if (selected != null) {
History.newItem("RootPlace:banco/"+selected.getKey());
}
}
});
I'm getting the value in this way Window.Location.getHash().substring(Window.Location.getHash().indexOf("/")+1) as a string, that can't be cast to a key value
As you can see my doubt should be very stupid but I googled a lot and found nothing that could help me to solve the question.
I apologize if my question is very basic and appreciate any response or indication of page where I can find a way to solve my problem.
Thank's Sandney