Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Customer {
- List<Adress> adresses;
- }
- class AdressDataProvider implements IDataProvider {
- public Iterator iterator() {
- Customer c = (Customer)Component.this.getModel(); // somehow get the customer model
- return c.getAdresses().iterator();
- }
- public IModel model(Object o) {
- Adress a = (Adress) o;
- // Return an LDM which loads the adress by id.
- return new AdressLoadableDetachableModel(a.getId());
- }
- }
Add Comment
Please, Sign In to add comment