custom components with javaserver faces technology
a second tip in the march 24, 2004, titled introducing javaserver faces technology showed how to create a jsf application that includes gui components that are modeled by the jsf framework. in this tip, youll learn how to create custom components using jsf technology. more specifically, youll learn how to create a custom jsf technology component that represents a simple stock display. through an accompanying javaserver pages (jsp) page, a user can enter a stock symbol into a input text field and then press the submit button. in response, the custom component displays a table below the text field. the table contains the stocks symbol, the current price of the stock, and the daily change in the stock price. 【程序编程相关:用Java Swing 写欢迎界面】
the march 24, 2004 tech tip improving designs with the mvc design pattern introduced the architectural pattern known as model, view, controller (mvc or model2). mvc is a pervasive pattern throughout the world of computer science, and is fundamental to understanding javaserver faces (jsf) technology. the pattern separates the data and business logic of an application from its visual representation. the data and business logic is stored in an object called the model. the visual representation is stored in a separate object called the view. the two objects are linked together with a third object called the controller. the controller reacts to input from the view and updates the model data accordingly. the advantage of using this design is that any changes to the business logic or data can be isolated to the model without affecting the view. you can create multiple views without affecting the model. 【推荐阅读:EJB对面向对象设计的影响】
... 下一页