0

我有

<h:column headerClass="details_header">
    <h:panelGroup rendered="#{foo.checkIffooIsAvailable(table.YooId)}">
        <h:form>
            <h:inputHidden id="hiddenYooboo" value="#{table.YooId}" 
                binding="#{foo.hiddenInputValue}"/>
            <a4j:commandButton styleClass="quickYooButton fooButton"
                value="#{textElement.getText('foo')}" reRender="fooPanel" 
                action="#{foo.getFullfooAmount()}">
                <rich:componentControl for="fooPanel" event="oncomplete" 
                    operation="show" />
            </a4j:commandButton>
        </h:form>
    </h:panelGroup>
</h:column>

和后端

private Integer boo;
private BigDecimal partialfoo;
public List<Integer> fooTableYoos = new ArrayList<Integer>();
public UIInput hiddenInputValue;    

public Boolean checkIffooIsAvailable(Integer tableboo) {
    Iterator<Integer> iter = fooTableYoos.iterator();
    while (iter.hasNext()) {
        if (iter.next().compareTo(tableboo) == 0) {
            return true;
        } else {
            return false;
        }
    }
    return false;
}

public BigDecimal getFullfooAmount() {
    BigDecimal fooAmount = null;
    try {
        fooAmount = new BigDecimal(100);
        setFullfoo(fooAmount);
    } catch (Exception e) {
        log.error("getFullfooAmount()", e);
    }
    return fooAmount;
}
    public UIInput getHiddenInputValue() {
    return hiddenInputValue;
}

public void setHiddenInputValue(UIInput hiddenInputValue) {
    this.hiddenInputValue = hiddenInputValue;
}

问题是当我单击 commandButton 时出现错误:

无法实例化 Seam 组件:表。

我需要在渲染表时检查 boo 是否在列表中以及何时真正渲染按钮。然后,当我有按钮时,我需要检查我点击了哪个 id,并通过这个 id 打开带有重新加载数据的模式。没有名为 table 的组件。Couse 它只是 dataTable 的东西。h:CommandButton有效,但第二次关闭后的模态并且不重新加载模态的数据。

4

1 回答 1

1

解决方案是将数据表的类型更改为丰富:数据表

于 2016-09-21T08:18:01.620 回答