Hello,
I have an error in some popup windows used to update data. It's not a
systematic (!) error but not so difficult to produce in my
environnement with a popup panel displaying some enabled or disabled
textbox, listbox and a close button. I only display data (using
setText, setEnabled, setFocus). The RPC method used to update data
exist in my dialog but is not invoked.
JS code line in error (pretty mode) is :
function is(o){
if (o.nodeType) { // ERROR => in french "objet requis"
return o.nodeType == 1;
}
return false;
}
may be a call from "function $eventTargetsPopup(this$static,
event_0)"
The message "objet requis" (required object) let me think that o is
null or is not a valid object.
There's no problem using the same code with Opera or Firefox. The
"same" application (before updating to GWT 1.6, mainly replacing
listeners) seems to works fine with IE and GWT 1.5
The application is quite big and its not easy to extract a sniplet.
This is an extract to give an idea of my code:
public class UserPanel extends GPanelDialog {
// this is a widget with a Label + Textbox in a horizontal panel
private GTextBox editKey = new GTextBox(Dico.txt.userUid(), 0, 1,
false);
private GTextBox editNick = new GTextBox(Dico.txt.userNickname());
private GListBox listTeam = new GListBox(Dico.txt.userTeam(), 1);
...
private User user;
public UserPanel (User user) {
this.user = user;
String title = Dico.msg.userMsg06();
GPanel panelDetail = getGPanel();//new VerticalPanel();
panelDetail.setSpacing(1);
panelDetail.add(editKey;
panelDetail.add(editFirstName, editLastName); // Create an
Hor.Panel with multiples objects
panelDetail.add(editMail);
...
for (Team team : AC.getInstance().getTeamList()) {
listTeam.getListBox().addItem(team.getLabel());
}
// User Data
displayData();
setEditing(true);
OkCancelToolbar vToolBar = new OkCancelToolbar
(AC.BAR_BACKGROUND, new OkCancelListener() {
public void doOkCancel(int btnCode) {
if (btnCode==OkCancelToolbar.BTN_CANCEL)
onCancel();
else if (btnCode==OkCancelToolbar.BTN_OK)
onValidate();
}
}, status);
vToolBar.setWidth("100%");
vToolBar.setHeight("32px");
panelDetail.add(vToolBar);
}
private void displayData () {
editKey .setText(user.getUid());
editFirstName.setText(user.getFirstName());
editMail.setText(user.getEmail());
...
}
public void udateUserData () {
user.setUid(editKey.getText());
...
}
public void setEditing(boolean isEditing) {
editKey .setEnabled(false);
editFirstName .setEnabled(isEditing);
listTeam.getListBox().setEnabled(isEditing);
...
}
public void onValidate() {
if (status==OkCancelToolbar.STATUS_DISPLAY) {
}
else if (status==OkCancelToolbar.STATUS_UPDATE) {
udateUserData();
AC.getInstance().getArchiServiceAsync().updateUser
(AC.getInstance().getSessionTag(), user, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
AC.getInstance().displayError(caught);
}
public void onSuccess(Void result) {
AC.getInstance().onUpdateBzEntity(user,
OkCancelToolbar.STATUS_CREATE);
}
});
}
hide();
}
/** Annulation */
public void onCancel() {
hide();
}
@Override
public void center() {
super.center();
editFirstName.setFocus(true);
}
//@Override
public boolean onKeyDownPreview(char key, int modifiers) {
switch (key) {
case KeyCodes.KEY_ENTER:
onValidate();
break;
case KeyCodes.KEY_ESCAPE:
onCancel();
break;
}
return true;
}
}
Thanks for help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---