jeudi 11 février 2016

Java ee web: how to deal with several controller

I'm new in java ee web and i use MVC pattern to build my application. I want your help.

Imagine this scenario:

1. Controller items

  1. Model items (extract all items from database)
  2. View items

4. Controller item detail

  1. Model item detail (extract a specific item with an id)
  2. View item detail

What i want

Actually I'm stopped because I don't know how to make a controller to dispatch the treatment to other controller.

Using the previous scenario, i want to build a dispatcher or a special controler to drives my controllers.

This dispatcher must call the 1.Controller items. The called controller provide a list of all item with a checkbox to permit selection of one item. The dispatcher receive the answer from the 1.Controller items and call the 4.Controller item detail. The called controller provide a detail for one item.

Thanks to help me




Aucun commentaire:

Enregistrer un commentaire