Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    editSelectedData problem

    Hello,

    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();
    			}
    			
    		});
    		
    	}
    	
    
    }
    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.

    #2
    My apologize for the up but this problem is important and if someone has the answer that would be a great help.

    Comment


      #3
      Can you try the latest from SVN. This is pretty basic and an equivalent interaction is shown in the pattern reuse sample.

      Comment

      Working...
      X