Selector - return and displaying the selected value

Hello all, I have problem with selector which is connected to the simple XML through XMLDataModule.

Definition:

{} Selector
ID: piCountry
Title: qsTr("Country:") + Retranslate.onLanguageChanged
dataModel: {XmlDataModel}
Source: "states.xml".
}
pickerItemComponents:]
{PickerItemComponent}
type: "ListItem".
content: {container
{Label
text: pickerItemData.title
}
}
}
]
onSelectedValueChanged: {}
var piCountry.dataModel.data = selectedItem ([0, selectedIndex (0)]);
Console.log("Selected>"+SelectedItem.Text)
}
                       
}

STATES. Model XML:


   
   
   
   
   
   
   
   
   

...

1. I can't achieve good get selected value based on the index selected. After Exchange of selected value, the error message appears:

ERROR: UIObjectPrivate::notifyMessage: unable to set the focusIsDelegatedToColumn property
ERROR: UIObjectPrivate::notifyMessage: unable to set the focusedColumn property
some > undefined

2. is it possible to display the value selected in the selector bar (after choosing and collapsing)?

Thanks for any idea, I have been addressed in the morning but no reasonable results so far.

Thank you.

Karel

Looks like you're missing the good at the end, add a ".title' in there like this:

var selectedItem = piCountry.dataModel.data([ 0, selectedIndex(0) ]).title;

Here is an example of a complete code of a similar selector to select a State, and also has a method to set the value of an external call and a method to change the title, once the switch has been reduced (must cover your 2nd question).

/* Copyright (c) 2014 BlackBerry Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *  Created on: May 5, 2014
 *  Author: Mark Sohm
 */

import bb.cascades 1.2

Picker {
    property string stateValue: ""
    id: siteStatePicker
    title: "State"
    kind: PickerKind.Expandable
    dataModel: XmlDataModel {
        id: stateModel
        source: "../xml/US_States.xml"
    }
    pickerItemComponents: [
        PickerItemComponent {
            type: "state"
            content:
            Label {
                id: stateLabel
                text: pickerItemData.name
            }
        }
    ]
    onSelectedValueChanged: {
        siteStatePicker.stateValue = dataModel.data([0, selectedIndex(0)]).name;
    }

    onExpandedChanged: {
        if (!expanded)
        {
            siteStatePicker.title = siteStatePicker.stateValue;
        }
    }

    //Used to set the selected state.
    function setState(state)
    {
        for (var count = 0; count <= 49; count++)
        {
            if (state === stateModel.data([0, count]).name)
            {
                siteStatePicker.select(0, count, ScrollAnimation.None);
                siteStatePicker.stateValue = stateModel.data([0, count]).name;
                siteStatePicker.title = siteStatePicker.stateValue;
            }
        }
    }
}

It's xml data.


    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    

Tags: BlackBerry Developers

Similar Questions

  • The column is to summarize all the lines and display the same value in all the lines.

    Hello

    Please see the query below. I have a problem in this query to retrieve the abs_qty when the P:item ie setting) msib.segment1 is not given as an input parameter. His warning just to the top of the total quantity for all items. With the passage of P:item ie) msib.segment1 as an input parameter, it gets the exact value for abs_qty. kindly help me to solve this problem.

    Note only: manufacturing plant, start date and end Date are Mandatory parameters (required). Others such as code point, Base model and Scheduler are optional.

    SELECT mmt.transaction_date date_produced, msib.segment1 point,
    CIC.cost_type_id, msib.description item_description,
    MC.segment6 base_model, mc.segment7 trade_brand,
    MMT.subinventory_code subinventory,
    mil. Segment1 | '.' || mil. Segment2 | '.' || mil.segment3 ELECTROLUX,
    OOD.organization_code
    || '-'
    || OOD.organization_name manufacturing_plant,
    MMT.transaction_quantity quantity_produced,
    MTT.transaction_type_name transaction_type, msib.inventory_item_id,.
    MSIB.organization_id, cic.material_cost, COST,
    CIC.material_overhead_cost transport, csc.standard_cost,.
    * (check (NVL ((SELECT SUM (mmt.transaction_quantity) total_NET_qty *))))
    OF mtl_material_transactions mmt.
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = "Completion of work in PROGRESS"
    AND mts.transaction_source_type_name = 'job or schedule. "
    AND msib.segment1 = NVL (: p_item, msib.segment1)
    AND ood.organization_code =: p_manufacturing_plant
    AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
    AND: p_end_date), 0)
    -
    * (NVL ((SELECT SUM (mmt.transaction_quantity) total_NET_qty *)))
    OF mtl_material_transactions mmt.
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = "Ongoing work exit"
    AND mts.transaction_source_type_name = 'job or schedule. "
    AND msib.segment1 = NVL (: p_item, msib.segment1)
    AND ood.organization_code =: p_manufacturing_plant
    AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
    AND: p_end_date
    *), 0))) abs_qty of the double) AS ABS_qtyy, * (select (NVL ((SELECT SUM (mmt.transaction_quantity) total_NET_qty
    OF mtl_material_transactions mmt.
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = "Completion of work in PROGRESS"
    AND mts.transaction_source_type_name = 'job or schedule. "
    AND msib.segment1 = NVL (: p_item, msib.segment1)
    AND ood.organization_code =: p_manufacturing_plant
    AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
    AND: p_end_date), 0)
    -
    (((SELECT SUM (mmt.transaction_quantity) total_NET_qty NVL
    OF mtl_material_transactions mmt.
    mtl_system_items_b msib,
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND mmt.organization_id = ood.organization_id
    AND mtt.transaction_type_name = "Ongoing work exit"
    AND mts.transaction_source_type_name = 'job or schedule. "
    AND msib.segment1 = NVL (: p_item, msib.segment1)
    AND ood.organization_code =: p_manufacturing_plant
    AND BETWEEN TRUNC (mmt.transaction_date): p_start_date
    AND: p_end_date
    (), 0))) abs_qty of dual) * csc.standard_cost AS abs_val
    OF mtl_material_transactions mmt.
    mtl_system_items_b msib,
    mil mtl_item_locations
    mtl_transaction_types mtt,
    org_organization_definitions ood,
    mtl_txn_source_types mts,
    MC mtl_categories,
    mtl_item_categories mic,
    MCS mtl_category_sets,
    cst_item_costs cic,
    cst_standard_costs csc,
    cst_cost_types ct,
    mfg_lookups OLM
    WHERE mmt.organization_id = msib.organization_id
    AND msib.inventory_item_id = mmt.inventory_item_id
    AND mmt.locator_id = mil.inventory_location_id
    AND mil.organization_id = msib.organization_id
    AND mil.subinventory_code = mmt.subinventory_code
    AND mmt.transaction_type_id = mtt.transaction_type_id
    AND msib.organization_id = ood.organization_id
    AND mic.category_set_id = mcs.category_set_id
    AND mc.category_id = mic.category_id
    AND mc.structure_id = mcs.structure_id
    AND mic.inventory_item_id = msib.inventory_item_id
    AND mic.organization_id = msib.organization_id
    AND mcs.category_set_id = 52487965
    AND msib.inventory_item_id = cic.inventory_item_id
    AND msib.organization_id = cic.organization_id
    AND ct.cost_type_id = cic.cost_type_id
    AND cic.organization_id = ood.organization_id
    AND mil.inventory_location_id = mmt.locator_id
    AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
    AND mmt.transaction_action_id = mtt.transaction_action_id
    AND mmt.transaction_source_type_id = mts.transaction_source_type_id
    AND mmt.transaction_action_id = mlo.lookup_code
    AND mmt.inventory_item_id = csc.inventory_item_id
    AND mmt.organization_id = csc.organization_id
    AND csc.last_update_date > =.
    (SELECT MAX (csc1.last_update_date)
    OF cst_standard_costs csc1
    WHERE csc1.inventory_item_id = mmt.inventory_item_id
    AND csc1.organization_id = mmt.organization_id)
    AND msib.segment1 = NVL (: p_item, msib.segment1)
    AND NVL (mc.segment6, 'X') = NVL (: p_base_model, NVL (mc.segment6, 'X'))
    AND = NVL (msib.planner_code, 'Y')
    NVL (: p_planner_code, NVL (msib.planner_code, 'Y'))
    AND SUPERIOR (mlo.meaning) = "COMPLETION of the ASSEMBLY.
    AND mtt.transaction_type_name = "Completion of work in PROGRESS"
    AND ct.cost_type = 'Frozen '.
    AND mts.transaction_source_type_name = 'job or schedule. "
    AND ood.organization_code =: p_manufacturing_plant
    AND BETWEEN TRUNC (mmt.transaction_date): p_start_date AND: p_end_date

    If abs_qty and, accordingly, abs_val must not be the same for all rows returned, you will need to rewrite your query so that the abs_qty will not be calculated (separately) in isolation without interaction with the data in the main table list.
    Your query is treated the same as below (note the changed table alias by adding numbers to the original of yours)

    SELECT mmt.transaction_date date_produced,
           msib.segment1 item,
           cic.cost_type_id,
           msib.description item_description,
           mc.segment6 base_model,
           mc.segment7 trade_brand,
           mmt.subinventory_code subinventory,
           mil.segment1 || '.' || mil.segment2 || '.' || mil.segment3 LOCATOR,
           ood.organization_code || '-' || ood.organization_name manufacturing_plant,
           mmt.transaction_quantity quantity_produced,
           mtt.transaction_type_name transaction_type,
           msib.inventory_item_id,
           msib.organization_id,
           cic.material_cost COST,
           cic.material_overhead_cost freight,
           csc.standard_cost,
           (select (NVL(
                        (SELECT SUM (mmt1.transaction_quantity) total_NET_qty
                           FROM mtl_material_transactions mmt1,
                                mtl_system_items_b msib1,
                                mtl_transaction_types mtt1,
                                org_organization_definitions ood1,
                                mtl_txn_source_types mts1
                          WHERE mmt1.organization_id = msib1.organization_id
                            AND msib1.inventory_item_id = mmt1.inventory_item_id
                            AND mmt1.transaction_type_id = mtt1.transaction_type_id
                            AND mmt1.organization_id = ood1.organization_id
                            AND mtt1.transaction_type_name = 'WIP Completion'
                            AND mts1.transaction_source_type_name = 'Job or Schedule'
                            AND msib1.segment1 = NVL (:p_item, msib1.segment1)
                            AND ood1.organization_code = :p_manufacturing_plant
                            AND TRUNC (mmt1.transaction_date) BETWEEN :p_start_date AND :p_end_date
                        ),0
                       ) - NVL(
                               (SELECT SUM (mmt2.transaction_quantity) total_NET_qty
                                  FROM mtl_material_transactions mmt2,
                                       mtl_system_items_b msib2,
                                       mtl_transaction_types mtt2,
                                       org_organization_definitions ood2,
                                       mtl_txn_source_types mts2
                                 WHERE mmt2.organization_id = msib2.organization_id
                                   AND msib2.inventory_item_id = mmt2.inventory_item_id
                                   AND mmt2.transaction_type_id = mtt2.transaction_type_id
                                   AND mmt2.organization_id = ood.2organization_id
                                   AND mtt2.transaction_type_name = 'WIP Issue'
                                   AND mts2.transaction_source_type_name = 'Job or Schedule'
                                   AND msib2.segment1 = NVL (:p_item, msib2.segment1)
                                   AND ood2.organization_code = :p_manufacturing_plant
                                   AND TRUNC (mmt.2transaction_date) BETWEEN :p_start_date AND :p_end_date
                               ),0
                              )
                   ) abs_qty
              from dual
           ) AS ABS_qtyy,
           (select (NVL(
                        (SELECT SUM (mmt3.transaction_quantity) total_NET_qty
                           FROM mtl_material_transactions mmt3,
                                mtl_system_items_b msib3,
                                mtl_transaction_types mtt3,
                                org_organization_definitions ood3,
                                mtl_txn_source_types mts3
                          WHERE mmt3.organization_id = msib3.organization_id
                            AND msib3.inventory_item_id = mmt3.inventory_item_id
                            AND mmt3.transaction_type_id = mtt3.transaction_type_id
                            AND mmt3.organization_id = ood3.organization_id
                            AND mtt3.transaction_type_name = 'WIP Completion'
                            AND mts3.transaction_source_type_name = 'Job or Schedule'
                            AND msib3.segment1 = NVL (:p_item, msib3.segment1)
                            AND ood3.organization_code = :p_manufacturing_plant
                            AND TRUNC (mmt3.transaction_date) BETWEEN :p_start_date AND :p_end_date
                        ),0
                       ) - NVL(
                               (SELECT SUM (mmt4.transaction_quantity) total_NET_qty
                                  FROM mtl_material_transactions mmt4,
                                       mtl_system_items_b msib4,
                                       mtl_transaction_types mtt4,
                                       org_organization_definitions ood4,
                                       mtl_txn_source_types mts4
                                 WHERE mmt4.organization_id = msib4.organization_id
                                   AND msib4.inventory_item_id = mmt4.inventory_item_id
                                   AND mmt4.transaction_type_id = mtt4.transaction_type_id
                                   AND mmt4.organization_id = ood4.organization_id
                                   AND mtt4.transaction_type_name = 'WIP Issue'
                                   AND mts4.transaction_source_type_name = 'Job or Schedule'
                                   AND msib4.segment1 = NVL (:p_item, msib4.segment1)
                                   AND ood4.organization_code = :p_manufacturing_plant
                                   AND TRUNC (mmt4.transaction_date) BETWEEN :p_start_date AND :p_end_date
                               ),0
                              )
                   ) abs_qty
              from dual
           ) * csc.standard_cost AS abs_val
      FROM mtl_material_transactions mmt,
           mtl_system_items_b msib,
           mtl_item_locations mil,
           mtl_transaction_types mtt,
           org_organization_definitions ood,
           mtl_txn_source_types mts,
           mtl_categories mc,
           mtl_item_categories mic,
           mtl_category_sets mcs,
           cst_item_costs cic,
           cst_standard_costs csc,
           cst_cost_types ct,
           mfg_lookups mlo
     WHERE mmt.organization_id = msib.organization_id
       AND msib.inventory_item_id = mmt.inventory_item_id
       AND mmt.locator_id = mil.inventory_location_id
       AND mil.organization_id = msib.organization_id
       AND mil.subinventory_code = mmt.subinventory_code
       AND mmt.transaction_type_id = mtt.transaction_type_id
       AND msib.organization_id = ood.organization_id
       AND mic.category_set_id = mcs.category_set_id
       AND mc.category_id = mic.category_id
       AND mc.structure_id = mcs.structure_id
       AND mic.inventory_item_id = msib.inventory_item_id
       AND mic.organization_id = msib.organization_id
       AND mcs.category_set_id = 52487965
       AND msib.inventory_item_id = cic.inventory_item_id
       AND msib.organization_id = cic.organization_id
       AND ct.cost_type_id = cic.cost_type_id
       AND cic.organization_id = ood.organization_id
       AND mil.inventory_location_id = mmt.locator_id
       AND mmt.transaction_source_type_id = mtt.transaction_source_type_id
       AND mmt.transaction_action_id = mtt.transaction_action_id
       AND mmt.transaction_source_type_id = mts.transaction_source_type_id
       AND mmt.transaction_action_id = mlo.lookup_code
       AND mmt.inventory_item_id = csc.inventory_item_id
       AND mmt.organization_id = csc.organization_id
       AND csc.last_update_date >= (SELECT MAX (csc1.last_update_date)
                                      FROM cst_standard_costs csc1
                                     WHERE csc1.inventory_item_id = mmt.inventory_item_id
                                       AND csc1.organization_id = mmt.organization_id
                                   )
       AND msib.segment1 = NVL (:p_item, msib.segment1)
       AND NVL (mc.segment6, 'X') = NVL (:p_base_model, NVL (mc.segment6, 'X'))
       AND NVL (msib.planner_code, 'Y') = NVL (:p_planner_code, NVL (msib.planner_code, 'Y'))
       AND UPPER (mlo.meaning) = 'ASSEMBLY COMPLETION'
       AND mtt.transaction_type_name = 'WIP Completion'
       AND ct.cost_type = 'Frozen'
       AND mts.transaction_source_type_name = 'Job or Schedule'
       AND ood.organization_code = :p_manufacturing_plant
       AND TRUNC (mmt.transaction_date) BETWEEN :p_start_date AND :p_end_date
    

    Concerning

    Etbin

  • Get the selected value of a select list item in a tabular presentation.

    Hi, I have a tabular form and I'm trying to get the selected value of a select list item and store the selected value in a page element hidden elsewhere on the form of tables, so I can use this value.

    I already have something similar to the input on the tabular presentation elements.

    Get the initial values
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems var = $(' input [nom = "f12"]', ligne) [0];

    numberOfItems = 123456.123

    What I want to do is soemthing similar as above but capture the value of a select element in tabular form. I thought I could do something like:

    Get the selected value
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems var = $('selected [name = "f08"] .val ()', line) [0];

    But this method leaves the as undefined var numberOfItems.

    Please help me to find a way to identify the item 'select' in the tabular form called "f08" and get this value.

    I am a newbie to jQuery selectors etc...

    Thank you.

    Strange that you do not get an error when you run your 2nd selector.
    In any case for this kind of thing, see the HTML code of your tabular form and tell us what triggers, the element can be useful. Or better create an example at apex.oracle.com.
    In any case, I see two errors:
    (1) is there any html element "not selected" instead, the LOV in the APEX element has the select tag
    (2) you can not write a. val() inside a selector that you must place it after your selection.

    So I'd like to rewrite your code to:
    var line = $x_UpTill (this.triggeringElement, 'TR');
    numberOfItems = $("select_[nom_="f08"]",_row).val () var [0];

  • COMBOX Box not displaying the selected item

    Here is the code I use to try to capture and display the selected item in a ComboBox control:

    private void changeProjectTypeSelection(event:Event):void {}
    projectTypeChange.text += event.currentTarget.selectedItem.cboProjectType + "" +.
    event.currentTarget.selectedIndex + "\n";
    }


    Then the ComboBox:
    < mx:ComboBox fontSize = "12" x = "93" y = "83" width = "110" id = "cboProjectType" dataProvider = "{projectTypeArray}" labelField = "projectTypeName" selectedIndex = "0" click = "changeProjectTypeSelection (event)" > < / mx:ComboBox >

    Then the TextInput:
    < mx:TextInput id = "projectTypeChange" "248,95" = x y = "84" width = "121" / >

    I know there is something wrong with ActionScript... just have not thought of it. Any suggestions would be greatly appreciated!

    Finally! Here is the solution:

    private void changeProjectTypeSelection(event:Event):void {}
    var i: int;
    for (i = 0; i<>
    If (projectTypeArray.getItemAt (i) .projectTypeName == event.currentTarget.selectedItem.projectTypeName) {}
    projectTypeChange.text = projectTypeArray.getItemAt (i) .projectTypeName;
    }
    }
    }

  • Get the selected value in the list drop-down/messagechoice

    Hi friends,
    App R12.
    I create a drop-down list programmatically in the process request:

    OAMessageChoiceBean OAMC = oapagecontext.getWebBeanFactory () .createWebBean (OAWebBeanConstants.MESSAGE_CHOICE_BEAN, null, oapagecontext, null) (OAMessageChoiceBean);

    oamc.setPickListViewUsageName ("MyVO1");
    oamc.setListValueAttribute ("MyId");
    oamc.setListDisplayAttribute ("MyDescription");
    oamc.setID ("xxMypicklist");
    oamc.setRendered (Boolean.TRUE);
    oawebbean.addIndexedChild (oamc);

    This shows the list of choices and there MyVO1 query search results.

    Now, I want retrieve value MyId in the processFromRequest (after pushing a button on the screen). I do the following:

    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    ...
    MyVOImpl myvoimpl = (MyVOImpl) am.findViewObject("MyVO1");
    MyVORowImpl PicklistRow = myvoimpl.getCurrentRow ((MyVORowImpl));
    NUMBER auxId = (NUMBER) PicklistRow.getAttribute ("MyId"); THIS SENTENCE GIVES A NULL POINTER EXCEPTION

    Then..., is not enough to find the original Version? and get the rank "perceive"... and then get the desired attribute?

    Do I need to load data from MyVO1 into myvoimpl? How? How to get the folder selected on the screen?

    Many thanks for any help. It is very urgent for me to solve this problem. Dev guide does not help with this kind of usual problems.
    Jose L.

    Hello

    u can not get the value of this way, becz you try to get the value of the original Version which is used for bean of choice message, to get the value selected in this field of choicebean message, you must get the VO initialized for this page, both would be different VO, you can opt for the following approach

    (1.) an another VO wiil be there in your page get implemented to capture the data on this page, the attribute of this VO would be added to your field of beans of choice, need to understand that VO and and capture your selected value.

    or the other way is

    2.), you can change your code in the same way in the pR method

    OAMessageChoiceBean OAMC = oapagecontext.getWebBeanFactory () .createWebBean (oapagecontext, OAWebBeanConstants.MESSAGE_CHOICE_BEAN, null, "XXMypicklistBean) (OAMessageChoiceBean);

    and get the selected value in pFR method in this way

    OAMessageChoiceBean getCHBean = (OAMessageChoiceBean) (webBean.findIndexedChildRecursive ("XXMypicklistBean"));

    String val = (String) getCHBean.getValue (pageContext));

    thanx

    Pratap

  • Add the value of point two apex and display the result in another part of the apex

    Hello

    I need to make the addition of the two item values using apex.item.text and find the result in another apex.item.text.

    For example:
    SELECT
    apex_item. Text(1,null) ONE
    apex_item. Text(2,null) TWO
    apex_item. Text(3,null) RESULT
    FROM EMP
    please suggest me

    Thank you
    Sudhir

    >
    No it does not add the two values in the column, user key to enter the value, it must add the value of the item and displays the result in a dynamic way. Need a suggestion for using javascript
    >
    This requirement was not not clear in the op.

    See the demo of Denes Kubicek.

    This topic is discussed far too often. Have you tried to Oracle Application Express (APEX) and adapting one of the many examples of LoV cascading to your situation?

    See you soon,.

    PS: Tip:
    Look for the p_item_id and p_attributes of the APEX_ITEM API parameters.
    You can call JS functions for example using p_attribute

    APEX_ITEM.TEXT(...
    p_attributes => 'onchange="doTotal(this);"', /* doTotal being your JS Function */
    ...
    

    Published by: Dominic August 16, 2012 11:52

  • In an Adobe form I need the value of Field3 to display the higher of the two fields, Field1 value or Field2 (compare the value of Field1 and Field2 and display the highest amount in field3) can someone please tell me the script to run this simple comparis

    I have 2 fields that are calculated fields and I need display the higher value of the 2 fields in a third field

    The field names must be in double - quotes. And if you change the value of any field, now, you will see error messages in the console.

  • Display the default value for POPUP LOV

    Hello

    How to display the default value for the element whose type is LOV POPUP?

    Version 4.2 of the apex

    Thank you.

    Hi Sunil,

    Sunil Bhatia wrote:

    Change the default value to "SQL query"

    And set the default value:

    SELECT PERSON_ID PEOPLE WHERE USER_NAME = lower(:APP_USER);

    -Sunil Bhatia

    There is no default Type-> "SQL query".

    BO123 :

    Change the default value--> "Body of the PL/SQL function" Type and value by default to:

    DECLARE
    
      L_PERSON_ID PEOPLE.PERSON_ID%TYPE;
    
    BEGIN
    
      SELECT PERSON_ID
        INTO L_PERSON_ID
        FROM PEOPLE
       WHERE USER_NAME = lower(:APP_USER);
    
      RETURN L_PERSON_ID;
    
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
      RETURN NULL;
    
    END;
    

    Better make a packaged function and just call that work instead of writing all the code by default the value of the item.

    Kind regards

    Kiran

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

    }

    ......

  • ADF table selected displayRow does not display the selected line

    Hello

    JDev 11.1.2.4

    I have a table with selection enabled and displayRow property the value selected. In the workflow, I have an ExecuteWithParams activity, and then a method activity that restores the current iterator of the line. Finally the activity view that displays the table.

    Restore the current line with key

    Iterator DCIteratorBinding = ADFUtils.findIterator ("MyIterator");

    iterator.setCurrentRowWithKey (currentKey); currentKey is a string

    The question I have is that the current line is properly restored, but the table does not display the page of "range" of the current line while the displayRow is the selected value. My table has 500 rows, the table displays the top 25 while the current line is the 500th line. I expect the table to display the line 475 to 500 line.

    What I am doing wrong?

    Thank you

    You can save the index lines before executing your method and then set the iterator to this index.

    The technique is described in this blog https://tompeez.wordpress.com/2016/02/12/naviagting-an-aftable-in-pagination-mode-from-a-bean/

    Timo

  • call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. The other rows are based on the entities

    Hi Experts,

    JDeveloper 12.1.3.0.0

    I have a VO based on entity object. With a column of the VO is transient attribute (I created).

    I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.

    So can anyone suggest how can I achieve this?

    Thank you

    AR

    I think that you need a stored function (which returns the value) in this case, is not?

    Take a look at:

    https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm

    and search for:

    Invoking stored function with only Arguments in

    call your function in the Get attribute and return value accessor...

  • 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);

    }

  • 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

  • Referring to the selected value of a Radio of a Select

    Hi guys,.

    I know it's may be a relatively simple matter, but I have browsed this forum and other articles and so far have resulted in an approach to my questions, but it seems that a more simple method can exist.

    Problem:

    1. I want to use a switch to display a particular facet based on the selected value to select a Radio
    2. I have defined literals for each selected option.
    3. my research led me to believe that I would need to create a support bean to refer to the value. (I have a similar requirement of reference / evaluate the string of text in a text input).
    4. is there a simpler way? All the groovy expressions that I can see reference variables (links PageFlowScope or data).

    In summary, I think I can achieve with a carob gum support, however I'm looking for a simpler method.

    Can anyone offer please an alternative approach or the confirmation of my thought.

    See you soon,.

    Simo

    Sisor

    Here is the code snippet without using any medium bean to store the selected value:

    
    
        
        
    
    
        
         
             
         
         
             
         
         
             
         
        
    
    
    

    Jean Lou

  • How to get the selected values of &lt; af:selectManyCheckbox &gt;

    Hi, I use jdeveloper 11.1.2 and I drag-and - drop a view such as selecting Multiple object (< af:selectManyCheckbox) component and now I'm trying to get the checked values in backing bean so that I can save in the database.

    At the moment I get all the values, but not the selected values.

    JSPX Page.

    < af:selectManyCheckbox value = "#{bindings." HREmpDetailsVO1.inputValue}.
    label = 'EMPLOYEES '.
    Binding = "#{backingBeanScope.backing_TestForm.SMC1} '"
    ID = "smc1" >
    < f: selectItems value = "#{bindings." HREmpDetailsVO1.items}.
    Binding = "#{backingBeanScope.backing_TestForm.SI1} '"
    ID = "si1" / >
    < / af:selectManyCheckbox >


    Bean class:

    public list getSelectedValues() {}

    If (selectedValues == null: refreshSelectedList) {}

    selectedValues =
    attributeListForIterator (selectedValuesIteratorName,
    selectedValuesValueAttrName);
    }
    Return selectedValues;
    }

    public static list attributeListForIterator (iter, DCIteratorBinding,
    String valueAttrName) {}
    AttributeList list = new ArrayList();
    {for (line r: {iter.getAllRowsInRange ())}
    attributeList.add (r.getAttribute (valueAttrName));
    }
    return attributeList;
    }


    Can someone help me pls by getting the values with the example code.

    Thanks in advance

    http://anindyabhattacharjee.blogspot.com/2010/10/working-with-ADF-choice-elements.html

Maybe you are looking for

  • Strong vibration of AMD Radeon HD 6570 in HP Pavilion

    I have a HP Pavilion p6-2022 with an AMD Radeon HD 6570. For 6 months, he has executed well and very discreetly, but suddenly, there is a vibration noise. I opened it and believe the fan on the 6570 comse or if not the fan then the fan vibrates again

  • ReadyNas NV + unable to communicate via Raidar/Frontview V1

    Several weeks ago my NV + V1 began to file my network, finally disappear completely. When I reboot the device that all four LEDs are lit in green, stays in power button turned on, the lights of the port eithernet correctly, and the display shows a va

  • Incoming ring Lenovo P780 volume maximize automatically,

    I have a problem with my lenovo P780. The Ring volume is maximize automatically. I put low volume, but it automatically increases. Is their any option where we can set

  • MathScript childcare

    Reactions of NOR Mathscript support structures in LV 2011? There was mention that it is on the roadmap for LV 2011 in one post, that I found on this forum, but this refers to the NIWeek 2009.

  • Possible extension of memory locations?

    With the help of hp series p, with memory PCI cards shorted my seats 3 could I get a device of "expansion" or something to go into labor last and so add 2 memory cards... ?