If you want to use a Map and display it in a Datatable there's no 
difference from using an Object in Wicket. 

You access the key/values using PropertyColumn as usual (i.e. you don't 
really need to make any changes to your code). For Objects you use e. g. 
"name" for the getName() method. When using Maps "name" will return the 
value corresponding to the key "name".




> Can you give me an example, how i can use ResultSet transformed into
> Map with for example datatable component?
> I think i can write method transforming ResultSet to a Map.
> 
> I do not want to use any ORM, because web tier for my app is just
> "control panel" and main features implemented in the backend.

> You want to swim without getting wet. Fine :)

> public class MyMilkFactory {
>                public List<Milk> provideHoneyObjects() {
>                                // iterate over sql statement/REsultSet
>                               Milk milk = createMilk(rs);
>               Honey honey provideHoney(rs.getInteger("honeyid"));
> 
>                }
>
>                public Milk createMilk(ResultSet rs) { // do not use an 
OR/mapper here 
> but do the dirty work on your own}
>
>                public Honey provideHoney(int id) {//read from database, 
again do the 
> dirty work on your own }
>}

Reply via email to