Java Reference
In-Depth Information
Figure 11-13.
11.
After the getEmp end tag, add the insEmp start and end tags and save the file.
The
if
and custom tags should look like the following:
<c:if test='${pageContext.request.method=='POST'}'>
<TNT:getEmp>
</TNT:getEmp>
<TNT:insEmp></TNT:insEmp>
</c:if>
As with most tags, the custom tags can be specified even more simply as follows:
<TNT:getEmp/> <TNT:insEmp/>
The last modification needed is to add a new state (IN) to all the state drop-down menus throughout the
application. If the state drop-down menu had been defined directly in multiple JSPs, all the JSPs would have to be
modified. Because the state drop-down menu is a custom visual component (implemented with custom tags), making
this application-wide change means simply updating the tag handler.
12.
In TNTStateDDM, add the value IN (for Indiana) to the array definition so that IN appears
after GA, and then save the file.