2009年9月30日星期三

ADF_050:ADF 11g 问与答

注意,做实验时,发现保存个性化查询条件,会报错:oracle.mds.exception.ReadOnlyStoreException: MDS-01273: ...
此时,需要修改adf-config.xml,内容如下:
<mds-config> ......
<cust-config> ......
</cust-config>
<persistence-config>
<metadata-namespaces>
<namespace path="/persdef" metadata-store-usage="MAR_TargetRepos"/> </metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage id="MAR_TargetRepos" deploy-target="true" default-cust-store="true">
</metadata-store-usage>
</metadata-store-usages>
</persistence-config> ......
</mds-config>

5. 如何在页面中嵌入flash,并且自动播放?
ADF中有一个media组件,可以支持播放视频和音频,但试验后发现,只有音频可以自动播放,视频无法自动播放,即使设置了autostart=" true " 也不行。
Oracle ADF开发小组承认这个功能有BUG,在下一个版本会FIX。
所以只好另辟蹊径,建议使用swfobject.js来实现。swfobject是一个第三方的javascript,非常好用,支持大多数浏览器。下载地址:http://code.google.com/p/swfobject/downloads/list
具体用法如下:
(1)在.html中
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</meta> <title>untitled1</title>
<script type="text/javascript" src="swfobject.js">
</script>
<script type="text/javascript">
var flashvars = false;
var params = { };
params.wmode = "Transparent";
swfobject.embedSWF("popupintable.swf", "flashcontent", "932", "364", "9.0.0", "expressInstall.swf", flashvars, params);
</script>
</head>
<body>
<div id="flashcontent">This text is replaced by the Flash movie.</div>
</body>
</html>
(2)在.jspx中
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich%22&gt;
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:resource source="swfobject.js" type="javascript"/>
<af:resource type="javascript">
var flashvars = false;
var params = { };
params.wmode = "Transparent";
swfobject.embedSWF("../popupintable.swf", "flashcontent", "932", "364", "9.0.0", "../expressInstall.swf", flashvars, params);
</af:resource>
<af:form id="f1">
<f:verbatim>
<div id="flashcontent">This text is replaced by the Flash movie.</div>
</f:verbatim>
</af:form>
</af:document>
</f:view>
</jsp:root>
注意,由于JSF的访问路径包含faces,所以flash文件的相对路径要向上一个目录。

6. 发布ADF Web应用时,出现异常如下:
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:253)at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:168)at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:546)at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:327)at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:104)Truncated. see log file for complete stacktracejava.sql.SQLException: ORA-01005: null password given; logon denied

在setDomainEnv.cmd 脚本中增加一个JAVA_PROPERTIES:
-Djps.app.credential.overwrite.allowed=true。

7. 如何让一个普通Project可以使用JSF/ADF组件?
(1)右键点击Project,选择Project Properties,选择JSP Tag Libraries,选择Select Distributed libraries,增加ADF Faces Components 11,(只选这个就可以,其它的会带过来)。
(2)继续选择Technology Scope,选择JSF(只选这个就可以,其它的会带过来)。
如果你需要使用ADF Controller,你还要增加。

7. 图表中的饼状图,当小于某一个值的项目过多时,能否自动归类成一个项目:其它?

8. 用户的自定义查询条件能否保存,避免用户每次退出/登录都要重新设置?
可以,具体设置请参考《客制化与个性化 ADF 应用》。

9. 表格的自定义能否保存,避免用户每次退出/登录都要重新设置?
可以,具体设置请参考《客制化与个性化 ADF 应用》。

10. ValueBinding已经不建议使用了,那么如何实现以前的功能,比如:
ValueBinding vb = facesContext.getApplication().createValueBinding("#{bindings}");
DCBindingContainer dc = (DCBindingContainer) vb.getValue(facesContext);

可以。使用 resolveExpression方法就可以,该方法在JSFUtil.java中。

11. 如何实现点击一个按钮,实现一个异步操作。得到响应后,再以某种方式通知页面?
http://forums.oracle.com/forums/thread.jspa?threadID=999826

12. 使用WLS Console启动Manage Server时,无法启动ADF Liberary,抛出异常java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup?
(1)修改[Oracle_HOME]\wlserver_10.3\common\nodemanager\nodemanager.properties。
设置 StartScriptEnabled=true。
(2)重启Node Manager。
(3)重启Manager Server。

13. 柱状图的Y轴的数据有时悬殊比较大,是否能够自适应,能否设置最大值,最小值?
可以设置最大值和最小值。

14. 如果表单内容是动态的(有时项目多,有时项目少),表单下面的按钮能否随着内容的多少始终与最后一个项目保持同样的距离?

15. 表单中的选项为Required时,错误提示可以放在其它地方吗(目前默认是在该选项的右边)?

16. 某个输入选项的值,必须通过查询得到,查询条件在另一个窗口,如何把查询结果返回给该输入选项?

17 使用柱状图时,横轴文字很长,是否会自动换行?

18. 表格的excel导出功能,能否带格式导出(比如虚线效果)?

19. 1. ADF 是否支持SDO,如何使用?

20. Office 软件如何与JSR 227交互?

21. 支持Struts的哪个版本?

22. 如何在.jspx中增加JavaScript脚本?
<f:facet name="metaContainer"> <af:resource type="javascript" source="/js/deletewithkey.js"/> </f:facet>
有关resource Tag的详细说明,请参考http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_resource.html

23. 使用IE8做实验时,所有的按钮都不起作用,浏览器左下角出现错误提示:
行: 5660
字符: 2
代码: 0
URI: http://127.0.0.1:7101/HRSystem-ViewController-context-root/afr/partition/ie/default/opt/boot-11.1.1.3.0-0084.js

解决方案:
(1)打开注册表编辑器:regedit。
(2)找到HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32。
(3)找到"C:\WINDOWS\system32\shdocvw.dll",将shdocvm.dll修改为ieframe.dll。
(4)4.重启IE 。

1.Create and CreateInsert
2.Binding Objects in the Executables Section
3.Controlling Execution of Executables
4.Binding Objects in the Parameters Section,如何访问页面参数
5.JSF Lifecycle: Is repeated many times within a user application session
6. Any executables that have their refresh attribute set to prepareModel are refreshed7. Lifecycle listeners can be configured for the following scopes
8. ADF RC run stand alone?
9. Peer Object
10.Page-level security is not checked within bounded task flows
11.Shared memory scope enables data to be passed between activities within the task flow
12.Save Point and Restore
13.改变Java to EJB 界面是否要修改?Create Data Control 是否要重新生成?是否有变化?如果接口没变?
14.只用JSF/JSP,还能用拖拽绑定?

2 条评论:

匿名 说...

您好!请教您一个问题,ADF中生成的柱状图等图形化怎么导出到excel中,多个图怎么同时导入到一个excel中 谢谢!

千红一窟 说...

这个功能目前还不支持。