GWT in Practice phần 4

kiểm tra mã của bạn và chỉ cung cấp tuần tự cho các lớp học nơi bạn một cách rõ ràng cần nó. Giống nhưhỗ trợ một tập hợp các tùy chọn dòng lệnh hữu ích. Họ đang mô tả trong bảng-phong cách phong cáchHạn chế và hãy cẩn thận Rõ ràng, | 94 Chapter 4 Core Application Structure private PasswordTextBox password new PasswordTextBox private PasswordTextBox passwordconfirm new PasswordTextBox private TextBox firstName new TextBox private TextBox lastName new TextBox private TextArea notes new TextArea private AddressEdit billingAddress private AddressEdit shippingAddress public UserEdit final UserCreateListener controller final User user super user 350px VerticalPanel basePanel new VerticalPanel Button save new Button Save save Create Flexible stack to lay out basic FlexTable ft new FlexTable elements 0 0 new Label Username 0 1 username 1 0 new Label Password 1 1 password 2 0 new Label Confirm 2 1 passwordConfirm 3 0 new Label First Name 3 1 firstName 4 0 new Label Last Name 4 1 lastName ft User Information billingAddress new AddressEdit billingAddress Billing Address shippingAddress new AddressEdit shippingAddress Shipping Address 100 250px notes Notes Create AddressEdit classes for addresses basePanel In this example we are using our UserEdit class as a component in a larger edit view of the User model object. While the object graph contains other structured objects the Address classes the UserEdit class brings these together with the editors for the other portions of our model that we created individually. It also provides direct edit widgets for simple values directly on the User class. At first blush this looks very similar to the process we used in constructing the AddressEdit class but it is actually a bit different. Discussion Listing creates our model layer object o and a bunch of widgets relating to the fields on the model. The outer container is simply a VerticalPanel and then

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
46    106    3    09-05-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.