1.EO的Updatable属性默认为Always,基于EO建立的VO也是。而基于SQL建立VO的Updatable属性默认为Never,若是要修改(例如将VO拖至页面生成Form用于新增),则需将该属性设置为Always。
2.在EO中设置字段排序:UI Categories
3.基于EO的VO如何修改SQL?SQL Mode:Expert
4.修改数据库字段时如何同步EO。选中EO对象右击,选择Synchronize with Dabase
5.EO设置主键使用序列自动增加
MySQL主键是能够自动增加的,只须要用auto_increment关键字,而在Oracle里,是没有auto_increment关键字来设计自动增加的,只能用序列html
(new oracle.jbo.server.SequenceImpl("JXJHGL_JXZYFB_SEQ",adf.object.getDBTransaction())).getSequenceNumber()
6.新增和修改跳转至同一页面。setActionListener
7.action和actionListener区别:返回值。String和void
8.showPopupBehavior听说有bug。建议用JSFUtils.showPopup()
9.在TaskFlow的Behavior中将Share data controls with calling task flow前面的勾取消掉,初始化方法过滤数据就不会影响其余的TaskFlow
10.Table选中便可编辑当前行editingMode="clickToEdit"
11.View Criterial查询条件多选。勾选Support Multiple Value Selection
12.View Criterial查询条件。Item UI Hints-Rendered Mode设置成never,在页面不显示。
13.绑定变量Control Hints-Display Hint设置成Hide,在页面不显示。
14.使用af:inputFile时在jspx页面须要设置(<af:form id="f1" usesUpload="true">)
15.表格增长序号列。数据库
<af:column id="c11" align="center" width="50" headerText="No."> <af:outputText value="#{vs.index+1}" id="ot2"/> </af:column>
其中vs为af:table中的属性 varStatus="vs"
16.导出Excelsession
<af:commandToolbarButton text="导出" id="ctb2"> <af:fileDownloadActionListener contentType="text/html;charset=utf-8" filename="期末成绩录入监控-详细班级.xls" method="#{cjglCjlrjkBean.zdyExport}"/> </af:commandToolbarButton>
17.数据为0和1,在页面显示是和否。
三元运算符oracle
<af:column sortProperty="#{bindings.JxjhglJxzyfbhzbView1.hints.Fbzt.name}" sortable="true" headerText="#{bindings.JxjhglJxzyfbhzbView1.hints.Fbzt.label}" id="c5"> <af:outputText value='#{row.Fbzt eq 0?"否":row.Fbzt eq 1?"是":""}' id="ot3"/> </af:column>
或者设置LOV后从Data Controls中拖至页面jsp
<af:column headerText="#{bindings.JxjhglJxzyfbhzbView1.hints.Fbzt.label}" id="c9"> <af:selectOneChoice value="#{row.bindings.Fbzt.inputValue}" label="#{row.bindings.Fbzt.label}" required="#{bindings.JxjhglJxzyfbhzbView1.hints.Fbzt.mandatory}" shortDesc="#{bindings.JxjhglJxzyfbhzbView1.hints.Fbzt.tooltip}" id="soc2" readOnly="true"> <f:selectItems value="#{row.bindings.Fbzt.items}" id="si2"/> </af:selectOneChoice> </af:column>
18.一般设置ide
1.af:document。设置title
2.af:dialog。设置title
3.ad:image。设置shortDesc
4.af:popup。设置contentDelivery="lazyUncached" childCreation="deferred"
5.af:query。设置saveQueryMode="hidden" modeChangeVisible="false" resultComponentId rows maxColumns
6.af:panelCollection。设置styleClass="AFStretchWidth" featuresOff="detach viewMenu"
7.af:table。设置summary。当rowSelection="multiple"要删除selectedRowKeys="#{bindings.LocationsView1.collectionModel.selectedRow}"
8.VO绑定变量,登陆帐号adf.context.sessionScope.yhzh
9.统计ui
<f:facet name="statusbar"> <af:toolbar id="t3"> <af:outputText value="#{common.total}" id="ot1"/> <af:outputText value="#{bindings.TksftyVo1.estimatedRowCount}" inlineStyle="color:Red; font-weight:800;" id="ot6" partialTriggers="::qryId1 t1"/> <af:outputText value=" 条数据" id="ot8"/> </af:toolbar> </f:facet>