dynamic action on the selected value shuttle

Hello

Can anyone help me in this.

I guess a requirement

There is a shuttle Apex and multiple selection is allowed

and there are values such as:-others, first, second

but when we choose other no other value should be able to select

in what other is selected in the shuttle a textbox is displayed by dynamic action

example on https://apex.oracle.com/pls/apex/f?p=76604:3:4326822625865:

workspace:-REEMATEST

username:-test

password:-test

76604 application

page 3

ReemaPuri wrote:

can you give me a link for the dynamic creation of checkbox

FOR EXAMPLE BASED ON CREATED LOV SHARE COMPONENT

Select the column name as the name of column d, r

the name of the table

Boxes are just another way to make a LOV. For a dynamic set of checkboxes, the standard pair of value/label LOV SQL projection is required in the definition:

select initcap(dname) l, to_char(deptno, 'tm9') v from dept
order by v asc

If additional values are required, they can be included in the query using unions:

select initcap(dname) l, to_char(deptno, 'tm9') v from dept
union all
select 'Other', 'OTHER' from dual
order by 2 asc

Checkbox events can be handled by dynamic actions as indicated on page 586 of your test App. Note that I prefer to enable and disable the controls on form rather than hiding and showing them that there is less confusion for the user. It is simple to change the disable/Enable dynamic actions to hide and show if necessary.

Tags: Database

Similar Questions

  • Help with dynamic action and the selection list item

    G ' Day Apex gurus.

    I have problems trying to achieve to trigger the Help window from an element automatically select. A Help window is triggered when it is clicked on the label of an item, but my customer wants to be triguered automatically as soon as the user clicks to view the options in the select list.

    I think I should be able to do with dynamic actions but I can't function.

    I know when someone clicks on the label of the item selection list trigger this JavaScript

    JavaScript:popupFieldHelp('277938589795252851','1545903379570909')

    So I want to trigger the javascript also when the user click on the item selection list and pull down the options and for that I think that the dynamic action is the way to go, but I can't do things.

    That's what I have to do:

    I created a dynamic option as follows:

    Name: test
    Sequence: 30
    Even: click
    Selection type: product (s)
    Article (s): P1_RATING <-a selection list item
    Condtion: - no requirement.

    Real Actions
    Sequence: 10
    Action: Run the JavaScript Code
    Fires when the result of the event is: true
    Fire on loading the page: checked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')

    Thank you anyone who can tell me what I'm doing wrong here or bring a solution to my problem to trigger the Help window from an element automatically select.

    Kind regards
    Carlos

    Hi Carlos,

    I've set up a test case of exactly in the same way and it worked fine for me. I've created a page element called P1_DA_DEMO and added some values of the static selection list, then added a help text. I used the settings are lower, I suggest you try again, but also make sure that you have no other Javascript errors on the page. Use a tool like firebug to check.

    Name: Action Dynamics demo
    Sequence: 10
    Even: click
    Selection type: product (s)
    Product (s): P1_DA_DEMO<- a="" selection="" list="">
    Condtion: - no requirement.

    Real Actions
    Sequence: 10
    Action: Run the JavaScript Code
    Fires when the result of the event is: true
    Fire on loading the page: unchecked
    Code: javascript:popupFieldHelp('277938589795252851','1545903379570909')

    Scope of the event set a Bind s.

    Thank you

    Paul

  • Can not set a value by the executed dynamic action on the page element "selection list."

    I created an agenda of the page 'list of selection' and I want to when I change a value in another element of the page set only 'screen '.

    I created a dynamic action on the page element "selection list" for this.

    These are the dynamic action attribute:

    When:

    ======

    Event: change

    Selection type: point

    Article: P29_PURCHASE_ORDER

    Condition: No strings attached

    Advanced:

    ========

    Scope of the event: static

    Identification:

    ==========

    Action: Set

    The ' Action Page when the changed value "attribute of the element of 'list of selection' = 'None', and when I run form the dynamic action run and set the value for once and do not update the value according to the change in the article"list of selection. "

    Note: when I change the previous attribute of 'Redirect and set', dynamic action run and properly value, but the value was hidden soon

    I want to value when the value of change of select list according to this change successfully.

    Please, advice me,

    Best regards

    Mustafa Ezzat

    Hello

    you set the value of the 'Page elements to submit' to P29_PURCHASE_ORDER?

    Then, the SQL statement would use the current selected value.

    This is the help text says: "specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your"SQL statement"," PL/SQL Expression"or"Body of the PL/SQL function".»

    Kind regards

    Erik-jan

  • dynamic action sets the value of the element, but not save to DB on submit

    I'm working on a page where the value of several to show only the page elements are defined using a dynamic Action.  They are set when the user selects a value in a list of selection (and is based on the value of the selection list).  Dynamic action is triggered on a list selection change event and then runs the real action "set the value.  The selection list displays the names of sales representative.  The three fields dynamically filled are the org structure (that is, their chain management).

    For the action to set the value, I use a defined Type of SQL statement:

    Select VP, DIR, MGR

    of SALES_ORG where SSR =: P20_SSR

    In the affected elements, I have fixed Type of selection to the 'item (s)"and the value of the Item (s) for 'P20_GVP, P20_DIR, P20_MGR.

    Dynamic action works fine for the display of the page (that is, when I select a sales representative in the selection list dynamic action properly updated only display value fields three).  This page is a form in which the user submits information relating to the rep.  When the page is sent, all fields are filled in a new record of DB with the exception of three that were populated dynamically above.  These fields get the values NULL.

    When the dynamic action updates the values in the three fields is - it does not set the value of session?  Why these fields don't are not taken into account in the submit other ideas > process Page?

    I use 5 APEX with Chrome on Mac (Yosemite).

    Thanks for the note.  I didn't only display the items could not be used in this way.  I think I'll take a different approach with the design; given that the org structure is in another table that I can simply refer to that by rep when necessary rather than saving the information uploaded to the page of the form.  The reason why I have not fill the screen only the points of loading the page is because I don't know what the values should be until the user selects a sales representative in the selection list.

    I'll change the design to one of the following:

    1) change the display only items of standard text field.  NOTE: if I make the text read-only field that causes other problems when loading (I get the message "violation of protection Session state").

    OR

    2) do not include org structure in the download folder and just refer to table org Rep when necessary.

    Thank you!

    Steve

  • Dynamically set a value based on the selected value of LOV

    Apex 4.2

    I can't create a dynamic action to set a value. I have used dynamic actions to hide and display areas but for some reason any cannot set a value.

    I have a list of selection-> P101_LIST. Type of source is "Column of the database". Source of value or an expression is "person_id" the query is as follows:

    Select first_name, person_id
    From Persons
    

    I have a display-> P101_DISPLAY value. Source type is 'static Assignment. The source value or expression that I left blank.

    I would like for each time the user selects a name of P101_LIST, the P101_DISPLAY element is updated to display the value (person_id) correspondent.

    Because there are other page elements / information on the page, I prefer that to not submit / update of the page. Would not want other page elements / information update.

    Any help on this would be greatly appreciated. Thanks in advance.

    Hello

    Create a DA:

    -event onChange P101_LIST

    -Action: PL/SQL

    -PL/SQL code:

    : P101_DISPLAY: =: P101_LIST;

    What to submit: P101_LIST

    Point of return: P101_DISPLAY

    And in fact.

    Kind regards

    Joni

  • Dynamic action - defining the value of affected parts

    Hello

    I'm a little trouble trying to set the value of several items affected in dynamic Action (refresh the number of the part to Page 2). Page 2 I want the user to select the order number and fill in the items combines automatically, for example part number Descr. I can make it work for Part_Number, but the same value appears when I add P2_DESCR to items assigned to set the value. I'm probably doing something really stupid!

    http://Apex.Oracle.com/pls/Apex/f?p=11536:2

    Kind regards

    Mickey

    Hi Mickey,

    It is not as easy as it should be, even. You certainly do not make something stupid at all!

    Currently the action 'Set value' support only 1 distinct value. You might have other 'Action' within the same dynamic action that returns the other element you want, but it's inefficient, you need to make 2 round trips to the server to retrieve each value. We are looking for the opportunity to put multiple values without needing more trips to go back out of the box in a future release, but for now I think the best approach is to use a custom mix of dynamic measurements, JavaScript and a level of page AJAX callback.

    For this example, I use the EMP table, where the user selects the number and the name of the employee and employment are returned, but the technique can be used for your situation.


    1. Add a page 'AJAX Callback' called 'GET_EMP_INFO', make the type "PL/SQL" with a "Point of process" of "On Demand - run this process when requested by AJAX ' and add the following code:

      begin
          for c in (select ename, job from emp where EMPNO = to_number(:P1_EMPNO)) loop
           apex_util.set_session_state('P1_ENAME', c.ename);
              apex_util.set_session_state('P1_JOB', c.job);
              /* Add more set_session_state calls here if you want to return more item values */
          end loop;
          apex_util.json_from_items('P1_ENAME:P1_JOB');  /* Add more here for returning more values */
      end;
      

    2. Create a dynamic action "Advanced" (because we need to use the action "Run JavaScript Code"), with the following attributes:

      • 'Change' - to the fire of the dynamic action every time the number value used change event.

      • Selection of Type 'Article (s)' - to be able to select the element of page employee number.

      • Article (s) "P1_EMPNO" - the page employee number element.

      • Real Action "to execute JavaScript Code. If you want details on the loading of the page as well, make sure that the 'Fire when loading the Page' checkbox is checked. Add the following "Code":

        var get = new htmldb_Get(null, $v('pFlowId'), 'APPLICATION_PROCESS=GET_EMP_INFO', $v('pFlowStepId'));
        get.add('P1_EMPNO', $v('P1_EMPNO'));
        gReturn = get.get();
        json_SetItems(gReturn)
        get = null;
        





    So, basically, that's all. I recommend this approach for now, until better support us in native mode to set multiple values, or a plug-in dynamic action arises that does just that!

    Hope that helps.

    Kind regards
    Anthony.

  • Dynamic action on the region

    Hello

    Request Express 4.1.0.00.32

    I have a report region on a page that is conditionaly displayed depending on the value of an element of page Pn_ITEM = "HIDE".

    I have dynamic stock running on the page that fill a collection and update the report without the need to submit the page. However, I need to show the report somehow when the collection contains at least one of the members present.

    I tried the following:

    1st real action running pl/sql that adds a record / member of a collection, then a 2nd action sets the value to a page Pn_ITEM = true 'SHOW' action item and a 3rd that should show the region based on the value of the real action 2.

    My collection has an added member. The value 'SHOW' is applied to my article on Pn_ITEM page by the dynamic action but the region of report I want now displayed is not displayed. Obviously if the page is submitted, the report will now be shown however I can't send the page at this stage that's why I need to do this dynamicaly or through javascript and on the application process.

    Any ideas how to get my region report to display once the collection has at least one member without submitting the page?

    Thanks in advance.

    Remove the requirement for the view from the region. You don't want this here since it completely stops rendering region if the condition is not fullfilled to the render time. You want that he made, but not displayed.

    Add css to the region (inline, class):

    style="display: none;"
    

    Add real action that will do a refresh on your area (component - refresh, select your report as an affected item region).

    Now, either:
    Add a real action of type run javascript. Since you can not put conditions on the real actions, we will test the condition in javascript.
    Choose one:

    if($v("Pn_ITEM")=='SHOW'){
    //if you want to target the region to be shown by an ID (static id?)
    $("#region_id").show();
    };
    
    if($v("Pn_ITEM")=='SHOW'){
    //if the triggering element would be the region to be shown
    $(this.triggeringElement).show();
    };
    
    if($v("Pn_ITEM")=='SHOW'){
    //if you'd want multiple affected elements to be shown at once drop the [0]
    $(this.affectedElements[0]).show();
    };
    

    Create a new dynamic action that has the same conditions of release as your other dynamic action.
    Specify a when condition:

    $v("Pn_ITEM")=='SHOW'
    

    Create a real "Show" type action to show the region.

    Final result should be your dynamic action creating an item in the collection, an update of the report based on the item (but still not represented) and finally a show in the region.

    Remember that stocks will also fire on page load (so don't forget to check the box on the actions of true), otherwise the region does not appear initially.
    I would say that the item is probably not necessary, but depends on any other logic, you might have on your page and possibly interacts with it.

  • Dynamic action in two selection list

    Hi all

    I created two select lists.one is parent of other child.

    I can get the child list correctly from the article values parent lov cascading

    For example: the company name of parent element values: x, y, z, etc.

    x with 3 customers say a, b, c

    There is no customer for y

    z with 2 customers say e

    now, I want to hide the element of the child when the parent having no child.

    Now when I select 'y' for the example above, I would like to hide the child element.

    How can I do?

    Hello

    You can do the following:
    1. create a hidden page element, say PX_HIDE_SHOW_FLG
    2. create a dynamic Action of type 'Set value' on the element parent to update PX_HIDE_SHOW_FLG. You can choose the "value Type" as "body of the PL/SQL function. The code in the function must return "Y" or "n" based on logic (count the number of children under the selected parent). You can trigger this DA on 'change' of the parent element.
    3. now, create another DA on PX_HIDE_SHOW_FLG to hide and show the child LOV article based on its value. For example, if value (of the page hidden item) = 'Y', and then hide, another show.

    Thank you
    Rohit

  • According to the selection value hide/show page list item

    Hi all
    I have a list of selection P_X (with Char, varchar2, number values).
    When I select the tank it must display P_Max (text box), if I select the number he must display two textboxes (P_Text1, P_text2).
    By default it should not display any page except P_X element.
    How can I achieve this by creating dynamic actions.
    I tried a dynamic textbox P_max display action when I click the Char value in the select list (P_X)

    After presenting the process:
    Start
    : p_x: = "Char";
    end;

    Condition:
    Value of exp1 = exp2
    Exp1:P_X
    EXP2:char

    dynamic action:
    event: change
    Select the type: article
    product (s): p_x
    condition: equals
    value: Char
    Real action: see question: p_max

    But it is not workking correctly.

    Hi Karthikeyan,

    Sorry for the late reply, stuck with another work.

    Now you check in your example I changed it accordingly. According to me, he answered your question, check in.

    Kind regards
    Mini

    Brand responses appropriately.

  • 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.

  • Call a method before the following operation to set the selected values

    Use case: I display a VO as an ADF multiple checkbox select. This VO is the detail of a master/detail. I managed to store the selection state in a bean managed on autoSubmit. Then the user navigate to the record of the master, and then goes back to the previous record. The buttons next and previous were created using operations in data controls. I want to back up the State of the selection by clicking previous or next.

    There are a lot of tutorial on how to get the selected values, but none on how to set the selected values. How would you do it?

    11 GR 1 material JDev

    What I ended up doing:

    1 redefine listener action for the navigation buttons

    {} public void nextQuestion (ActionEvent event)

    saveSelectedState();

    navigateQuestion ("Next");

    restoreSelectedState();

    }

    {} private void navigateQuestion (string operation)

    OperationBinding operationBinding = ADFUtils.findOperation (operation);

    operationBinding.execute ();

    }

    2 Save and restore the selection state using bindings

    Guava Multimap

    Private ListMultimap selectedIndices.

    private void saveSelectedState() {}

    Get id question

    DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");

    Question of rank = questionBinding.getCurrentRow ();

    Number questionId = (Number) question.getAttribute ("Id");

    JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");

    int [] valueIndices = listBinding.getSelectedIndices ();

    selectedIndices.putAll (questionId, Ints.asList (valueIndices));

    }

    private void restoreSelectedState() {}

    Get id question

    DCIteratorBinding questionBinding = ADFUtils.findIterator ("QuestionsView1Iterator");

    Question of rank = questionBinding.getCurrentRow ();

    Number questionId = (Number) question.getAttribute ("Id");

    int [] valueIndices = Ints.toArray (selectedIndices.get (questionId));

    JUCtrlListBinding listBinding = (JUCtrlListBinding) ADFUtils.getBindingContainer () .get ("AnswersView2");

    listBinding.setSelectedIndices (valueIndices);

    }

  • Exception while trying to get the selected value for the choice of SelectOne in ADF Mobile

    I added the following code after arriving through this post https://forums.oracle.com/thread/2536419

    DCBindingContainer dcBindings = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();

    DCIteratorBinding iterBind = (DCIteratorBinding) dcBindings.get ("facilitySelectItems");

    Attribute String = (String) iterBind.getCurrentRow () .getAttribute (0);

    But Jdeveloper complained class BindingContext wasn't available and I get the jar file adfm.jar has not been added to the project. I added it manually the path C:\JDeveloper11r24\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar. Once I've deployed code on an android emulator, I get the below error. Can someone please?

    07-25 13:18:03.812: D/CordovaLog (869): [SEVERE - oracle.adfmf.framework - adf.mf.internal - logError] request: {classname: oracle.adfmf.framework.api.Model; method: evaluateMethodExpression; params: [0: #{pageFlowScope.IBCMSearchBean.getSearchParams}] [1:] [2: {}] [3:] ;} exception: {message: oracle/adf/model/binding/DCBindingContainer (unsupported major.minor version 50.0); the severity: ERROR; .Guy: oracle.adfmf.framework.exception.AdfException; .exception: true ;}}}

    The version of the compiler maximum the JDev shows that 1.4. And I'm using version 11.1.2.4.0 for JDeveloper. The JDK version is 1.6.0_24.

    Sorry I missed the question!

    First of all, to get the value of selectedItem in selectOneChoice do not have another function in the domain controller. Here is an excellent article by Frank that explains this. Or you can use the below function to get the selected value immediately. Here the market is the value of selectOneChoice attribute. I wasn't aware of this method until you have read this article.

    {} public void getAndSetMarketValue (market of the object)

    ValueExpression ve = (ValueExpression) AdfmfJavaUtilities.getValueExpression ("#{bindings.marketSelectItems}", Object.class);

    AmxAttributeBinding attrBinding = (AmxAttributeBinding) ve.getValue (AdfmfJavaUtilities.getAdfELContext ());

    access the iterator that populates the list of values in

    the selectManyChoice component

    AmxIteratorBinding amxListIterator = attrBinding.getIteratorBinding ();

    the AmxIteratorBinding is a wrapper for the BasicIterator

    iterator which sets out the information we need

    ListIterator BasicIterator = amxListIterator.getIterator ();

    for each index value, query the name of the service (you can

    access and attribute from the line) to display

    SelectedValue = string

    (String) listIterator.getAttributeValueAtIndex (((New Integer ((String) market))) .intValue (), "Value");

    }

    Second, you can use #{row} in commandLink's action since it is something that is evaluated when the user clicks on the link and we do not have access to #{line} after that the entire component is rendered. To remedy this give an action for the commandlink which is a function in the bean and the function of bean back to the action of the link selected.

    ListOfReports.amx

    .......

    .......

    LoginBean.java

    ......

    public String returnClickValue() {}

    Option of string = AdfmfJavaUtilities.evaluateELExpression("#{viewScope.selectedItem}").toString ();

    return option;

    }

    ......

  • SelectManyShuttle: get the selected values

    Hi all.

    My task is to make declarative component (or any other reusable solution) that contains the selected component to many shuttle and should proceed with a treatment of the selected values (IDs and labels). During this operation, I found that this shuttle component returns the bean always and only point index, nothing more.
                  <af:selectManyShuttle label="" id="sms1"
                                        styleClass="AFStretchWidth"
                                        value="#{MyBean.selected}"
                                        valueChangeListener="#{MyBean.shuttleChangeListener}"
                                        valuePassThru="true">
                    <f:selectItems value="#{attrs.items}" id="si1"/>
                  </af:selectManyShuttle>
    First of all, I tried MyBean.setSelected and found it is called with list < integer > instead of < SelectItem > list or any similar. These integers is the index 0 of selected lines. Then I tried to valuePassThru, but it triggered a mocking effect only: setSelected receives List < String > with the same values of the index 0 chained. Finally, I tried valueChangeListener and newValues - everything was the same, both in JDeveloper corresponding 11.1.1.5 & 11.1.2.1 with ADFs. Googling did me a lot of links--say, the need to get the values selected from the selectManyShuttle --but nothing that I can use.

    Maybe I should get a model and an iteration, but in several tests (for example, ((MyBean) this) .getAttribute ('items')) I failed to locate him. In any case, I would be happy to see that any solution work.

    What do you get when solve you the EL "#{attrs.items}" in the method of bean? Not sure if you have access to everything or what you get in return, but you can try.
    Just put a breakpoint in the method and type the EL in the evaluator 'EL' and see if you get something in return and what type it is. I hope you have the list you put in to fill the shuttle.

    Timo

  • Dynamic action - Get the difference between two dates + times

    I have problems a little dynamic to work action. I'm trying to get the time between two dates with the time difference.

    Here is what I got (this is apex 4.0):

    Two date pickers + two numbers fields (date/start/end times)

    I created a dynamic action on the page who fires on the point lose focus (above points).

    The real action for the DA is the body of the PL/SQL function:
    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_char(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MON-YYYY HH:MIAM');
      end_date := to_char(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MON-YYYY HH:MIAM');
      :P1_HOURS := end_date-start_date;
    End;
    When I change the values on the page, I get the following error:

    AJAX call back Server error ORA-06502: PL/SQL: digital or value error: character number conversion error to set the value.

    I'm guessing that there is a problem with the date formatting, but I can't make it work. Thanks in advance!

    Hi djston,

    because you chose the dynamic action of 'Set value' with the "Body of the PL/SQL function" type you need to return the value. Try the following code

    declare
      end_date DATE;
      start_date DATE;
    Begin
      start_date := to_date(:P1_START_DATE || ' ' || :P1_START_TIME, 'DD-MM-YYYY HH:MIAM');
      end_date := to_date(:P1_END_DATE || ' ' || :P1_END_TIME, 'DD-MM-YYYY HH:MIAM');
      RETURN (end_date-start_date)*24;
    End;
    

    and P1_REQUESTED_HOURS like 'item affected. "

    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

    Published by: Patrick Wolf on January 17, 2011 10:54

  • Save the selected value from the ListBox with its respective values control tab dropdown selected in another list box

    Hi all

    I'm doing a vi where I save the selected value from the ListBox with values respective tab control dropdown selected in another list box. Whenever I select Item1 can change of course and the respective tab will be open for this element. But now I want to just save the selection and put it into another ListBox.SO I can't renmove or add my wishes. Please help me.

    It will work.

    Probably not the greatest solution well.

Maybe you are looking for