At line 26 changed 1 line. |
* Execute __ant -Dobject.name=Person -Dappgen.type=pojo__ to generate a bunch of files in extras/appgen/build/gen. In fact, it'll generate all the files you need to complete this tutorial. However, let's just grab the ones you need. |
* Execute __ant -Dobject.name=Person -Dappgen.type=pojo -Dapp.module=__ to generate a bunch of files in extras/appgen/build/gen. In fact, it'll generate all the files you need to complete this tutorial. However, let's just grab the ones you need. |
At line 102 changed 1 line. |
assertEquals(action.edit(), "success"); |
assertEquals("success", action.edit()); |
At line 116 changed 2 lines. |
assertEquals(action.save(), "input"); |
assertEquals(action.getPerson().getLastName(), "Updated Last Name"); |
assertEquals("input", action.save()); |
assertEquals("Updated Last Name", action.getPerson().getLastName()); |
At line 130 changed 1 line. |
assertEquals(action.delete(), "success"); |
assertEquals("success", action.delete()); |
At line 215 changed 1 line. |
There are a few keys you need to add to ApplicationResources.properties to display the success messages. This file is located in ''web/WEB-INF/classes'' - open it and add the following: |
There are a few keys you (might) need to add to ApplicationResources.properties to display the success messages. This file is located in ''web/WEB-INF/classes'' - open it and add the following: |
At line 232 changed 2 lines. |
<bean id="personAction" class="org.appfuse.webapp.action.PersonAction" singleton="false"> |
<property name="personManager"><ref bean="personManager"/></property> |
<bean id="personAction" class="org.appfuse.webapp.action.PersonAction" scope="prototype"> |
<property name="personManager" ref="personManager"/> |
At line 246 removed 1 line. |
<!--interceptor-ref name="validationStack"/--> |
At line 253 removed 2 lines. |
;:''The "validationStack" interceptor-ref is commented out in the above XML block because you haven't defined any validation rules for the Person object. We'll uncomment this value when we add validation in the next tutorial.'' |
|
At line 285 removed 15 lines. |
Now let's clean up the generated personForm.jsp by making the "id" property a hidden field. Remove the following code block from web/pages/personForm.jsp: |
|
[{Java2HtmlPlugin |
|
<ww:textfield label="getText('person.id')" name="'person.id'" |
value="person.id" required="true"/> |
}] |
|
And add the following before the <table> tag: |
|
[{Java2HtmlPlugin |
|
<ww:hidden name="'person.id'" value="person.id"/> |
}] |
|
At line 303 changed 1 line. |
document.forms["person"].elements["firstName"].focus(); |
Form.focusFirstElement(document.forms["personForm"]); |
At line 306 changed 1 line. |
Now if you execute __ant db-load deploy__, start Tomcat and point your browser to [http://localhost:8080/appfuse/editPerson.html?id=1], you should see something like this: |
Now if you execute __ant db-load deploy__, start Tomcat and point your browser to [http://localhost:8080/appfuse/editPerson.html?id=1], you should see something like this, with focus given to the first field in the form. |
At line 382 added 1 line. |
<prepareDialogResponse description="Confirm delete" dialogType="confirm" response="true"/> |
At line 384 added 1 line. |
<verifyNoDialogResponses/> |