Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363029 - Multiple tables with same column name in one form
Summary: Multiple tables with same column name in one form
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Andreas Hoegger CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-07 04:33 EST by Ivan Motsch CLA
Modified: 2021-08-19 11:11 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)