Forum Stats

  • 3,851,626 Users
  • 2,264,005 Discussions
  • 7,904,793 Comments

Discussions

Disable the delete button when the selected row in the ADF Table Column condition is met

User_7TK0D
User_7TK0D Member Posts: 11 Green Ribbon
edited Aug 8, 2022 7:41AM in JDeveloper and ADF

Hello,

I need some help.

I'm a newbie and I'm using JDeveloper 12.2.1.4.0. I have an ADF Table which the user can Create and Delete.

In the selected row when status is set to New, the Delete button is enabled. Otherwise if it was set to Pending, the Delete button should be disabled. How can I do that? Pls see the image below.


Best Answer

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond
    Answer ✓

    You create an attribute binding for the status. This attribute binding gets updated when the user selects a row in the table. This way it has the correct value from the selected row. Now you add an EL to the disabled property of the button like

    disabled="#{bindings.status.inputValue ne 'new'}"
    

    This should do the trick.


    Timo

    User_7TK0D

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,727 Red Diamond
    Answer ✓

    You create an attribute binding for the status. This attribute binding gets updated when the user selects a row in the table. This way it has the correct value from the selected row. Now you add an EL to the disabled property of the button like

    disabled="#{bindings.status.inputValue ne 'new'}"
    

    This should do the trick.


    Timo

    User_7TK0D