Toggle button depends on the value of the selected row

Hello.

My problem is:

I have a Table "singleSelect" and a button Delete.

I´d want to toggle the button depends on the value of the selected row.

I mean:

C1: DepartmentId
C2: Yes/No

For each line: If c2 = "" then disable the rest button activates the button.

I hope you can help me.

I'm from Venezuela my English is not very good. :)

Disabled = "#{row." C2 eq 'No'} '.

Tags: Java

Similar Questions

  • How to enable and disable a button depending on the value of a field

    Hello experts,

    I enable and disable a button depending on the value of a field.

    I did the following:

    in a trigger of on_new_form_instrance I put the following
    begin
         
    go_block('OE_HEADER');
    execute_query;
    IF :oe_header.status = 'BOOKED' THEN        
          SET_ITEM_PROPERTY('CONTROL.ACTION',ENABLED,PROPERTY_FALSE);
    else
         SET_ITEM_PROPERTY('CONTROL.ACTION',ENABLED,PROPERTY_TRUE);
    end if;
    
    
    end;
    the problem is that it works but does not change when my header_status value is changed.

    You have to put the same code in when-validate-item trigger of: oe_header.status...

    and I think that this code should be trigger after query

    IF: oe_header.status = 'RESERVED' THEN
    SET_ITEM_PROPERTY('CONTROL.) ACTION', ENABLED, PROPERTY_FALSE);
    on the other
    SET_ITEM_PROPERTY('CONTROL.) ACTION', ENABLED, PROPERTY_TRUE);
    end if;

  • Use the toggle button to simulate the Ctrl key now

    Hello

    I saw someone asked something very similar before, but nobody seemed to know the solution.

    I was wondering if it is possible to use a toggle button to simulate the CTRL key now, the idea being that the user could then zoom in on a rectangle of their choice on a field without having to press the button themselves. I know that you can use the FakeKeystroke function to simulate support that the key however is possible that it may be held?

    Thank you

    I forgot one thing. You must handle the case when you have a real EVENT_DOUBLE_CLICK. In this case, you don't want to reset the keyboardState. Here's the modified code.

    char oldKeyState [256] = {0};
    char newKeyState [256] = {0};
    int isFakeDouble = 0;

    Zoom CVICALLBACK int (int, int int event, control panel,
    void * callbackData, int eventData1, int eventData2)
    {
    HWND hwnd;
    toggleButton int = 0;
    switch (event)
    {
    case EVENT_LEFT_CLICK:

    get the current state of the keyboard
    GetKeyboardState (oldKeyState);
    get the State of the toggle button
    GetCtrlVal (panelHandle, PANEL_TOGGLEBUTTON, & toggleButton);

    If (ToggleButton)
    {
    create the new copy of the keystate
    memcpy (newKeyState, oldKeyState, 1);

    Active control key.
    newKeyState [VK_CONTROL] = 128;
    SetKeyboardState (newKeyState);

    generate left mouse button events that will be holding the CTRL active
    SetActiveCtrl (panelHandle, PANEL_GRAPH);
    GetPanelAttribute (panelHandle, ATTR_SYSTEM_WINDOW_HANDLE, (intptr_t *) &hwnd);)
    isFakeDouble = 1;
    SendMessage (hwnd, WM_LBUTTONDOWN, 0, 0);
    isFakeDouble = 0;
    }

    break;
    case EVENT_LEFT_DOUBLE_CLICK:

    mouse event generated will be taken as a double click. restore the old state of the keyboard
    If (isFakeDouble)
    SetKeyboardState (oldKeyState);

    break;
    }
    return 0;
    }

  • Enable and disable the buttons depends on the connection of the user?

    How to enable and disable the buttons depends on the connection of the user?

    In fact I have a few buttons as remove, add, save, exit, it etc., zero page...

    depends on the user , I have to turn on and off specific keys.


    Thanks and respect,
    SKUD.

    Hi Skud,

    In fact Jeff's response are correct and handles the problem. I want to mention another way,

    Change the desired button > navigate to Conditions > Pick (exists SQL query returns at least one row) > Expression 1, enter code similar to the following:

    Select TOP (: app_user) where double UPPER(:app_user) in ('FATEH","MARY")

    Best wishes
    Fateh

  • Have the drop-down list boxes become visible depending on the selection in a previous drop-down list box?

    Hi, im doing a form that only shows some options based on the previous selections.

    So far I have buttons which allow a user to select a specific product, and then by using the drop-down combo boxes select some optional features.

    I then have a simple javascript code that bears the name of a product at a price (i.e. the user selects product 'A', the review sections shows priced at $ 99).

    My problem is with additional customization options that depend on previous choices.

    Is it possible to have some drop-down list boxes become visible depending on the selection in a previous drop-down list box? If yes how could I impliment it?

    Currently my best idea is to have a button that could ask the user if he or she had previously chosen a certain selection and then reveal areas of correct drop-down list accordingly.

    Thank you

    Hello

    With a small change I think that the code works as expected. I changed your mainDD.value to event.value, as on the validate event the mainDD.value property cannot be updated as expected.

    script

    this.getField("Dropdown2").display = display.hidden;

    this.getField("Dropdown3").display = display.hidden;

    this.getField("Dropdown4").display = display.hidden;

    Switch (event.value)

    {

    case "a":

    this.getField("Dropdown2").display = display.visible;

    break;

    case "b":

    this.getField("Dropdown3").display = display.visible;

    break;

    case 'c ':

    this.getField("Dropdown4").display = display.visible;

    break;

    by default:

    break;

    }

    end of script

    Hope this helps

    Malcolm

  • Get the selected row of grid

    Hello

    I use JDev 11.1 with ADF, I have the grid, I need to get the selected row in the grid when I press the button, how can I do this?

    Thank you

    Hello

    You have a table in your page that is based on a viewObject iterator and you must get the selected line in your bean to support when you click on a button.
    Did I get that right?

    If yes then you must add an actionListener on this button that executes a method in bean support.

    the code for the button:

    
    

    In this method, you add the code like this:

      public void buttonActionListener(ActionEvent actionEvent) {
        BindingContext bindingctx=BindingContext.getCurrent();
        DCBindingContainer bindings=(DCBindingContainer)bindingctx;
        DCIteratorBinding iter= bindings.findIteratorBinding("iteratorName");
        Row currentRow=iter.getCurrentRow();
      }
    

    If this isn't what you need to give more details.

    Gabriel

  • How to get the selected row in a programmatic table of the ADF (table generated from a bean)

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    How to get the selected line in a programmatic (using a SortableModel custom not a display object) ADF table (generated from a bean)?


    We are trying to get the selected row in a bean of a programmatic ADF table to retrieve data based on the selected line.


    Any idea?

    Well, you can use selectionListener to set the selected line to a variable of bean (but this bean must be in extended view or some superiors)

    Something like this: http://www.awasthiashish.com/2015/07/get-selected-row-singlemultiple-from.html

    Dario

  • Export only the selected rows of a partition

    Hello

    Is there a method to export only the selected rows of an artition using export utility

    Thank you
    Lbn76

    See http://docs.oracle.com/cd/B28359_01/server.111/b28319/dp_export.htm#BEHEJDBE

    Concerning
    Karan

  • How do I get the selected row in the table (FacesCtrlHierBinding).

    I am trying to get the data of the selected row in the table:

    RowBinding () (FacesCtrlHierBinding) tab.getSelectedRow = FacesCtrlHierBinding;
    Line rw = rowBinding.getRow ();

    But for oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding be found since my 11 JDev to import.
    What is a good package for FacesCtrlHierBinding?

    Hello
    This is the code I use to get the selected rows in a rich table of adf:

        public void deleteMarkedRows()
        {
    
            RichTable table = this.getImportTable(); //get table bound to UI Table
            RowKeySet rowKeys = table.getSelectedRowKeys();
    
            Iterator selection = table.getSelectedRowKeys().iterator();
            while (selection.hasNext())
            {
                Object key = selection.next();
                table.setRowKey(key);
                Object o = table.getRowData();
                JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
                Row row = rowData.getRow();
                row.remove();
            }
    
            //prepare table to show changes
            table.setFirst(0);
            RequestContext.getCurrentInstance().addPartialTarget(table);
        }
    

    Hope this helps

    Timo

  • How do you use the toggle buttons to switch the content on and off with a smooth transition?

    I work in edge animate CC 2015 and am using toggle buttons to hide and show content, I would that this content to animate smoothly on the screen, maybe going from 0 to 100% opacity and 0-100% scale when enabled and vice versa when it is switched off, is there a simple way to do this?

    Appreciate help!

    Emily

    An easier way if you who would rather just code, use use the Greenock JS library.

    First, add http://cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js to your scripts Panel to the library.

    Then, add the following code to document.compositionReady

    sym.setVariable ("toggle", true); Create a new global variable called "toggle" and set the value to true

    Now, create a button and click on the following code:

    Toggle var = sym.getVariable ("toggle"); Get the variable global "toggle" and him assign a local variable of the same name

    var FadeSymbol = sym.$("FadeSymbol"); The value of a local variable to your symbol name

    If (toggle == true) {}

    TweenMax.to (FadeSymbol, 0.6, {opacity: 0});

    sym.setVariable ("toggle", false); Reset the value of the variable global 'toggle' false

    } else {}

    TweenMax.to (FadeSymbol, 0.6, {opacity: 1});

    sym.setVariable ("toggle", true); Reset the value of the variable global 'toggle' false

    }

    Note the line TweenMax, it fades to the opacity of the whole symbol rather than using a calendar. It breaks down as follows:

    TweenMax.to (TheNameOfYourSymbol, theTimeinSeconds, {theOpacity, 1 = 100 %}

  • Toggle the button toolbar on the selection of rows in table

    Hi all
    I have a problem with activation and deactivation of the toolbar button when the table row is selected... Here's the deal:

    I have a toolbar button named "activate" I want to activate only when the selected table line has say for example 'description' field is not empty. I'm looking for a solution so that I can say declaratively:

    < disabled af:commandToolbarButton = "#{I'M looking FOR THIS CASE =="} "/ >"

    I tried using #{bindings.activateAttributeFromSameIterator} thinking that when the selection on the row in the table is changed, the change is reflected also and I will get the result, but without success (that link was nothing)... I also updated partialTriggers this toolbar button.


    I would appreciate if anyone can shed some light on this...

    Thank you

    Hello

    create a binding of the attributeValue to the descriptor field using the "Bindings" tab in the Visual Editor. In the connections section, click the Green plus icon, choose generic and attributeValue Bindings are included. Select the iterator used by the table and select the attribute "descriptor" (the name of the attribute that you mentioned). Then change

    TO

    Frank

  • How to use radio buttons to display different text depending on the selected button?

    I am new to acrobatXi and have been implemented on-line to fill PDF Forms.

    I have 3 radio buttons in a group (Group 1) choice1, the lendemain2 and the 3 choices.

    I would like a text box to display the text "price" If you selected option 1, the 'price B' If you selected option 2 and the ' price C "If you selected option 3.

    I have no experience of java, so any help would be appreciated.

    Use this code in the custom text field calculation script:

    var v = this.getField("group1").valueAsString;
    if (v=="Off") event.value = "";
    else if (v=="choice1") event.value = "Price A";
    else if (v=="choice2") event.value = "Price B";
    else if (v=="choice3") event.value = "Price C";
    
  • By pressing the toggle button added to the content

    Hello! In Adobe Muse, I am doing a FAQ menu like the one on this page. Frequently asked Questions | Freelancer.com so when you click on it, it toggles showing the content.

    Thank you.

    Hello

    You can do this by using the accordion in Muse Widget.

    Here is the place to find it.

    Object > insert Widget > panels > accordion.

    Concerning

    Vivek

  • Button depends on the existence of another application in the same workspace.

    Hi all

    Is it possible to package a button on the existence of another application in the same workspace.
    What I'm trying to do, is to have a MAIN application and several other applications MODULE in the same workspace. Then a button on a form in the MAIN application which will redirect to a specific page in one applications MODULE. If there is no such thing as the application MODULE, which means not installed, then the button would be invisible.


    Concerning
    Hansen.

    PS. Is there a better way to implement the MODULES

    Hello
    >
    Is it possible to package a button on the existence of another application in the same workspace.
    What I'm trying to do, is to have a MAIN application and several other applications MODULE in the same workspace. Then a button on a form in the MAIN application which will redirect to a specific page in one applications MODULE. If there is no such thing as the application MODULE, which means not installed, then the button would be invisible.
    >
    Take at look at the view APEX_APPLICATIONS Apex. You can query this view to write your condition (Select returns at least one line) on the button.
    Something like

    Select 1 from APEX_APPLICATIONS where Application_id = 101
    

    See you soon,.

  • Button to remove the CURRENT row in a table

    This test document has a table that works for most as I want, but the buttons Remove line always delete the second line , regardless of the button remove a row is clicked. The code is:

    Table1.Row1.instanceManager.removeInstance (1);

    How can I change this so that if you click on the button Delete line 5 (for example), it removes the 5 line, not of rank 2. It always clears rank 2, regardless of the button is clicked.

    Also, after I line is deleted, how can I get the lines of re - number automatically? The code for the automatic numbering is:

    this.rawValue = this.parent.index + 1;

    I tried to use this code:

    var number = detail.instanceManager.count;

    Detail.index + 1;

    numbers for automatic (by this blog entry by BR001), but I could never work on my table, although it works very well in his example. In the example of BR001, there a button Delete by rank and it always removes the line it is and it always automatically renumbers. I would use his method, but I spent hours trying to figure out where I am not to follow his example.

    Hello

    OK, your script will always clear the 2. instance as the removeInstance (1) simply means to delete the instance 1.

    You must keep in mind that all nodes have numbers index starting at 0.

    So the first instance of Row1 is addressed with Row [0], the second with the row [1]... the tenth line [9].

    To remove the current instance, you can use the button Delete as point of reference.

    This point of reference you're going upward in the tree of nodes to find the line desired.

    Table1.Row1.instanceManager.removeInstance(this.parent.parent.index);
    

    It = object current i.e. Button2

    parent = parent of Button2 which is Subform1

    parent = parent Subform1 which is Row1

    index = the number of the line pending

    OK, to keep the number of rows to update, you must use your line indexChange event (just add it after you existing script shading line).

    simple2.rawValue = this.index + 1;
    

Maybe you are looking for

  • Display when the mouse scrolling problem

    Hello Since this morning (and the most recent upgrade apparently) I feel serious display problems when scrolling with my mouse upwards or downwards on a Web site: the whole text and other components of the page is displayed to the left or to the righ

  • Recover contacts from a broken iPhone

    Recently, my 5 c overheated and fried. If it lights at all, I get the head start symbol with a bunch of error code and the phone immediately starts to get hot again. All my contacts are there and I can't access it. Is there another way to recover con

  • Satellite A505 breaks down

    This laptop has begun recently to close (as it would if I pressed the power button) for no apparent reason.I suspect that it is because it is overheating, but there were a couple times when he did it in a few minutes of starting with nothing else run

  • error occurred during the move messages to the mailbox '(null) '.

    Now I get the error message when you move mail boxes. It all started this morning. It seems that this feature seems to have problems on a regular basis. Any suggestions on how to fix this one? Thank you

  • You can reference external data in figures?

    Hello community, Is there a way to refer to external data. IE I want Google or Yahoo finance for actions of scrap? Ideally, I want it to be the current price. I know that I can do this with GoogleFinance or Webdata in Excel, but I don't want to use a