Thursday, December 29, 2011

WSO2 Governance Registry-Configurable Governance Artifacts part-4

In my previous posts I discussed about how to add new meta data model. In this post I am going to discuss about how to add a menu item by adding a menu element to the registry extension file.

    governance_list_processes_menu                   
    List                                 
    org.wso2.carbon.event.mgt.ui.i18n.Resources 
    governance_processes_menu      
    ../generic/list.jsp                          
    key=process                      
    region3    
    1                                    
    manage                   
    ../images/list.gif                     
    /permission/admin/manage/resources/govern/processes/list


The menu definitions are standard to the Carbon Platform, and you can copy any generic menu configuration into this block. Given below is a simple description of the elements in above elements.

id - Menu identifier
i18n-key - Name for the new menu item appeared in the list get from the Resource.properties file for the given key
i18n-bundle - Place where you put the Resource.properties file
parent-menu - Parent menu
link - On click
url-params - Parameters parse on url
region - Which reagion this belongs
order - Appearance number in the list
style-class - CSS
icon - Icon
require-permission - User permission required to see the menu

However, if there is a specifying menu items to point to JSPs that have been specifically created for representing governance artifacts it need to be mindful of some parameters.

 1. ../generic/add_edit.jsp requires the parameters,
  • key, which has to be equal to artifactkey defined above.
  • lifecycleAttribute, which is the attribute used to define the lifecycle.
  • breadcrumb, which is the title of the breadcrumb link for the add_edit.jsp page.
2. ../generic/list.jsp requires key, which has to be equal to artifactkey defined in the registry extension file.
3. ../generic/configure.jsp requires the parameters,
  • key, which has to be equal to artifactkey defined in the registry extension file.
  • lifecycleAttribute, which is the attribute used to define the lifecycle.
  • breadcrumb, which is the title of the breadcrumb link for the configure.jsp page.
  • add_edit_region, the value of the region parameter of the add_edit.jsp page. This is same as the region which you'd specify in the menu definition that you'd use to create a link to the add_edit.jsp page.
  • add_edit_item, the value of the item parameter of the add_edit.jsp page. This is same as the menu id which you'd specify in the menu definition that you'd use to create a link to the add_edit.jsp page.
  •  add_edit_breadcrumb, which is the title of the breadcrumb link for the add_edit.jsp page.

No comments:

Post a Comment