TAILIEUCHUNG - Apress Pro Apache Struts with Ajax phần 3

Những ảnh hưởng của thiết kế API trên hiệu suất rất thực tế. Hãy xem xét các phương pháp getSize trong lớp . Quyết định rằng phương pháp này hiệu suất quan trọng là trả lại một ví dụ Kích thước, cùng với quyết định trường hợp Kích thước thay đổi, các lực lượng thực hiện bất kỳ phương pháp này | 84 CHAPTER 3 FORM PRESENTATION AND VALIDATION WITH STRUTS Checks to make sure field being checked is not null private void checkForEmpty String fieldName String fieldKey String value ActionErrors errors if .length 0 ActionError error new ActionError fieldName fieldKey error Checks to make sure the field being checked does not violate our vulgarity list private void checkForVulgarities String fieldName String fieldKey String value ActionErrors errors VulgarityFilter filter if value ActionError error new ActionError fieldName fieldKey error Checks to make sure the field in question does not exceed a maximum length private void checkForLength String fieldName String fieldKey String value int maxLength ActionErrors errors if .length maxLength ActionError error new ActionError fieldName fieldKey error public ActionErrors validate ActionMapping mapping HttpServletRequest request ActionErrors errors new ActionErrors checkForEmpty Story Title getStoryTitle errors checkForEmpty Story Intro getStoryIntro errors checkForEmpty Story Body getStoryBody errors checkForVulgarities Story Title getStoryTitle errors CHAPTER 3 FORM PRESENTATION AND VALIDATION WITH STRUTS 85 checkForVulgarities Story Intro getStoryIntro errors checkForVulgarities Story Body getStoryBody errors checkForLength Story Title getStoryTitle 100 errors checkForLength Story Intro getStoryIntro 2048 errors checkForLength Story Body getStoryBody 10000 errors return errors @see reset public void reset .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.