At line 164 changed 1 line. |
public void testSearch() throws Exception { |
public void testSearch() { |
At line 171 removed 1 line. |
|
At line 208 changed 1 line. |
throws Exception { |
throws Exception { |
At line 213 removed 2 lines. |
PersonForm personForm = (PersonForm) form; |
|
At line 217 changed 2 lines. |
List persons = mgr.getPersons(convert(personForm)); |
request.setAttribute(Constants.PERSON_LIST, persons); |
List people = mgr.getPeople(null); |
request.setAttribute(Constants.PERSON_LIST, people); |
At line 233 changed 1 line. |
Let's create the JSP to hold our list and a Tile's definition for it. The easiest way to do this is to use the JSPGen Tool to generate a basic list screen for us. To do this from the command-line, navigate to extras/jspgen and run __ant -Dform.name=PersonForm__. This will generate a PersonFormList.jsp in extras/jspgen/build. |
Let's create the JSP to hold our list and a Tile's definition for it. There should already be a personList.jsp in the ''web'' folder of your project. Copy this file to web/pages/personList.jsp. If it's not there, you can use the ViewGen Tool to create it. To do this from the command-line, navigate to extras/viewgen and run __ant -Dform.name=PersonForm__. This will generate a PersonFormList.jsp in extras/viewgen/build. |
At line 235 changed 1 line. |
Copy PersonFormList.jsp to web/pages/personList.jsp and open it for editing. |
Once personList.jsp exists in ''web/pages'', open it for editing. |
At line 237 changed 1 line. |
At the top of the file is a <bean:struts> tags that exposes the edit screen's forward as a page-scoped variable. This should already have a value of "editPerson". |
At the top of the file is a <bean:struts> tags that exposes the edit screen's forward as a page-scoped variable. This should already have a value of "editPerson". |
At line 249 changed 2 lines. |
<forward name="editPerson" path="/editPerson.do"/> |
<forward name="viewPeople" path="/editPerson.do?action=Search"/> |
<forward name="editPerson" path="/editPerson.html"/> |
<forward name="viewPeople" path="/editPerson.html?action=Search"/> |
At line 253 removed 2 lines. |
;:''You'll notice that I'm hardcoding the "action=''$button.name''" into the forwards. This kindof defeats the purpose of i18n and will cause other languages to fail when trying to use these forwards. A possible solution would be to use the Actions and the keys from ApplicationResources.properties to compose the URLs. Since I haven't used AppFuse to develop an application that required any languages other than English, I haven't been inclined to fix this. Solutions to this problem are encouraged!'' |
|
At line 266 changed 2 lines. |
<display:column property="id" sort="true" |
headerClass="sortable" |
<display:column property="id" sort="true" headerClass="sortable" |
At line 271 changed 1 line. |
;:''If anyone knows of a way to modify the extras/jspgen/src/DisplayTagList_jsp.xdt to not include this column tag, please let me know.'' |
;:''If anyone knows of a way to modify the extras/viewgen/src/List_jsp.xdt to not include this column tag, please let me know.'' |
At line 295 changed 1 line. |
Finally, we need to add these keys (personList.title and personList.heading) to web/WEB-INF/classes/ApplicationResources.properties. Open this file and add the following: |
Finally, we need to add these keys (personList.title and personList.heading) to web/WEB-INF/classes/ApplicationResources_en.properties. Open this file and add the following: |
At line 300 changed 1 line. |
personList.heading=All Persons |
personList.heading=All People |
At line 334 changed 1 line. |
text=".*$(mainMenu.title}.*" regex="true"/> |
text=".*$(mainMenu.title}.*" regex="true"/> |
At line 355 changed 2 lines. |
<invoke description="click View People link" |
url="/editPerson.do?action=Search"/> |
<invoke description="click View People link" url="/editPerson.html?action=Search"/> |
At line 391 changed 1 line. |
Where ''menu.viewPeople'' is an entry in web/WEB-INF/classes/ApplicationResources.properties. |
Where ''menu.viewPeople'' is an entry in web/WEB-INF/classes/ApplicationResources_en.properties. |