ADF_Data Binding系列2_使用URL Service Data Control

來源:互聯網
上載者:User

標籤:

2015-02-16 Created By BaoXinjian

一、摘要

本文介紹通過XML Schema建立URL Data Control顯示RSS需求

Step 1: Create a New Application and Project

Step 2: Create an XML Schema

Step 3: Create a URL Service Data Control

Step 4: Create a JSF Page

Step 5: Add the Data Control to the JSF Page

Step 6: Enhance the Layout

Step 7: Set the Labels

 

1: Create a New Application and Project

Step1.  建立custom application

 

Step2. 定義application屬性參數

 

2: Create an XML Schema

Step1.  建立XML Schema

Setp2. 擷取XML Schema檔案

 

Step3. 建立XML Schema

Step4. 查看所建立的Schema檔案結構

Step5. 查看詳細內容

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"             xmlns="http://www.example.org"             targetNamespace="http://www.example.org"             elementFormDefault="qualified">   <xsd:element name="rss">     <xsd:complexType>       <xsd:sequence>         <xsd:element name="channel" type="channel"></xsd:element>       </xsd:sequence>     </xsd:complexType>   </xsd:element>   <xsd:complexType name="channel">     <xsd:sequence>       <xsd:element name="lastBuildDate" type="xsd:string"></xsd:element>       <xsd:element name="title" type="xsd:string"></xsd:element>       <xsd:element name="link" type="xsd:string"></xsd:element>       <xsd:element name="description" type="xsd:string"></xsd:element>       <xsd:element name="managingEditor" type="xsd:string"></xsd:element>       <xsd:element name="language" type="xsd:string"></xsd:element>       <xsd:element name="item" type="item" minOccurs="0"        maxOccurs="100"></xsd:element>     </xsd:sequence>   </xsd:complexType>   <xsd:complexType name="item">     <xsd:sequence>       <xsd:element name="title" type="xsd:string"></xsd:element>       <xsd:element name="link" type="xsd:string"></xsd:element>       <xsd:element name="description" type="xsd:string"></xsd:element>       <xsd:element name="pubDate" type="xsd:string"></xsd:element>     </xsd:sequence>   </xsd:complexType> </xsd:schema>

Step6. 檔案儲存位置

 

3: Create a URL Service Data Control

Step1.  建立URL Service Data Contorl

Step2.  定義Data Source

Step3. 定義Connection

Step4. 定義Data Format

Step5. 查看所創舉愛你的URL Service Data Control資訊

Step6.最終組件結構顯示

 

4: Create a JSF Page

Step1.  建立Custom Project


 Step2.  創舉愛你NewsPage

Step3. 查看所建立的組件結構

 

5: Add the Data Control to the JSF Page

Step1.  從Datacontorl中拖動資料到頁面中

 

Step2.  運行測試顯示資料結果如下

 

 

6: Enhance the Layout

Step1. 修改Link的顯示文本

Step2.  建立Link的超連結

step3. 修改Link的寬度

step4. 運行測試,顯示結果如下

 

7: Set the Labels

Step1.  修改欄位

 

Step2.  修改欄位Title

Step3. 顯示欄位如下

 

Thanks and Regards

ADF_Data Binding系列2_使用URL Service Data Control

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.