Java Reference
In-Depth Information
The Insert Custom Tag Window will be displayed with the TNT tag library URI displayed in the left pane and the
four TNT tags listed in the right pane.
23. Select delEmp, click the Insert button, and then the Close button.
In the Source view, notice that RAD added the following taglib directive and custom tags:
<%@taglib prefix="TNT uri=" http://www.tnt.com/taglib " %>
<TNT:delEmp></TNT:delEmp>
24.
In Design view, click Get Property and then click to the right of the custom tag.
25.
At the Insert JSP Get Property window, specify session as the Bean Type, EmpBean for the
bean name, empName as the Property name, and click the OK button.
26.
After the getProperty tag, add the text: has been deleted from the database.
Even though the employee information will be deleted from the database, the employee bean still exists.
Therefore, we can still retrieve the name of the employee that was deleted and display it in the deletion message.
We are now going to add the tax and salary amounts to the display page.
27.
In the Page Designer view of DisplayEmpInfoJSP, click on the last row of the table.
28.
In the Command Bar, click Table, and then Add Row Below.
There should now be two blank rows at the end of the table.
29.
Add the text Gross Salary: and Tax Amount: in the first column of the two blank rows and
format the text to match the existing table text.
30.
In the second column of the new rows, add the appropriate getProperty tags to display
EmpBean's gross amount and tax amount properties.
31.
In the Form Tags drawer, click on Submit button and then, in Page Designer, click beneath
the table.
32.
At the Insert Submit Button window, specify DeleteBtn as the name, Delete as the Label,
then click the OK button.
33.
Horizontally center the button.
34.
In the Forms Tag tray, click on Form then click before the first line of text. Cut and paste all
the page components into the form.
35.
In the Properties view, specify ConfirmEmpDel.jsp as the form action and the Method Post.
Page Designer and the Properties view should look like Figure 11-17 .
Search WWH ::




Custom Search