English 中文(简体)
JSF 2. 建立与Button突击队的海关部分,归属行动生计者
原标题:JSF 2: Create a custom component with CommandButton and get attribute to ActionListener

我是新来的,对共同基金2.0和习俗组成部分有问题(也使用第3条,但不是这样认为)。 情况如下: 我拥有一个包含<代码>的加密数据物体。 先进Criterion或Criterion(通过接口criteria)。 这些标准被用于制造复杂的过滤物体,如:

  • Advanced Criterion: AND
    • Criterion: PRODUCT equals "ABC"
    • Criterion: USER startswith "A"
    • AdvancedCriterion: OR
      • CRITERION: param1 > 5
      • CRITERION: param2 <= 20

我在 Java创建了两个新组成部分:.AdvancedCriterion.javaSimpleCriterion.java,以进行重新入侵,因为第一次尝试用复合材料进行。 a. 混合体中的合成物的复发性呼吁造成四舍五入。

在知道一能够显示静态过滤物体并看重罚款之前,用户应当添加或删除标准。 因此,我添加一些纽州(此处为斜体)。 在这里,一些法典首先采用了第一种标准,该标准始终为

<myTag:advancedCriteriaComponent criteria="#{manageFiltersBean.filterBuilder.criteria}" />

我知道布顿,想让母反对行动:

CommandButton addButton = new CommandButton();
addButton.setId("btnAdd" + UUID.randomUUID());
addButton.setAjax(true);
addButton.setValue(" + ");
addButton.addActionListener(new CriteriaActionListener());
addButton.getAttributes().put("criteria", this.currentCriteria);

这里还有标准行动:

@Override
    public void processAction(ActionEvent event) throws AbortProcessingException {
        AdvancedCriteria criteria = (AdvancedCriteria) event.getComponent().getAttributes().get("criteria");
        criteria.addCriteria(new Criterion());
        System.out.println("number of children: " + criteria.getChildren().size());

    }

在这一部分,现行《公约》是众所周知的,可以看到他的子女。 在<条码>中 该物体是空洞的(它有正确的类型,但看起来像这种新的非专用物体)。 现在的问题是: 如何获得<代码>现行标准 反对<代码>CriteriaActionListener?

我在“生命行动”中尝试了一个特性,并从该构成部分中确定,那么整个目标就是民族解放军。 尽管我试图使ELExpression成为一种抑制手段,并使它有权成为敌人(#{manageFiltersBean.addCriterion(criteria}),但目标是NUL。 我没有再有想法,不尽心尽力地说,我对联合武装部队来说是很新的(大约几周)。

难道这是否涉及纽州? 它们是随机的,因为纽芬兰的数量是动态的。 我读到,每个纽伦州都必须有一个独特的工作补贴。 或者,它涉及的是属性/特性?

Thank you for your help,

Felix

最佳回答

This problem is solved, some others occur. Well, like commented above, the problem was more like an problem with the implementation of the AdvancedCriteria object. There was no connection or hint to the CommandButton , just a miss-named getter.

Probably the added line implements Serialiable helps although, I don t know exactly, because I tried a lot of things (save and restore states, enumeration propKeys with setters and getters and stuff like this), overall these weren t the solution.

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签