Hello,
Here is my problem :
First, that is the code.
Then that is the problem.
When I try to add an object, there is no problem.
When I try to modify an object, there is no problem.
But when I click on a line and then I try to add an object, nothing is done.
When I comment the line "form.editSelectedData()" the problem disappears.
Thank you very much.
Here is my problem :
First, that is the code.
Code:
/** * Classe point d'entrée. <br/> * La méthode <code>onModuleLoad()</code> est alors appelée. */ public class ClassProblem implements EntryPoint { /** * Point d'entrée de l'application. */ public void onModuleLoad() { VLayout main = new VLayout(); final ListGrid grid = new ListGrid(); grid.setWidth(600); grid.setHeight(200); grid.setAutoFetchData(true); final DynamicForm form = new DynamicForm(); IButton saveButton = new IButton("Sauver"); IButton newButton = new IButton("Nouveau"); DataSource dataSource = PersonnePhysiqueDS.getInstance(); grid.setDataSource(dataSource); form.setDataSource(dataSource); main.addMember(grid); main.addMember(form); main.addMember(saveButton); main.addMember(newButton); main.draw(); grid.addRecordClickHandler(new RecordClickHandler(){ public void onRecordClick(RecordClickEvent event) { form.clearValues(); form.editSelectedData(grid); } }); newButton.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { form.clearValues(); } }); saveButton.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { form.saveData(); form.clearValues(); } }); } }
When I try to add an object, there is no problem.
When I try to modify an object, there is no problem.
But when I click on a line and then I try to add an object, nothing is done.
When I comment the line "form.editSelectedData()" the problem disappears.
Thank you very much.
Comment