7 Replies Latest reply: May 24, 2012 2:35 PM by Sudipto Desmukh RSS

    Command Button not disabled properly

    aamadmi
      I am using a commandButton and its partial trigger is set to a table. The reason being that I need to update the label with the number of rows selected in table. And if no rows is selected, it should be disabled. So for the startup I have set the "disabled" attribute to true.
      Now I am facing this problem. The button is disabled. But when I hover the mouse over it, I can see it being highlighted and it seems enabled and I can click it when the mouse is over it. Otherwise its disabled. Why is it behaving like this?
        • 1. Re: Command Button not disabled properly
          Timo Hahn
          Please tell us your jdeversion!

          Can you post the code for the button?
          Any skin applied in your application?

          Timo
          • 2. Re: Command Button not disabled properly
            aamadmi
            JDev version = 11.1.1.6.2

            No skins applied.
            Code:

            <af:panelStretchLayout topHeight="30" id="psl1" styleClass="AFStretchWidth">
            <f:facet name="top">
            <af:panelGroupLayout layout="horizontal" id="pgl1">
            <af:commandButton text="MyButton"
            id="cb1"
            actionListener="#{pageFlowScope.MyBean.doSomething}"
            inlineStyle="margin-top:4px;margin-left:4px;margin-bottom:4px"
            partialTriggers="pc1:t1" disabled="true"
            partialSubmit="true"/>
            </af:panelGroupLayout>
            </f:facet>
            <f:facet name="center">
            <af:panelCollection id="pc1" styleClass="AFStretchWidth"
            featuresOff="statusBar wrap freeze formatMenu detachMenuItem">
            <af:table value="#{pageFlowScope.MyBean.tableData}"
            var="row" rowBandingInterval="0" id="t1"
            summary="My table"
            columnStretching="multiple"
            styleClass="AFStretchWidth"
            rowSelection="multiple" contentDelivery="lazy"
            verticalGridVisible="false"
            fetchSize="0"
            selectionListener="#{pageFlowScope.MyBean.onTableSelection}">
            <af:column sortable="true"
            width="50%"
            headerText="First Column"
            rowHeader="unstyled" id="c1">
            <af:outputText value="Some Text" id="ot1"/>
            </af:column>
            <af:column sortable="true"
            width="50%"

            headerText="Second Column"
            id="c2">
            <af:outputText value="Some Other Text" id="ot2"/>

            </af:column>
            </af:table>
            </af:panelCollection>
            </f:facet>
            </af:panelStretchLayout>
            • 3. Re: Command Button not disabled properly
              Timo Hahn
              Just tested it in 11.1.1.4.0 (can check 11.1.1.6.0 at home later today) and can't reproduce this behavior.
              Your version really is 11.1.1.6.2?
              Is this a version fro Fusion Applications?

              Timo
              • 4. Re: Command Button not disabled properly
                aamadmi
                Yes the version is 11.1.1.6.2
                • 5. Re: Command Button not disabled properly
                  Navaneetha Krishnan Nataraj
                  FYI, I am able to see this behavior in JDeveloper 11.1.1.6 but NOT in JDeveloper 11.1.2

                  Thanks,
                  Navaneeth
                  • 6. Re: Command Button not disabled properly
                    Don Kleppinger
                    I'm testing an upgrade from 11.1.1.4 to 11.1.6.0 and see the same issue. CommandButton's that are disabled appear to be enabled when you hover over. Clicking shows it disabled again and does nothing.

                    I was able to fix it by adding this to my Skin
                    /* Fix for jdev 11.1.1.6 that is showing disabled buttons as enabled when you hover over them. */
                    af|commandButton:disabled,
                    af|commandToolbarButton:disabled
                    {
                    background-color: #E5E5E0 !important;
                    background-image: none !important;
                    border-color: #B9B9B4 !important;
                    color: #737373 !important;
                    }

                    Edited by: Don Kleppinger on May 24, 2012 1:35 PM
                    • 7. Re: Command Button not disabled properly
                      Sudipto Desmukh
                      Its a regression and has been reported in the ADF EMG Jira Page http://java.net/jira/browse/ADFEMG-23 (Not sure how it becomes a SR/Bug from there though)
                      See last post by Jan -
                      An other layout issue that appeared in 11.1.1.6 and did not exist in 11.1.1.4 is the hover and click buttons highlight on disabled buttons.
                      When you hover or click on disabled icons the layout changes as if it was enabled (both in IE and Firefox).
                      There looks to be a workaround .. see if it works.