麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁(yè) > 學(xué)院 > 開(kāi)發(fā)設(shè)計(jì) > 正文

使用Java Server Faces技術(shù)自定義組件

2019-11-18 13:43:56
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

  CUSTOM COMPONENTS WITH javaSERVER FACES TECHNOLOGY
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.

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, you'll learn how to create custom components using JSF technology. More specifically, you'll 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 stock's symbol, the current price of the stock, and the daily change in the stock price.

This tip assumes that you are familiar with the basics of JSF technology, and you know how to create JSP technology custom tag libraries. For information on the basics of JSF technology, see An Introduction to JavaServer Faces. For information on creating your own JSP custom tag libraries, see Using Custom Tags in the J2EE 1.4 Tutorial.

To create the custom component, you need to:

Create a JavaBean Model class that can be used to retrieve the stock data


Create a custom JSF View output component class that extends javax.faces.component.UIComponent.


Create a custom JSF View class that extends javax.faces.render.Renderer.


Integrate the custom component into the JSF framework using a custom tag.


Create a JSP page, including an input text field, and a backing bean for the input text field to assist the custom component.


Here is a visual representaion of how these objects fit in the MVC architecture.

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 九九精品久久 | 毛片在哪看 | 蜜桃网站在线观看 | 国产精品久久久久久久不卡 | 国产成年人在线观看 | 黄色毛片前黄 | 日日夜av | 在线成人免费观看视频 | 欧美一级黄视频 | 色综合网在线观看 | 国产免费观看av | 午夜影视一区二区 | 久久久久久免费免费 | 精选久久| 免费看性xxx高清视频自由 | 日本黄色一级视频 | 久久精品污 | 国产精品美女久久久久久不卡 | 一区视频 | av在线看网站 | 亚洲一区二区在线视频 | 久久久www免费看片 亚洲综合视频一区 | 久久成人精品视频 | 精品三区视频 | 欧美性生交xxxxx免费观看 | 精品久久久久久久久久中文字幕 | 免费观看高清视频网站 | 免费的性生活视频 | 天天看成人免费毛片视频 | 香蕉成人在线观看 | 91中文字幕在线观看 | 日韩av片网站 | 最近免费观看高清韩国日本大全 | 欧美日韩亚洲国产精品 | 精品久久久久久久久久久久包黑料 | 精品久久久久久久久久中文字幕 | 成人超碰| 亚洲小视频在线 | 国产成人精品一区二区三区电影 | a级毛片免费观看在线播放 日本aaa一级片 | a黄在线观看 |