tailieunhanh - Professional Java JDK 6 Edition 2007 phần 8

Sơ đồ trong hình 5-13 minh họa nơi mà biến đổi phù hợp với bức tranh lớn hơn của ứng dụng của phương thức actionPerformed () của lớp WeatherWatcher là nơi mà các dịch vụ Web thời tiết yêu cầu được bắt đầu. Bởi vì () được gọi, yêu cầu được non-blocking và bắt đầu trong một thread nền. | Chapter 10 EJB 3 and the Java Persistence API if removeitem null 0 for int i 0 i i try removing oid name oid removeitem i owners oid removeitem i catch Exception e String userSubmit submit if userSubmit null Add Draft Pick try adding oid name oid name owners oid name catch Exception e List allDraftPicks null try allDraftPicks catch Exception e Checks are used here in the JSP to ensure that the allDraftPicks list is populated with draft pick selections by the owner. If player items are discovered they will be added to the drop-down list display component. Note that both the draft pick name and position are concatenated with a pipe delimiter so both player attributes can be parsed above by the application for visual presentation in the owners list form method post action baseball table border 1 if allDraftPicks null 0 tr td colspan 2 No draft picks found. td tr else tr 515 Part II A Broad Understanding of Java APIs Tools and Techniques td select name draftpicks for int i 0 i i DraftPicks draftPicks DraftPicks i option value option select td tr tr td colspan 2 align center input type submit name submit value Add Draft Pick input type hidden name oid value oid td tr table form Lastly in this segment of the JSP component the owners draft pick list is rendered along with checkboxes that allow selections to be removed if warranted. The owners draft pick list is obtained from the owner reference procured from the lookup query form method post action baseball table tr bgcolor .