-1

我正在尝试goButton在 JDeveloper 中实现 a 并且我希望从几个输入文本中获取urlwill和 will ,但是当我调用 java 类中的函数时dynamic

public class reportAction {

    private static final String LOG = "reportAction --------------------> ";

    private BindingContainer bindings;

    public String createURL(){
        bindings = getBindings();
        AttributeBinding test = (AttributeBinding) bindings.get("DesformatName");
        System.out.println(LOG + test);
        return test.toString();
    }
}

(destination="#{reportAction.createURL}")我把方法放在我得到的目标值中PropertyNotFoundException

为什么?


编辑

我正在尝试在托管 bean 中构建一个动态 url 并使用 POST 方法调用它。目标是单击 goButton 并通过将目标属性值设置为该 bean 来调用该 bean。我已经定义了一个托管 bean 并将其设置为 adf-config 中的 backingBeanScope。

4

1 回答 1

0

JSF 组件属性需要引用具有 getter/setter 的托管 bean 中的 String 属性。

尝试让 bean 的结构如下:

public class reportAction {

    private BindingContainer bindings;
    private String createURL = "";

    public String getCreateURL(){
        bindings = getBindings();
        AttributeBinding test = (AttributeBinding) bindings.get("DesformatName");
        System.out.println(LOG + test);
        return test.toString();
    }
}

另外 - 检查将 bean 范围更改为视图范围是否有帮助。

于 2015-11-18T23:08:09.230 回答