<o:massAttribute> affects another components in same <h:panelGrid>

Posted by Ignacio Ayuste on Stack Overflow See other posts from Stack Overflow or by Ignacio Ayuste
Published on 2014-08-17T16:01:40Z Indexed on 2014/08/18 16:24 UTC
Read the original article Hit count: 162

Filed under:
|

I'm using the new version of OmniFaces 1.8.1, and particullary I start to use the new tag: <o:massAttribute>. Basically, I have the following form with conditionally rendered and disabled fields:

<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>

However, when I open the page, the third <o:massAttribute> is also disabling another input fields codigo and codigoProducto. I think this isn't the expected behaviour.

© Stack Overflow or respective owner

Related posts about jsf

Related posts about omnifaces