tailieunhanh - Apress Pro Apache Struts with Ajax phần 6
sau đó bắt đầu tạo ra các mô tả triển khai, hoặc, các tập tin cấu hình, hoặc mã nguồn dựa trên XDoclets nhúng vào trong mã nguồn của ứng dụng. Hãy không quên mặc dù XDoclet đó là một máy phát điện mã. Thông thường khi viết một tập tin cấu hình, như một tập tin , | CHAPTER 6 BUILDING FLEXIBLE FRONT-ENDS WITH THE TILES FRAMEWORK 243 tiles-definitions -- Base Tile Definition from the previous section -- definition name .baseDef path WEB-INF jsp tiles . definition definition name .homePage extends .baseDef . definition definition name .postComment extends .baseDef put name title value Post a Comment put name content value WEB-INF jsp tiles definition definition name .postStory extends .baseDef put name title value Post a Story put name content value WEB-INF jsp tiles definition definition name .searchForm extends .baseDef put name title value Search JavaEdge put name content value WEB-INF jsp tiles definition definition name .searchForm extends .baseDef put name title value Search JavaEdge put name content value WEB-INF jsp tiles definition definition name .signUp extends .baseDef put name title value Become a JavaEdge Member put name content value WEB-INF jsp tiles definition definition name .storyDetail extends .baseDef put name title value View a specific story put name content value WEB-INF jsp tiles definition tiles-definitions 244 CHAPTER 6 BUILDING FLEXIBLE FRONT-ENDS WITH THE TILES FRAMEWORK Extending a Tiles Definition It is possible to declare a new Tiles definition that inherits all of the attributes of an existing Tiles definition and then adds new attributes that are unique to that tile. This is often done when you want to write a page that has the same basic look and feel as all the rest of the pages in an application but has some additional visual elements that are unique. Let s say that the marketing department has decided that they want to try and underwrite some of the costs of the JavaEdge site by selling ad space immediately below the header on the main page. However the marketing department is also considering adding ads to other pages in the JavaEdge application at .
đang nạp các trang xem trước