Search This Blog

Thursday, June 18, 2009

Include a Link Below in OIM on left panel

Menu link is retrieved from the database through the menu items created from design console
example:
(Form Information screen):
Class Name: My Menu.Menu 1
Description: My Menu Menu 1
Type: menuitem
- On the UI, the menus are grouped and the names globalized from the corresponding entries in xlWebAdmin.properties file
menuGroup.My-Menu=My Menu
menuItem.My-Menu.Menu-1=Menu 1


- /pages will have a new jsp page added with a 'tiles:insert' definition code for the entry
example: (/pages/SamplePage.jsp)
<%@ taglib uri="/WEB-INF/tld/struts-tiles.tld" prefix="tiles" %>
- tiles-defs.xml will have an entry with the definition name, referring to the definition code defined in the /pages jsp code
- The 'title' can have a code with a corresponding entry in the xlWebAdmin.properties file. This will be the title shown on the web page title bar
- The 'body' will refer to a jsp page to be created in the /tiles folder
example:
In tiles-defs.xml:






In xlWebAdmin.properties:
samplepage.title.showpage=Sample Page Title - A new jsp to be added to /tiles folder with the name used in the tiles-defs.xml entry
example: /tiles/SamplePageTiles.jsp
- struts-config.xml file will have two entries:
- one for form bean in the section, that will have the bean properties required to store data for the logic in the new functionality to be added.
example:
type="com.thortech.xl.webclient.actions.SampleForm" /> - one for the action class in the section, that is used for performing all the java logic before forwarding to a jsp page with the display contents.
example:
type="com.thortech.xl.webclient.actions.SampleAction"
validate="false"
input="/pages/SamplePage.jsp"
scope="session"
path="/sample"
parameter="method">



- In the xlDefaultAdmin.properties file put an entry that will be used to forward to the corresponding method in the java class:
- menuItem.My-Menu.Menu-1.link=sample.do?methodCode

- In the xlWebAdmin.properties file put the entry with the value as the one defined after '?' in previous step:
- sample.message.selection.method1=methodCode
- In the custom action class have the struts documented standard method getKeyMethodMap() with the following content:
Map methodMap = super.getKeyMethodMap(); methodMap.put("sample.message.selection.method1", "method1");
- Define the method with the name as 'method1()' and put the logic and the forward in that.

No comments:

Post a Comment