ADF 可视化:检索当前托管 bean
我正在使用数据可视化构建一个小型 ADF 应用程序,但遇到了问题。
我有一个名为 map_action
的会话范围托管 bean,用于通过其属性
将数据从
传递到 DataControl 内的 sql 查询代码>国家。
此查询在其 where
子句中使用名为 location
的绑定变量。绑定变量从 Groovy 表达式获取其值:
adf.context.sessionScope.map_action.country
这有一个问题。即使 map_action.country
的值发生变化,绑定变量始终使用第一个值。
有没有办法让location
采用map_action.country
的值?看起来它正在读取缓存的值。
也许 Groovy 表达式不正确。有什么方法可以向当前的 map_action
实例发送消息吗?
I'm building a small ADF application using data visualizations and ran into a problem.
I have a session scoped managed bean, named map_action
, which is used to pass data from a <dvt:map>
to a sql query inside a DataControl by its property country
.
This query uses a bind variable named location
in its where
clause. And the bind variable takes its value from a Groovy expression:
adf.context.sessionScope.map_action.country
This has one problem. Even though the value of map_action.country
changes, the bind variable always uses the first value.
Is there any way to make location
take the value of map_action.country
? It looks like it is reading a cached value.
Perhaps the Groovy expression is not correct. Is there any way to message the current map_action
instance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于任务,创建一个视图对象(VO)的对象(假设您使用BC层),然后使用setNamedWhereClause()函数设置绑定变量并执行查询。
正如您所说,您有会话范围 bean,您可以创建一个在执行查询之前调用的初始化函数并在那里设置参数。
我希望这能解决问题。
谢谢
As for the task , make an object of the View Object(VO)(assumig you using BC layer) and then set the bind variable by using setNamedWhereClause() function and execute the query.
As you said you have session scope bean, you can create an intialization function to be called before the query is executed and set the params there.
I hope this solves the problem.
Thanks