Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf <;o:massAttribute>;影响同一系统中的其他组件<;h:panelGrid>;_Jsf_Omnifaces - Fatal编程技术网

Jsf <;o:massAttribute>;影响同一系统中的其他组件<;h:panelGrid>;

Jsf <;o:massAttribute>;影响同一系统中的其他组件<;h:panelGrid>;,jsf,omnifaces,Jsf,Omnifaces,我正在使用1.8.1的新版本,特别是我开始使用新标记:。基本上,我有以下带有条件渲染和禁用字段的表单: <h:form id="formABMProducto"> <h:panelGrid id="datosProducto" columns="4"> <o:massAttribute name="rendered" value="#{cc.attrs.page != 'baja'}"> <h:output

我正在使用1.8.1的新版本,特别是我开始使用新标记:。基本上,我有以下带有条件渲染和禁用字段的表单:

<h:form id="formABMProducto">
    <h:panelGrid id="datosProducto" columns="4">
        <o:massAttribute name="rendered" value="#{cc.attrs.page != 'baja'}">
            <h:outputLabel for="codigo" ... />
            <h:inputText id="codigo" ... />
            <rich:message for="codigo" />
            <h:panelGroup />
        </o:massAttribute>

        <o:massAttribute name="rendered" value="#{cc.attrs.page eq 'baja'}">
            <h:outputLabel for="codigo" .../>
            <rich:autocomplete id="codigoProducto" ... />
            <rich:message for="codigo" />
            <h:panelGroup />                    
        </o:massAttribute>

        <o:massAttribute name="disabled" value="#{cc.attrs.disableComponents}">
            <h:outputLabel for="nombre" ... />
            <h:inputTextarea id="nombre" ... />     
            <rich:message for="nombre" />
            <span />

            <h:outputLabel for="descripcion" ... />
            <h:inputTextarea id="descripcion" ... />    
            <rich:message for="descripcion" />
            <span />
        </o:massAttribute>

        <h:outputLabel value="#{msgs['producto.abm.panel.proveedor.tipo']}" for="CmbTipoProveedor"/>
        <rich:select id="CmbTipoProveedor" ... />
        <rich:message for="CmbTipoProveedor" />
        <a4j:commandButton ... />
    </h:panelGrid>
</h:form>


但是,当我打开页面时,第三个
也在禁用另一个输入字段
codigo
codigoProducto
。我认为这不是预期的行为。

事实上,这是一个bug。已将
应用于父组件
UIComponent
的所有子组件,而不是仅应用于标记中包含的子组件。理论上,如果您将每个
包装在自己的
ui组件中,就像
那样,它就会起作用。但是,在
中,这显然不是一个选项,您希望将每个子项都放在自己的列中


我复制了你的问题,并在。请尝试一下,并对由此带来的不便表示歉意。

这是一个复合组件,对吗?它是否依次位于
内?无论如何,a对于快速解决问题确实有很大帮助。是的,它位于composite:implementation和h:panelGrid中。我编辑上面的代码,因为你可以看到页面。我将尝试删除h:panelGrid之外的组件,可能是这样。没有问题,感谢您的帮助和快速回答。在我的特殊情况下,我修复了在我需要启用的组件(自动完成组件)中将disabled设置为false的问题,但我将尝试您的解决方案。您有一个很棒的库,可以在jsf中帮助我完成许多复杂的事情,谢谢您的贡献。我想我也发现了一个错误,我会为你补充另外一个问题。不客气。如果您对错误有信心,请改为在上报告。最后,我的代码中有一个错误正在正常工作,谢谢。