简体   繁体   English

如何在ADF页面片段中引用自定义EL函数

[英]How do I reference custom EL function in ADF page fragments

I would like to create a static (helper) function which will check if a given variable belongs to a set of predefined values. 我想创建一个静态(帮助器)函数,该函数将检查给定变量是否属于一组预定义值。 I want to use it as an EL function in order to reference it in a jsff file (via java's EL). 我想将其用作EL函数,以便在jsff文件中引用它(通过Java的EL)。 The question is: how do I reference the custom function inside the JSFF since it is a page fragment and I cannot access the form templates which the fragment belongs to due to its compilation. 问题是:由于JSFF是页面片段,因此我如何在JSFF中引用自定义函数,并且由于其编译,我无法访问该片段所属的表单模板。

You can have an element from your jsff binded on this function by setting the function's class as the jsff scope in the adfc-config.xml in the "managed-bean" tab and the calling it as follow : 您可以通过将函数的类设置为“ managed-bean”标签中的adfc-config.xml中的jsff作用域,并按如下方式调用,来将jsff中的元素绑定到该函数:

<af:outputText
id="pt1"
viewId="#{YOURSCOPE.YOURBEAN.YOURFUNCTION}"

You'll get a detailled how to in the documentation here : http://docs.oracle.com/cd/E17904_01/web.1111/b31974/web_getstarted.htm#ADFFD1746 您将在此处的文档中找到详细的操作方法: http : //docs.oracle.com/cd/E17904_01/web.1111/b31974/web_getstarted.htm#ADFFD1746

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM