Index: main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser.py	(revision 12066)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser.py	(revision 12067)
@@ -41,4 +41,7 @@
     FriendlyDatetimeDisplayWidget)
 from waeup.ikoba.browser.breadcrumbs import Breadcrumb
+from waeup.ikoba.browser.pages import (
+    delSubobjects, add_local_role, del_local_roles, msave,
+    LocalRoleAssignmentUtilityView)
 
 from waeup.ikoba.products.interfaces import (
@@ -71,10 +74,11 @@
     grok.name('index')
     grok.require('waeup.Public')
-    #grok.template('containerpage')
+    grok.template('containerpage')
     pnav = 1
     label = _('Products')
 
 
-class ProductsContainerManageFormPage(IkobaEditFormPage):
+class ProductsContainerManageFormPage(IkobaEditFormPage,
+                                      LocalRoleAssignmentUtilityView):
     """The manage page for customer containers.
     """
@@ -82,7 +86,43 @@
     grok.name('manage')
     grok.require('waeup.manageProducts')
-    #grok.template('containermanagepage')
+    grok.template('containermanagepage')
     pnav = 1
     label = _('Manage product section')
+
+    taboneactions = [_('Save'),_('Cancel')]
+    tabtwoactions = [_('Add product'), _('Remove selected'),_('Cancel')]
+    tabthreeactions1 = [_('Remove selected local roles')]
+    tabthreeactions2 = [_('Add local role')]
+
+    @jsaction(_('Remove selected'))
+    def delDepartments(self, **data):
+        if not checkPermission('waeup.managePortal', self.context):
+            self.flash(_('You are not allowed to remove products.'),
+                       type='danger')
+            return
+        delSubobjects(self, redirect='@@manage', tab='2')
+        return
+
+    @action(_('Save'), style='primary')
+    def save(self, **data):
+        return msave(self, **data)
+
+    @action(_('Cancel'), validator=NullValidator)
+    def cancel(self, **data):
+        self.redirect(self.url(self.context))
+        return
+
+    @action(_('Add product'), validator=NullValidator)
+    def addSubunit(self, **data):
+        self.redirect(self.url(self.context, '@@addproduct'))
+        return
+
+    @action(_('Add local role'), validator=NullValidator)
+    def addLocalRole(self, **data):
+        return add_local_role(self,3,**data)
+
+    @action(_('Remove selected local roles'))
+    def delLocalRoles(self, **data):
+        return del_local_roles(self,3,**data)
 
 
@@ -101,7 +141,16 @@
         product = createObject(u'waeup.Product')
         self.applyData(product, **data)
-        self.context.addProduct(product)
-        self.flash(_('Product created.'))
-        self.redirect(self.url(self.context[product.product_id], 'index'))
+        try:
+            self.context.addProduct(product)
+        except KeyError:
+            self.flash(_('The Id chosen already exists.'),
+                       type='danger')
+            return
+        self.flash(
+            _("Product ${a} added.", mapping = {'a':data['product_id']}))
+        ob_class = self.__implemented__.__name__.replace('waeup.ikoba.','')
+        self.context.__parent__.logger.info(
+            '%s - added: %s' % (ob_class, data['product_id']))
+        self.redirect(self.url(self.context, u'@@manage')+'#tab2')
         return
 
@@ -122,5 +171,6 @@
 
 
-class ProductManageFormPage(IkobaEditFormPage):
+class ProductManageFormPage(IkobaEditFormPage,
+                            LocalRoleAssignmentUtilityView):
     """ View to manage product data
     """
@@ -128,6 +178,29 @@
     grok.name('manage')
     grok.require('waeup.manageProducts')
-    form_fields = grok.AutoFields(IProduct)
-    #grok.template('basemanagepage')
-    label = _('Manage product')
-    pnav = 1
+    form_fields = grok.AutoFields(IProduct).omit('product_id')
+    grok.template('productmanagepage')
+    pnav = 1
+
+    taboneactions = [_('Save'),_('Cancel')]
+    tabtwoactions1 = [_('Remove selected local roles')]
+    tabtwoactions2 = [_('Add local role')]
+
+    def label(self):
+        return _('Manage product ') + self.context.product_id
+
+    @action(_('Save'), style='primary')
+    def save(self, **data):
+        return msave(self, **data)
+
+    @action(_('Cancel'), validator=NullValidator)
+    def cancel(self, **data):
+        self.redirect(self.url(self.context))
+        return
+
+    @action(_('Add local role'), validator=NullValidator)
+    def addLocalRole(self, **data):
+        return add_local_role(self,2,**data)
+
+    @action(_('Remove selected local roles'))
+    def delLocalRoles(self, **data):
+        return del_local_roles(self,2,**data)
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containermanagepage.pt
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containermanagepage.pt	(revision 12067)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containermanagepage.pt	(revision 12067)
@@ -0,0 +1,126 @@
+<form action="." tal:attributes="action request/URL"
+  i18n:domain="waeup.ikoba" method="POST" enctype="multipart/form-data">
+  <ul class="tabs nav nav-tabs" data-tabs="tabs">
+    <li class="active">
+    <a href="#tab1" data-toggle="tab">
+      <span i18n:translate="">Settings
+      </span></a>
+    </li>
+    <li>
+    <a href="#tab2" data-toggle="tab">
+      <span i18n:translate="">Products
+      </span> </a>
+    </li>
+    <li>
+    <a href="#tab3" data-toggle="tab">
+      <span i18n:translate="">Local Roles
+      </span></a>
+    </li>
+  </ul>
+  <div class="tab-content">
+    <div id="tab1" class="active tab-pane">
+      <table class="form-table">
+        <tbody>
+          <tal:widgets content="structure provider:widgets" />
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.taboneactions"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div>
+    </div>
+    <div id="tab2" class="tab-pane">
+      <h3 i18n:translate="">Products</h3>
+      <table class="ikoba-data-table dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th i18n:translate="">Product Id
+            </th>
+            <th i18n:translate="">Title
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="prod context/values"> <td>
+              <input type="checkbox" name="val_id"
+                     tal:attributes="value prod/product_id" /> </td> <td>
+              <a tal:attributes="href python: view.url(prod)"
+                 tal:content="prod/__name__"> ID</a> </td> <td>
+              <span tal:content="prod/title">TITLE
+              </span> </td>
+          </tr>
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.tabtwoactions"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div>
+    </div>
+    <div id="tab3" class="tab-pane"> <br />
+      <table class="ikoba-data-table dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th i18n:translate="">User Id
+            </th>
+            <th i18n:translate="">Name
+            </th>
+            <th i18n:translate="">Local Role
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="entry view/getUsersWithLocalRoles">
+            <td>
+              <input type="checkbox" name="role_id"
+              tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
+            <td tal:content="entry/user_name"> USERNAME </td>
+            <td tal:content="entry/user_title"> USERTITLE </td>
+            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
+          </tr>
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.tabthreeactions1"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div><br /><br />
+      <div class="form-inline">
+        <br />
+        <div class="form-group">
+          <select id="user" name="user" class="form-control">
+            <option tal:repeat="user view/getUsers"
+                    tal:attributes="value user/name">
+            <span tal:replace="user/val/title">USERTITLE
+            </span>
+            </option>
+          </select>
+        </div>
+        <div class="form-group">
+          <select id="local_role" name="local_role" class="form-control">
+            <option tal:repeat="localrole view/getLocalRoles"
+                    tal:attributes="value localrole/name">
+            <span tal:replace="localrole/title">LOCALROLETITLE
+            </span>
+            </option>
+          </select>
+        </div>
+        <div class="form-group" tal:condition="view/availableActions">
+          <span tal:repeat="action view/actions" tal:omit-tag="">
+            <input tal:condition="python:action.label in view.tabthreeactions2"
+                   tal:replace="structure action/render"/>
+          </span>
+        </div>
+      </div>
+
+    </div>
+  </div>
+</form>
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containerpage.pt
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containerpage.pt	(revision 12067)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/containerpage.pt	(revision 12067)
@@ -0,0 +1,19 @@
+<div i18n:domain="waeup.ikoba" i18n:translate="" tal:condition="python: not len(context.keys())">
+There are no subobjects registered yet.
+</div>
+
+<table class="ikoba-data-table dataTable" i18n:domain="waeup.ikoba">
+  <thead>
+    <tr>
+      <th i18n:translate="">Product Id</th>
+      <th i18n:translate="">Title</th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr tal:repeat="value context/values">
+      <td> <a tal:attributes="href python: view.url(value)">
+          <span tal:content="value/product_id">ID</span></a></td>
+      <td tal:content="value/title">TITLE</td>
+    </tr>
+  </tbody>
+</table>
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/productmanagepage.pt
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/productmanagepage.pt	(revision 12067)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser_templates/productmanagepage.pt	(revision 12067)
@@ -0,0 +1,90 @@
+<form action="." tal:attributes="action request/URL" method="POST"
+      enctype="multipart/form-data" i18n:domain="waeup.ikoba">
+
+  <ul class="tabs nav nav-tabs" data-tabs="tabs">
+    <li class="active">
+      <a href="#tab1" data-toggle="tab" i18n:translate="">Settings</a>
+    </li>
+    <li>
+      <a href="#tab2" data-toggle="tab" i18n:translate="">Local Roles</a>
+    </li>
+  </ul>
+
+  <div class="tab-content">
+    <div id="tab1" class="tab-pane active">
+      <table class="form-table">
+        <tbody>
+          <tal:widgets content="structure provider:widgets" />
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions"
+              tal:omit-tag="">
+          <input tal:condition="python:action.label in view.taboneactions"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div>
+    </div>
+    <div id="tab2" class="tab-pane">
+      <br />
+      <table class="ikoba-data-table dataTableManage">
+        <thead>
+          <tr>
+            <th>&nbsp;
+            </th>
+            <th i18n:translate="">User Id
+            </th>
+            <th i18n:translate="">Name
+            </th>
+            <th i18n:translate="">Local Role
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          <tr tal:repeat="entry view/getUsersWithLocalRoles"> <td>
+            <input type="checkbox" name="role_id"
+                   tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
+            <td tal:content="entry/user_name"> USERNAME </td>
+            <td tal:content="entry/user_title"> USERTITLE </td>
+            <td tal:content="entry/local_role_title"> LOCAL ROLE </td>
+          </tr>
+        </tbody>
+      </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:condition="python:action.label in view.tabtwoactions1"
+                 tal:replace="structure action/render"/>
+        </span>
+      </div><br /><br />
+      <div class="form-inline">
+        <br />
+        <div class="form-group">
+          <select id="user" name="user" class="form-control">
+            <option tal:repeat="user view/getUsers"
+                    tal:attributes="value user/name">
+            <span tal:replace="user/val/title">USERTITLE
+            </span>
+            </option>
+          </select>
+        </div>
+        <div class="form-group">
+          <select id="local_role" name="local_role" class="form-control">
+            <option tal:repeat="localrole view/getLocalRoles"
+                    tal:attributes="value localrole/name">
+            <span tal:replace="localrole/title">LOCALROLETITLE
+            </span>
+            </option>
+          </select>
+        </div>
+        <div class="form-group">
+          <div tal:condition="view/availableActions">
+                <span tal:repeat="action view/actions" tal:omit-tag="">
+                  <input tal:condition="python:action.label in view.tabtwoactions2"
+                         tal:replace="structure action/render"/>
+                </span>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</form>
Index: main/waeup.ikoba/trunk/src/waeup/ikoba/products/viewlets.py
===================================================================
--- main/waeup.ikoba/trunk/src/waeup/ikoba/products/viewlets.py	(revision 12066)
+++ main/waeup.ikoba/trunk/src/waeup/ikoba/products/viewlets.py	(revision 12067)
@@ -62,13 +62,4 @@
 
 
-class AddProductActionButton(AddActionButton):
-    grok.order(1)
-    grok.context(IProductsContainer)
-    grok.view(ProductsContainerManageFormPage)
-    grok.require('waeup.manageProducts')
-    text = _('Add product')
-    target = 'addproduct'
-
-
 class ProductViewActionButton(ManageActionButton):
     grok.order(1)
