Dynamic action - number of events triggers

See http://screencast.com/t/XrGTYvKFT

The DA is a search server side based on the content of a form input field when the field gets focus.

Is it possible to trigger the DA on either a KeyRelease event or get a tune-up? It would cover both use cases, initial entry and reviewing data that already exists.

Ideas? Thank you

[Of course, I could just duplicate the DA and set one of them to shoot the KeyRelease and the other on GotFocus, but this is not < a href = "http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" > < /a > SEC]

Vikas,
It would have been much easier if the events themselves might have been entered in definition (wizard) D.A., so that several events as well a custom events trigger a D.A.

As for your question, a (convoluted) way is to use an intermediate element of the set.

Want to trigger a D.A. on 'KeyRelease' and 'Get the Focus'.

Add a hidden element somewhere on the page (element text pre/post, headers region, region html etc...)

< span id = "my_elem" > & template; </span >

You can then set the D.A. triggered by a click (double click or any event that D.A. support natively) on this element.

Then you link the original events on any element to trigger the event of the item to the D.A. (and therefore the D.A.)
You can add an onload J.S / an another D.A. for that.
The code reads

$('selector').bind('event-names',function(){
  $('#my_elem').trigger('eventname');
});

for example

$('P1_ITEM1').bind('keyup,focus',function(){
  $('#my_elem').trigger('click');
});

Tags: Database

Similar Questions

  • Dynamic action - when the 'event' and 'condition' seems to have no sense

    Step by step, I am trying to get free Javascript coding so I can rely on what natively offers the Apex. It was an interesting experience, however I have noticed certain situations sicesdonneessontdisponibles options seems to have no sense, at least to date, and you will certainly help me which can be cleared up. I tried to put one of them into words. I just created a new dynamic action that will just set the focus to an element whenever my page is loaded.

    Why my new dynamic action allows me to choose the "Page loading" event and condition "sucks"? I don't understand why this combination is available. There is probably no effect anyway, but I decided to leave the condition "without condition."

    Thanks in advance.

    Franklin.Jr wrote:

    Step by step, I am trying to get free Javascript coding so I can rely on what natively offers the Apex. It was an interesting experience, however I have noticed certain situations sicesdonneessontdisponibles options seems to have no sense, at least to date, and you will certainly help me which can be cleared up. I tried to put one of them into words. I just created a new dynamic action that will just set the focus to an element whenever my page is loaded.

    Why my new dynamic action allows me to choose the "Page loading" event and condition "sucks"? I don't understand why this combination is available. There is probably no effect anyway, but I decided to leave the condition "without condition."

    It's just that there is a basic LOV status of one size for all types of events. Most of the conditions it contains is relevant to events associated with the elements. "Page Load" + "sucks" doesn't in fact make sense, but 'P4_END_DATE' + 'is null' fact. The Condition property remains visible and active so that the option "JavaScript expression" are available, as this can be used to make any event conditional.

  • APEX 5. Dynamic action on the CHANGE event does not work after applying the filter on IR.

    APEX 5.

    Dynamic action for the CHANGE event does not work after applying the filter on IR.

    Event: Change, selection Type: jQuery Selector, jQuery Selector: td [header = 'abc'] entry

    Real action

    Selection type: jQuery Selector, jQuery Selector: td [header = 'abc'] entry, Action: run the Javascript Code

    Is TI WHEREAS behavior?

    I know, I can work around this problem by using the Refresh event and javascript, but I prefer DA and if possible Change event.

    Concerning

    mdyla

    mdyla wrote:

    It is, how to force them reallocate dynamic Action in the event of CHANGE of the input elements after refresh of IR region.

    Set the dynamic scope of the event action to Dynamics.

  • PL/SQL in dynamic Action seems to return an incorrect value

    Hi all

    I am very new to the Apex and PL/SQL, so I don't know if I did something wrong here.

    I have a form with a shuttle service (P4_ITEMS) and a field display only (P4_ORDER_TOTAL). I have a dynamic action put in place with the following PL/SQL:

    declare
        tab apex_application_global.vc_arr2;
        total number := 0;
        itemPrice number;
    begin
        tab := apex_util.string_to_table (:P4_ITEMS);
        for i in 1..tab.count loop
            select PRICE into itemPrice from PRODUCTS where PRODUCT_ID = tab(i);
            total := total + itemPrice;
        end loop;
        return total;
    end;
    

    If I understand correctly, tab must contain all the elements that are in the 'selected' part of the shuttle. I try to summarize the prices of selected items and return the set. Pretty simple, right?

    Here is some info on the dynamic Action itself:

    Event: Change; Selection type: Article (s); Article (s): P4_ITEMS (the shuttle)

    The event (the PL/SQL function running) is also set to pull on the loading of the page. It is near the top not to expect results, so during the calculation, display field disappears briefly.

    Here's the number: P4_ORDER_TOTAL updates only correctly when I first load the page. I enabled debugging but I changed my Shuttle, then checked out.

    He recorded the P4_ORDER_TOTAL element. In this case, we will say it was 363.08. I added an item on the agenda and the PL/SQL is executed. The result, however, is 363.08, although he should have gone to the top. If I leave the page and then click its tab again, the order is always there, except that this time that it runs again the PL/SQL and it updates the P4_ORDER_TOTAL field to the correct value.

    Can someone explain what is happening here? I can't understand why it isn't like I intend to work.

    Feel free to ask me more questions if I'm not well explained.

    Thanks in advance!

    klanchman wrote:

    I am very new to the Apex and PL/SQL, so I don't know if I did something wrong here.

    Always include the following information in your question:

    • Full version of APEX
    • Complete version/edition/host operating system database
    • Server Web architecture (EPG, SST or APEX listener/operating system host and versions)
    • Browser (s) and version (s) used

    For the layout and Visual set formatting issues. also include:

    • Theme
    • Type of zone
    • Models used

    Here is some info on the dynamic Action itself:

    Event: Change; Selection type: Article (s); Article (s): P4_ITEMS (the shuttle)

    The event (the PL/SQL function running) is also set to pull on the loading of the page. It is near the top not to expect results, so during the calculation, display field disappears briefly.

    Here's the number: P4_ORDER_TOTAL updates only correctly when I first load the page. I enabled debugging but I changed my Shuttle, then checked out.

    He recorded the P4_ORDER_TOTAL element. In this case, we will say it was 363.08. I added an item on the agenda and the PL/SQL is executed. The result, however, is 363.08, although he should have gone to the top. If I leave the page and then click its tab again, the order is always there, except that this time that it runs again the PL/SQL and it updates the P4_ORDER_TOTAL field to the correct value.

    Can someone explain what is happening here? I can't understand why it isn't like I intend to work.

    At the time the dynamic action is executed, the value of P4_ITEMS is not available for the PL/SQL code in session state, it takes place only in the browser. Include P4_ITEMS in elements of Page to submit property the dynamics of the action so that the changed value is updated in the State of session before the PL/SQL code is executed.

  • Level elements dynamic Actions and application

    Request Express 4.1.1.00.23


    I searched everywhere for an answer on this one and I can't seem to find it. Is it possible to have a dynamic action to interact with an element of application level? If it is possible, is able to have the value field in the when a dynamic action article contains a comparison operator?

    An example of a real case would be:


    Element level application F111X = X

    Dynamic action on P4_Item is triggered and disables the field

    Case of falsification:

    Element level application F111X = Y

    Dynamic action on P4_Item is not triggered and the field remains active.

    Thank you
    Jon

    Jon,

    I'm looking for an example, and if I use your article page P4 in the box 'When', event could be the change, Type of selection would be the page element.
    P4 would be selected in the drop-down list item (s), Condition would be equal to and value would be TEST with NO quotes!

    It is difficult for me to know when the values of the quote and when not.

    What is it?
    Howard

  • APEX dynamic action - how to hide an element after the loading of the page

    Hello

    I have a form with the element Type, lesson and page.   I want to create a dynamic as action ' on page load "If Type = x don't then see the lesson and the elements of the page. .

    How can I know if Type = x don't see the lesson and the page. It does not show them.

    Please note the dynamic, action = Page load event

    Thank you

    Try adding

    When the Condition "Javascript expression."

    Value: $v ('P1_TYPE') == 'x')

  • Dynamic action for 2 fields in a table

    Greetings!

    I have a requirement where I need to disable/enable a field in a tabular presentation for a specific record based on the value of another field in the tabular presentation for this record.

    In a concern for discussion, in my particular case - if FISHCOUNT > 1, then the LENGTH must be disabled. If count < = 1, then the LENGTH must be enabled. It should disable it only records where FISHCOUNT > 1.

    I would do it with dynamic action and I learned through this forum (thank you!) that I can use jQuery for the event (when) the section of the dynamic action.

    So that the part would look like:

    Event: change
    Selection type: jQuery Selector
    jQuery Selector: td [headers = "FISHCOUNT"] select
    Condition: above
    Value: 1

    So far so good. But where I'm stuck is how to reference the LENGTH field of the tabular form in the actions of TRUE and FALSE, so that when the change in the event product (FISHCOUNT), the LENGTH is disabled if FISHCOUNT > 1, or LENGTH is enabled if FISHCOUNT < = 1.

    SEO so the scope of the CASE of my tabular presentation in the actions of True and False, that's where I need help.

    Thanks in advance!

    I use APEX 4.1.1

    John,

    You can do this by creating another dynamic action with the event 'Front Page submit' ("framework events" section).
    With real action that executes javascript, load the page uncontrolled.

    $("input:visible:disabled").prop("disabled",false);
    

    This will select all elements disabled entry visible on the page and remove the disabled property.

  • change the results of the report with the selection list using dynamic action

    This is one of those situations where if I could understand the appropriate search terms to use, someone else must have asked this question in the past.

    I have a report with a SQL query with a condition based on a list of selection on the same page. So I have a list of selection -: P177_FISCAL_YEAR

    My request for my report is:

    Select md_id, display_name, description
    of media_tbl
    where fiscal_year =: P177_FISCAL_YEAR

    When a person makes a selection on the selection list (: P177_FISCAL_YEAR), I would like to report up-to-date without having to submit the page. I was hoping that I could do something like this using a dynamic action but have not found a way to do it.

    Thanks in advance!

    John

    Create dynamic Action:

    When
    Event: change
    Selection type: product (s)
    Article (s): P177_FISCAL_YEAR
    Condition: - unconditionally.

    Real Actions (add 2 real actions)
    -the first is to load the value in session state so that the report can see.
    Sequence: 5
    Action: execute the PL/SQL Code
    Code PL/SQL: null;
    Items to submit page: P177_FISCAL_YEAR

    -the second to refresh the report
    Sequence: 10
    Action: Discount
    Selection type: region
    Region:

  • Prevent fireing "Submit BeforePage" - dynamic Action if I click the button CANCEL

    Hello
    I create a dynamic Action on the event "before submitting the Page" which shows me a "Please Wait" - window, if I submit a page. It works very well.

    But if I click the button CANCEL, dynamic Action runs as well. Because of that I put the status "request is NOT contained in the Expression 1" and 1 Expression I put BACK, because demand from the button CANCEL is BACK. Unfortunately it is running if I press the button CANCEL.

    The action is "executing JAVA-code" and the code is:
    $x_Show('AjaxLoading');  
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    What's not here?

    Kind regards
    Mark

    Hi Mark,

    If you change your button 'CANCEL' to a "Redirect to the page of this application" button, the page is not submitted and does not fire the event "before submitting the Page.

    Or if you want to stick with the shipment, you can check for this.data in JavaScript code because that will contain the value of the application to send it. So, for example, you could use

    if (this.data != "ZURUECK") {
      $x_Show('AjaxLoading');
      window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    }
    

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Interactive report case triggering a dynamic action

    Hello

    My interactive report is built, based on the following query

    SELECT ID_OPERACION, NOMBRE_CLIENTE, TOTAL_PAGAR, APEX_ITEM. CHECKBOX (1, O.ID_OPERACION, "onclick ="f_UpdateCollection (this)"', a.c001") "Seleccionar"

    OPERACIONES o, apex_collections a

    WHERE the a.c001 (+) = O.ID_OPERACION

    and a.collection_name (+) = "OPE_COLLECTION".


    I use a collection because I don't want to lose the selected controls caused by paging.


    I would like to add a dynamic action that each time check box is selected, an element (P5_TOTAL_SELECCIONADO) summarizes the column TOTAL_PAGAR of all the checkboxes that are selected and each time a checkbox is unchecked the Total_seleccionado subtracts the value of the selected item.


    How can I do?

    Hi Eva,

    Please check again your application and see if it's what you thought.

    I made a few changes. First, here you were talking about P5_... the elements in your workspace apex.oracle, the page number is 1, so I changed the P5_... elements of P1_...

    Then, you let the fire on the boxes page laod on, but you don't want t function to begin to evaluate during page loading.

    There were also a few errors in the javascript code, I suggested. The VALOR_PAGAR selector was not correct, I've changed a little bit. Also all selected text values are strings and adding javascript strings will be just concatonate them. I made string number conversion for you, also taken into account that null values (P1_TOTAL_SELECCIONADO on page loading is null) cannot be cast to number.

    The result is:

    var VALOR_PAGAR = $(this.triggeringElement).closest('tr') .find ('td [headers = "VALOR_PAGAR"]') .text)

    var TOTAL_SELECCIONADO = $v ('P1_TOTAL_SELECCIONADO')

    VALOR_PAGAR = (isNaN (parseInt (VALOR_PAGAR) = VALOR_PAGAR)? 0: VALOR_PAGAR)

    TOTAL_SELECCIONADO = (isNaN (parseInt (TOTAL_SELECCIONADO) = TOTAL_SELECCIONADO)? 0: TOTAL_SELECCIONADO)

    var total = VALOR_PAGAR + TOTAL_SELECCIONADO

    $s ('P1_TOTAL_SELECCIONADO', total)

    This is the code to add checkboxes checked, false action is the same except for total, which is:

    var total = VALOR_PAGAR - TOTAL_SELECCIONADO

    Kind regards

    Vincent

  • Dynamic action fails using the null value on the list of selection change event

    I have a selection list that I created a dynamic action to which I added a value set to to clear the values of other controls on the form by assigning the value NULL.

    This doesn't seem to work, and I can't understand why it does not work.

    Event = change
    Selection type = Items
    Items = P4_MYSELECTLIST
    (no other condition for this action, I want it to reset for each change in the selection list).

    Fire on the Page Load = False (I only want what he reset values when I use this list of choices, not the page load).
    Set Type = static assignment
    Value = NULL
    Items = P4_ITEM1, P4_ITEM2, P4_ITEM3 (including 2 other lists of selection and control of text)
    Remove the Change = No event

    Xanas,

    If you set the values NULL and not the literal string "NULL" you must change your DA slightly. Modify your game to run JavaScript Code.

    Action = run the JavaScript Code
    Fire on the Page Load = False (I only want what he reset values when I use this list of choices, not the page load).
    Code = this.affectedElements.val ('');
    Items = P4_ITEM1, P4_ITEM2, P4_ITEM3 (including 2 other lists of selection and control of text)

    Edit:
    You can also change the real action to the following if you want to leave your DA as setpoint:

    Fire on the Page Load = False (I only want what he reset values when I use this list of choices, not the page load).
    Set Type = Expression JavaScript
    Value = "
    Items = P4_ITEM1, P4_ITEM2, P4_ITEM3 (including 2 other lists of selection and control of text)
    Remove the Change = No event

    Good luck
    Janet Tyson

    Published by: Tyson Janet on January 10, 2012 09:52

  • APEX 4.0.1: restriction on the maximum number of dynamic actions on a page?

    Hello

    I would like to know if there is a restriction on the number of dynamic actions on a page.
    I have a page with 29 dynamic actions. Everything works fine on the page.
    If I create another dynamic action that display only an alert or nothing else, I have the HTTP 404 error message when I try to view the page.
    If I delete the old dynamic action and create a new one so that the page works fine.
    After several tests, it seems that there is a maximum number of DA on a page, but if someone can confirm that?

    Environment:
    APEX 4.0.1
    Embedded PL/SQL gateway

    Kind regards
    SDDC

    Hi sddc.

    There is no limit on the number of dynamic action that you have on a page, but it is very likely that you hit a size limit of a variable we use during the generation of the JavaScript code for the dynamic actions. You can activate a log more detailed error further details on your 404 error - see http://www.inside-oracle-apex.com/oracle-apex-got-404-not-found-2/ EPG instructions are in the comments.

    BTW, you might be able to reduce the number of you dynamic actions by specifying page several items in the attribute 'Product (s)' from the 'when' the article if all run the same code. Just separate them with a comma (no spaces). Such as: P1_MGR, P1_DEPTNO

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Dynamic action does not work with the item change event

    Hi guys,.

    I have a problem with the dynamic Action. On my page, I have three points. (P2_X-> display only, P2_Y-> P2_Z-> button, TextField) and two dynamic actions. One of them is running javascript. When I press the button (P2_Z) this dynamic action affects textfield (P2_Y) value to display only the value (P2_X). (This dynamic works). And there is another dynamic action for the option to display P2_X. This dynamic action fires to P2_X point value changes. This DA (dynamic action) runs a plsql code and inserts the value of the P2_X element in a table (test_tbl). But when I try to do it always inserts the null value.

    The plsql code is below:

    Start
    INSERT INTO TEST_TBL
    VALUES (: P2_X);
    COMMIT;
    end;


    You have an idea? If you need, I can give the user for apex.oracle.com past.

    Thank you

    Hello

    Do you have the "points Page to submit" to the process of PL/SQL, the value of the correct item? (P2_X)

    Concerning
    J :D

  • Dynamic action - two types of options of "condition"?

    I would like to create a dynamic action that runs when a SQL condition exists is met.  If this is the case, then it will run several true Actions.  If this isn't the case, it will run several wrong Actions.

    I see there is an option of Condition in the when section of her DA, however, seems to be limited to static value comparisons or Javascript.  There is also another section of Condition where you can select SQL exists or various other PL/SQL expressions.  What is the difference between these options two condition?

    Also, when I set the status section to Exists and in the SQL query include an equivalence to an element of the page it does not seem to recognize the value of the page element. For example:

    Select * from my_table

    where PARTY_NUMBER =: MY_PARTY_NUMBER

    It still fails the condition even when a valid part number is entered on the page (him DA is run when MY_PARTY_NUMBER is changed).  I should be able to enter a reference point of page here, Yes?

    Thank you

    Steve

    P.S. I use 5 APEX

    Steve. 1234555 - Oracle wrote:

    I would like to create a dynamic action that runs when a SQL condition exists is met.  If this is the case, then it will run several true Actions.  If this isn't the case, it will run several wrong Actions.

    I see there is an option of Condition in the when section of her DA, however, seems to be limited to static value comparisons or Javascript.  There is also another section of Condition where you can select SQL exists or various other PL/SQL expressions.  What is the difference between these options two condition?

    Also, when I set the status section to Exists and in the SQL query include an equivalence to an element of the page it does not seem to recognize the value of the page element. For example:

    Select * from my_table

    where PARTY_NUMBER =: MY_PARTY_NUMBER

    It still fails the condition even when a valid part number is entered on the page (him DA is run when MY_PARTY_NUMBER is changed).  I should be able to enter a reference point of page here, Yes?

    N ° you won't achieve what you're trying to do. The standard Condition section in dynamic action controls if the code of the dynamic action is rendered the see page. It has no impact on the question of whether the actions of true or false are performed during the intervention of the user. Control conditions which are those defined in the when the properties of the dynamic action. As they are evaluated in the browser, they must be specified as JavaScript.

    To perform actions conditionally based on the existence of rows in a table requires DA type body of the PL/SQL function or SQL, submitting the values of the requested page, runs the necessary query and returns a value to an element of [probably hidden] page, followed by either an action to run Javascript Code containing conditional logic , or another DA triggered by a change on the hidden element event.

  • Infinite loop of dynamic Action

    Hello

    I have a page with the number of days, start date and end date.
    If I change the number of days, I want to put the end date, based on the start date + num days.
    I also want to go in the other direction, so if they enter an end date, it will calculate the number of days.
    I have dynamic measures for the latter and both work very well. The problem is that I get a stack overflow error a second about. I guess it's stuck constantly running dynamic stocks 2 one after the other, each triggering the each other.

    Does anyone else have this problem? And how do solve you it?

    Thank you
    Richard

    Hi Richard,

    I would stick with your PL/SQL code to perform the calculation and follow these steps:


    1. Create something hidden, that will be used to store the calculated value.

    2. Ensure that your 'set value' sets the value of the element hidden, with the result of your calculation of PL/SQL.

    3. In the same dynamic action, create another 'Action', that fires after the 'value of the value"which copies the value returned in the element of the corresponding page. Use the action type 'Execute JavaScript Code', with something like the following:

      apex.jQuery('#P1_END').val($v('P1_HIDDEN'))
      



    This should circumvent the problem of infinite loop and still allow you to use PL/SQL to do the math. I also added an enhancement request to allow optional triggering of the 'Change' event deletion when you use the action type "set the value, in order to more easily avoid this type of scenario. Is considered for a future version of the APEX.

    It will be useful.

    Anthony.

Maybe you are looking for

  • Question of Toshiba AT10-r: charging: mini-usb connector port is broken

    My tablet to-10A is plu 1 year bit (expired warranty then). It will no longer charge. I have already answered a few messages in the forum that indicated similar problems. Let me continue on another where I can give you a few other updates. There is n

  • User Scripting interface: getting value of isAccessibilityEnabled

    When a menu item is grayed isAccessibilityEnabled is set to 'NO' in the Inspector of accessibility. Is it possible to obtain this value for use in a conditional test so that I don't have to click on an unavailable menu item?

  • HP Envy 17-inch: external monitor

    HelloI just got a HP Envy, 17 inches, and I have a HP 25 inch monitor I want to connect to it. It was the "old style" connector that was leaning on my old HP Entertainment Notebook. Not on the new! Should which adapter I do? I have a HDMI port on the

  • Scanerror 6

    Hi, whenever I want to scan I scanerror 6. Turn of and on, then scqn is ok but the next scan error returns. The printer is a mfp laserjet pro 400 475nf. Thank you

  • Incedimail service

    Cannot open Incredimail APP. Efforts to repair unsuccessful computer, how to download latest latest version of Incredimail?