/
How To Add A Legacy JSP Page Or Struts Action Class
How To Add A Legacy JSP Page Or Struts Action Class
- This instructions for a jsp page that belongs to the Admin tab. For example, the Add/Edit Lookup Option page. Start by downloading the source code that goes with this tutorial Obtain the basepage.jsp which has all the common features shared by all the pages under Admin tab. The base page will contain all the common layout up to the blue line under the main tabs.
- Replace the labels and form action with the ones defined in the configuration property file for your page.
- Open your mockup page in your favorite jsp page editor. Select the whole part right under the blue strip which is right under the main tabs.
- Select and copy that part then do New -> html file. Paste it into the page.
- Switch to view Source and copy the part in between the body of the page.
- Paste this part into your base page, right under this part
- Replace the html tags with your tags. Replace texts with mifoslabel and the names of the mifoslabel are defined in the configuration property file.
- Create an Action and ActionForm associated with the jsp page using the files
YourAction.java
andCollectionSheet.java
. Replace Your... with your actual file names and paths. - Add the security for your page in the method
getSecurity();
- Import
YourAction
to the fileActivityMapper
(in the folder framework/security/util) and in this class constructor add the lineparseActionSecurity(YourAction.getSecurity())
- Add the action and action form mapping in
*struts-config.xml
, or<form-bean name="youractionform" type="org.mifos.application.......struts.actionform.CollectionSheet"></form-bean>
Add action path for the form in the same file.
<action path="/yourAction" type="org.mifos.application........struts.action.YourAction" name="youractionform" parameter="method" input="/yourAction.do?method=validate" validate="true" scope="session"> <forward name="load_success" path="... " /> <forward name="load_success" path="... " /> <forward name="load_success" path="... " /> </action>``
- Add validation rules to
validation.xml
(META-INF folder) - If define new resource file add this line to
*-struts-config.xml
<!-- Your Story resources --> <message-resources key="yourStoryUIResources" parameter="org.mifos.application.....util.resources.YourUIResources" </message-resources>
Note that if the key is yourStoryUIResources
then you have to define the same in your resource file. For example, yourStoryUIResources.define=Define
From meonkeys Mon Jun 9 19:03:42 -0700 2008 From: meonkeys Date: Mon, 09 Jun 2008 19:03:42 -0700 Subject: database work Message-ID: <20080609190342-0700@mifos.org>
A database upgrade may also be necessary (if a new action is required).
, multiple selections available,