Changeset 686

Show
Ignore:
Timestamp:
05/31/07 19:07:44 (2 years ago)
Author:
yuanying
Message:

Bug is fixed, applyAction and removeAction has been null.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.jalcedo.client.examples/trunk/org.jalcedo.client.examples.rails/src/org/jalcedo/client/examples/rails/ProjectComponentsFactory.java

    r684 r686  
    125125        if (key == ProjectApplyAction.class) { 
    126126            if (applyAction == null) { 
    127             ProjectApplyAction applyAction = new ProjectApplyAction(); 
     127            applyAction = new ProjectApplyAction(); 
    128128            applyAction.setDataSource((ProjectDataSource) this.getComponent(DataSource.class)); 
    129129            } 
     
    132132        if (key == ProjectRemoveAction.class) { 
    133133            if (removeAction == null) { 
    134             ProjectRemoveAction removeAction = new ProjectRemoveAction(); 
     134            removeAction = new ProjectRemoveAction(); 
    135135            removeAction.setDataSource((ProjectDataSource) this.getComponent(DataSource.class)); 
    136136            } 
    137137            return removeAction; 
    138138        } 
    139         return null; 
    140     } 
    141      
    142     private static ProjectComponentsFactory FACTORY = new ProjectComponentsFactory(); 
    143      
    144     public static ProjectComponentsFactory getFactory() { 
    145         return FACTORY; 
     139        throw new RuntimeException("No Component is found."); 
    146140    } 
    147141} 
  • org.jalcedo.client.examples/trunk/org.jalcedo.client.examples.rails/src/org/jalcedo/client/examples/rails/views/project/ProjectView.java

    r684 r686  
    2222        parent.setLayout(new GridLayout()); 
    2323         
    24         ProjectComponentsFactory factory = ProjectComponentsFactory.getFactory(); 
     24        ProjectComponentsFactory factory = new ProjectComponentsFactory(); 
    2525         
    2626        final ProjectListComposite listComposite = createListComposite(parent, factory);