3 Replies Latest reply on Apr 20, 2011 10:20 AM by Ilya Shaikovsky

    RichFaces4 rich:componentControl x rich:component

    Edilmar Alves Expert

      This code arises an exception "<rich:componentControl> The event name is not defined":

       

        <a4j:commandButton id="Pedido_buttonSaldo" value="Saldos"

                           execute="Pedido_numero" render="messages,Pedido_numero"

                           title="Mostrar o saldo calculado do pedido"

                           status="statuspedido">

          <rich:componentControl target="panelPedido_buttonSaldo" operation="show"/>

        </a4j:commandButton>

      But this code works fine:

       

        <a4j:commandButton id="Pedido_buttonSaldo" value="Saldos"

                           execute="Pedido_numero" render="messages,Pedido_numero"

                           title="Mostrar o saldo calculado do pedido"

                           status="statuspedido"

                           onclick="#{rich:component('panelPedido_buttonSaldo')}.show()"

                           >

          <!--

          <rich:componentControl target="panelPedido_buttonSaldo" operation="show"/>

          -->

        </a4j:commandButton>

      The code with rich:componentControl worked fine in RF3.3.3.

      The strange is that the code to hide the panel works fine in RF4.0.0 with rich:componentControl:

       

        <rich:popupPanel id="panelPedido_buttonSaldo" width="350" height="120">

        <f:facet name="header">

          <h:panelGroup>

            <h:outputText value="Consulta de Saldo do Pedido"></h:outputText>

          </h:panelGroup>

        </f:facet>

        <f:facet name="controls">

          <h:panelGroup>

            <h:commandLink value="[#{msgBotoes['labelFechar']}]" id="hidelink">

              <rich:componentControl target="panelPedido_buttonSaldo" operation="hide"/>

            </h:commandLink>

          </h:panelGroup>

        </f:facet>

        <h:outputText escape="false" value="#{pedido.saldo}"></h:outputText>

      </rich:popupPanel>

      And if I change the a4j:commandButton for h:commandButton, all componentControl works fine! But no execute/render works, off course.