创建一个无缝的Web应用方法Word格式.docx
- 文档编号:5752855
- 上传时间:2023-05-05
- 格式:DOCX
- 页数:25
- 大小:934.13KB
创建一个无缝的Web应用方法Word格式.docx
《创建一个无缝的Web应用方法Word格式.docx》由会员分享,可在线阅读,更多相关《创建一个无缝的Web应用方法Word格式.docx(25页珍藏版)》请在冰点文库上搜索。
fusion,连接类型:
oracle(JDBC),最后点击“TestConnection”,如出现Success则连通成功。
点OK完成。
3、CreateOracleADFBusinessComponents(创建OracleADF业务组件)
点filenew出现下图所示
bussinessTierADFBusinessComponents点击OK
直接点击OK,出现如下图所示
点Query搜索表,在Available中选择你需要的表到Selected中去。
点Next
点finish
4、编辑视图
5、AddValidationLogi(添加有效的逻辑)
6、测试业务组件逻辑
右击FODModle,点Runconnect,然后组件浏览器将会打开,它可以对数据进行操作。
第二章、CreateaSimpleUserInterface(创建一个简单的用户接口)
1、CreatethePageFlow
File>
New>
webTier>
JSF>
ADFTaskFlow
点击OK,一个pageflow页面会生成,在组件面板中把拖两个view组件到该页面中,然后
在组件面板中点击controlFlowcase,对2个view拉两条双向的流程线,线条上分别改名为goEdit和goBrowse,如下图。
2、CreateaJSFPage
3、CreateaBrowsePage
4、CreateanEditPage
5、CreateaCreateAction
6、RuntheApplication
第三章、AddaListofValues(添加列表值)
1、CreateaStaticViewObject(创建一个静态的视图对像)
选择工程model然后点击file>
New>
BusinessTier>
ADFbusinessComponents>
viewobject
输入Name后选择Rowspopulatedatdesigntimes(staticList静态列表,设计时列举的列表),点Next
点New后进入如下画面
选择keyAttribute,点击Ok
2、CreateaStaticLOV
在编辑窗口,点出editOrders.jslpx,把OrderStatusCode输入框删除,进入DataControls面板,展开FODModuleDataControlOrderView1节点,选择OrderStatusCode属性,把它拖到OrderShippedDate右边,依次点击Createcontextmenu>
SingleSelectionsADF。
3、CreateaLookupViewObject
在theApplicationNavigator,点击Moderl>
file>
BuinessTier>
ADFBusinessComments>
Viewobject
在Name中输入CustomerView,选择Read-onlyaccessthroughSQLquery.然后点击Next.出现下图
在QueryStatement中输入“SELECT*fromPERSONSPersons
WHEREPersons.PERSON_TYPE_CODE='
CUST'
“,然后点击Test,如果出现"
queryisvalid"
的信息,再点击Next一直到第6步,
在第6步画面中确认PersonId一定要在SelectAttribute列表中。
勾选上KeyAttribute后点下一步到第8步
勾选ApplicationModule后点finish,在editorwindow中,打开Orders.xml,然后进入ViewAccessorstab中,点击Add,出现如下图画面
左边选择CustomerView到右边去,然后点ok,在Orders.xml画面中,选择Attributes页标签,
然后选择CustomerId项在attribtes表中,然后在ValidaationRules项中点Add出现下图所示。
在AddValidationRuledialog对话框中,从RuleType列表中挑选“KeyExists”,
从ValidationTargetType列表中选择”ViewAccessor“
在OrdersEntityAttributes面板中挑选CustomerId,在ValidationTargetAttributes面板中选PersonId,点击Add,然后点ok,ClickOKtocontinuewithoutdefininganerrormessage.
4、CreateaDynamicLOV
在编辑窗口,打开OrdersView.xml并选择selecttheAttributestab,在attributestable中选择CustomerIdattribute.,展开ListofValuessection.点Add为这个项目增加一个LOV。
在ListofValuesdialog对话框中,从ListDataSource下拉列表中选择Orders.CustomerView1list.从theListAttribute下拉列表中选择PersonId,选UIHints页,在Availablepane中选择下列属性到Selected面板中,它们是:
PersonId,FirstName,LastName,Email,Gender,然后点OK关闭当前窗口。
在编辑窗口点出editOrders.jspx,选择输入框栏位CustomerId并删除它。
在DataControls面板中,展开FODModuleDataControl|OrdersView1节点,选择CustomerIdattribute把它拖到页面的先前位置。
第四章:
AddaSearchForm(添加一个搜索表单)
1、在编辑窗口打开OrdersView.xml页面并选择QueryTab页,如下图所示。
在theViewCriteria部分点击
(Add)。
在CreateViewCriteriadialog对话框,在EditQueryCriteria页,点击Additem按钮。
I在CriteriaItem部分,从Attribute下拉列表中选择OrderId,从Operator下拉列表中.选择Greaterthanorequalto,在Operand下拉列表中确认是选择的Literal.在Value栏位中输入1.点击”Test”测试语法的有效性。
当出现"
信息时点击OK.。
点击ControlHintstab.选择SelectQueryAutomatically,从“SearchRegionMode”下拉列表中选择Advanced,点击OK关闭“theCreateViewCriteriadialog”对话框。
2、AddaSearchFormtothePage(添加一个搜索窗口到页面)
在编辑窗口打开browseOrders.jspxtab页,在结构窗口中展开’atform’,在atform中你会看到af:
panelFormLayout,在DataControlspanel中展开OrdersView1节点和NamedCriteria节点,选择OrdersViewCriteria并把它拖到af:
panelFormLayout中并在af:
form结构窗口中,(这个搜索窗口的位置应页面的顶端并且在窗口组件中),依次选择下列菜单Createcontextmenu,chooseQueryADFQueryPanel。
通过structure看看Query面板拖的位置是不是form中并在af:
panelFormLayout前面,如果在af:
panelFormLayout中没有必要有一个query组件就把它放在页的顶端。
结关系如下图所示,
在Structuer窗口中,选择af:
table组件,在属性检查器上展开Behavion部分,在PartialTriggers栏位,选择Edit属性打开theEditPropertydialog对话框
在Availablepanel中依次展开panelgroupLayout>
panelHeader。
然后选择query*-<
query_id>
到Selectedpanel,最后点击OK。
可以开始运行了。
第五章AddaGraph(添加一个图片)
1、CreateaViewObject(添加一个视图对象)
输入WarehouseStockLevelsView作为对象名.选择Read-onlyaccessthroughSQLquery,点Next.在第2步在Query处输入SQL语句,有下列字段:
thewarehouseid,warehousename,productid,andquantityonhand.Forexample如名如下:
SELECT
Warehouses.Warehouse_id,
Warehouses.Warehouse_Name,
WarehouseStockLevels.Product_Id,
WarehouseStockLevels.Quantity_On_Hand
FROM
WAREHOUSESWarehouses,
Warehouse_Stock_LevelsWarehouseStockLevels
WHERE
Warehouses.warehouse_id=WarehouseStockLevels.wareho
ClickTesttovalidatetheSQLsyntax.ClickOKwhenthe"
messagedisplays.ClickNext,acceptingdefaultsuntilyoureachstep6ofthewizard,AttributeSettings.FortheWarehouseIdattribute,selectKeyAttribute,tousethislaterforthegraphbindinginthepage.ThenclickFinish.
2、AddtheViewObjecttotheApplicationModule(添加一个视图链结对象到应用模块)
依次展开节点model.model.FOModel然后点击file>
输入OrderItems_WarehouseStockLevels_ViewLink作为对象名,点Next
在SelectSourceAttribute展开OrderItemsView并选择ProductId,在SelectDestinationAttributepane展开WarehouseStockLevelsView并选择ProductId,
点击Add在两者之间建立链接。
点击Next到整个向导结束,通通采用缺省值。
然后点击完成。
在ApplicationNavigator中双击FodModule打开applicationmoduledefinitionintheovervieweditor.选择theDataModeltab.
在AvailableViewObjectspane中展开OrderItemsView并选择
WarehouseStockLevelsViewviaOrderItems_WarehouseStockLevels_ViewLink.在DataModelpane展开OrdersView1并选OrderItemsView2.点击
AddInstancetoaddtheviewobjectviatheviewlink
3、AddaGraphtothePage(添加一个图表到这个页面)
Intheeditorwindow,clickthebrowseOrders.jspxtabtobringthepageforward.IntheStructurewindow,makesurethecomponenthierarchyofbrowseOrders.jspxisshown.IntheDataControlspanel,expandtheOrdersView1|OrderItemsView2nodes.DragtheWarehouseStockLevelsView1nodetotheStructurewindowanddropitontheaf:
formcomponent.(ThisensuresthecollectionisplacedonthepagebelowtheOrderItemsdetailtable.)FromtheCreatecontextmenu,chooseGraphs.FromtheCreatecontextmenu,chooseGraphs.IntheComponentGallery,selectBarfromtheCategorieslistandBarintheGraphTypessection.ThenclickOK.
IntheCreateBarGraphdialog,makesureIncludeChildAccessorsisnotselected.
DragQuantityOnHandfromtheAvailablelisttotheBarsfield.
DragWarehouseNamefromtheAvailablelisttotheXAxisfield.ThenclickOK.
IntheStructurewindow,selecttheaf:
tablecomponent.InthePropertyInspector,Commonsection,enterorderItemsTableastheIdpropertyandpressEnter.IntheStructurewindow,selectthedvt:
barGraphcomponent.InthePropertyInspector,expandtheBehaviorsection,thenchooseEditfromthePartialTriggersdropdownmenutoopentheEditPropertydialog.IntheAvailablepanel,selecttable*-orderItemsTableandshuttleittotheSelectedpanel.ThenclickOK.ClickSaveAlltosaveyourwork.Intheeditorwindow,clicktheorders-flow.xmltabtobringthediagramforward.Right-clickthebrowseOrderspageiconandchoose
第六章UseTemplatesandRegions(使用模板和层)
1、CreateaTemplate(创建一个模板)
A、在应用浏览器中选择ViewControllerproject,依次点开file>
webTier?
JSFpageTemplate
B、输入文件名OrdersTemplate.jspx。
C、把Definitionstab点到前面,点击
Add.输入入main在namefield然后点OK.
D、在ComponentPalette,ADFFacespage,展开Layoutpanel.拖PanelBorderLayout到刚生生成的页面上
E、从ComponentPalette,Layoutpanel,拖PanelHeader到页面的顶端。
F、在PropertyInspector,Commonsection,把Text属性值改为AcmeInc。
G、展开Appearancesection,从Iconfield下拉列表中选择Edit.然后选择一张图片目的是包含在页面中,点’yes’添加一个图标在文档的脚,然后点Save。
H、在PropertyInspector展开Stylesection,然后选择Backgroundtab.从Color下拉列表中选择一个颜色做为背境颜色的属性。
I、在ComponentPalette,Layoutpanel,拖PanelBox到borderlayoutcomponent的中央(inbetweenthestartandendfacets)。
J、在PropertyInspector,Commonsection,把Text属性值改为OrderApplication.展开Style部分点击Boxtab.在Padding栏位输入10,然后从下一个栏位的下拉列表中选择Pixel。
K、在ComponentPalette,expandtheCommonComponentspanel.拖OutputFormatted到页面的bottom版面。
L、在PropertyInspector,Commonsection,把Valueproperty值改为<
em>
Copyright&
copy;
2007,AcmeInc.Allrightsreserved.<
/em>
。
M、在ComponentPalette,CommonComponentspanel,把FacetRef拖到panelBox的边上。
N、在InsertFacetRefdialog,从FacetName下拉列表框选择main,然后点OK。
2、CreateaPagewiththeTemplate(用这个模板创建一个页面)
A、在ApplicationNavigator的ViewController中,依次展开WebContent|PageFlows双击adfc-config打开缺省的页面流程图。
B、在ComponentPalette,ADFTaskFlowpage,Componentspanel,点击View在图表中添加一个页图标,把它的页名命名为orderMain.
C、在diagram中,双击刚才添加的页图标打开CreateJSFPagedialog对话框。
D、接受缺省的文件名并从UsePageTemplate下拉列表中选择OrdersTemplate,然后点OK。
E、在Structurewindow中展开f:
view并选择af:
document.
F、在PropertyInspector,在Titlefield中输入OrderMain。
ClickSaveAlltosaveyourwork.
3、InvokeaTaskFlowfromaRegion(从Region中调用任务流)
A、打开orders-flow.xmltab页面到最前面.
B、在图表中,选择thebrowseOrderspage和editOrders图标,右击选择ConverttoTaskFlowWithPageFragments.Confirmthatbothpagesarelisted,thenclickOK.
C、点击Yes确认修改,点击SaveAll保存所有工作。
D、Intheeditorwindow,clicktheorderMain.jspxtabtobringthepageforward.
E、IntheApplicationNavigator,selecttheorders-flownodeunderPageFlowsanddropitwithinthemainfacetontheorderMain.jspxpage.
F、FromtheCreatecontextmenu,chooseRegion.
G、Intheeditorwindow,clicktheadfc-config
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 创建 一个 无缝 Web 应用 方法