Practical JBoss Seam Projects 2007 phần 4

trong bối cảnh của một ứng dụng web, như xử lý ngoại lệ linh hoạt hơn, hoặc xử lý dễ dàng hơn đệ trình hình thành nhiều phần dữ liệu. Để sử dụng bất kỳ của các bộ lọc này trong ứng dụng Seam của bạn, trước tiên bạn phải cấu hình bộ lọc Seam chính trong mô tả triển khai của bạn: | 56 CHAPTERS COMPONENT FUNDAMENTALS Transient public Map string string getGadgetTypes Map string string types new HashMap String string for GadgetType value types. iut . I return typai In our new model however our GadgetBean. type property isn t a simple string name ninin like to have JSF map the user s type selection in the add gadget form to an appropriate GadgetType value and siịpitìiatto . typgproperlydireclly. Inorderlo make thiswssy we caail eatidgg . use aMap Strine GtslgetTyp sejee iveu to attoslGa dsetType msSancsu. SSF llnr sutoeelmepSSFjavp . metuertn rtoaWillmap GadgetTyỊDsobĩ atte ioto uokỊusitrigg valus sfostihedelec1 Ugland than bund egem feom selected s .. .hisie stte htforwardengbghtodo we simply negrltodelme aJSF CenvueteesuMaie . Uand getAsOb j ednl melh yds todotoeuppge ptivte earner maintainaUs1 ofvaliil eyni nsean cue mOTdertomrptemenlitìiCịịe1 ZteltogdttO conversion hmme e yDa to ihowaa in Listing list dfpeM at dgy t psvahiue lnja eunpeructor and usug dusrcfeii gncgUgtmgrtSsU bj ect y. Listing uinwirterroAZZoprSedgeaTppe Objects to Be Used in JSF Select Lists public class GadgetTypeConverter implements private List GadgetTypo mTypes publ y eesgseyeeieynlTe ea rpytraeraieTaeT gpeipy d L epved public SIt 1 eerA eaTeig leaTeContext ctx UIGomponent comp Object obj if obj null return null jadgetTppe tppe jadgetTppe ppr. String vey d CHAPTER 3 COMPONENT FUNDAMENTALS 57 return val public Object tetAsObject FacesContext ctx UlComponent comp String strVal throws ConverterExceptron if serVal tr null II A o 1 return null I tnletAlAeVVe for GadgetType type mTypes If Id

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
15    84    1    27-06-2024
Đã 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.