Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363029

Summary: Multiple tables with same column name in one form
Product: z_Archived Reporter: Ivan Motsch <ivan.motsch>
Component: ScoutAssignee: Andreas Hoegger <Andreas.Hoegger>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Andreas.Hoegger, zimmermann
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ivan Motsch CLA 2011-11-07 04:33:51 EST
When i create a form with two tables as follows using sdk

TestForm{

  DrugTableField<DrugTableField.Table>{
    Table{
        
       public SampleUidColumn getSampleUidColumn(){
         return getColumnSet().getColumnByClass(SampleUidColumn.class);
       }

       SampleUidColumn{
       }
       ...
    }
  }

  ComponentTableField<ComponentTableField.Table>{
    Table{

       public SampleUidColumn getSampleUidColumn(){
         return getColumnSet().getColumnByClass(SampleUidColumn.class);
       }

       SampleUidColumn{
       }
       ...
    }
  }

}

Then the getters getSampleUidColumn yield the same column, since the import to the single name SampleUidColumn.class is ambiguous.

Solution:
If the sdk would qualify the column names in the getter method same as the genric in the table field, that scenario would work in any constellations.


so it would be 

       public SampleUidColumn getSampleUidColumn(){
         return getColumnSet().getColumnByClass(DrugTableField.Table.SampleUidColumn.class);
       }
and
       public SampleUidColumn getSampleUidColumn(){
         return getColumnSet().getColumnByClass(ComponentTableField.Table.SampleUidColumn.class);
       }


instead of:

       public SampleUidColumn getSampleUidColumn(){
         return getColumnSet().getColumnByClass(SampleUidColumn.class);
       }
and
       public SampleUidColumn getSampleUidColumn(){
         return getColumnSet().getColumnByClass(SampleUidColumn.class);
       }
Comment 1 Andreas Hoegger CLA 2011-11-07 07:41:14 EST
Since the getter and the inner class (Column) is on the same level SDK does not create any import declaration for the column type. The content assist of a type declaration does come up with all columns.
Comment 2 Ivan Motsch CLA 2011-11-07 07:56:47 EST
(In reply to comment #1)
> Since the getter and the inner class (Column) is on the same level SDK does not
> create any import declaration for the column type. The content assist of a type
> declaration does come up with all columns.



Thanks, that solves my issue.
Comment 3 Matthias Zimmermann CLA 2012-02-29 07:13:40 EST
shipped with eclipse scout 3.7.2 (indigo sr2)