Setting QueryDescriptor's attribute values programmatically

Hi all,
How can I set the attribute value(s) in a query descriptor programmatically? From the query descriptor you can get a handle on a particular attribute criterion which has a getValues() but no setValues(). Can this be done?
Also, is it possible to programmatically switch a query panel from basic mode to advanced mode and vice versa?
I am using JDeveloper 11.1.1.7
Thanks,
Bill

Hi Timo,
Your suggestion worked after a little bit of tinkering around. I assumed that AttributeCriterion makes a defensive copy of the list before returning it, however this isn't the case. In fact. it returns a list of type FaceCtrlSearchingBinding$AdfCriterionValues which does not behave as expected.
The following prints null:
List values = attributeCriteria.getValues();
values.clear();
values.add("1100254");
System.out.println(values.get(0));
While doing it this way prints the expected value "1100254":
List values = attributeCriteria.getValues();
values.clear();
values.set(0, "1100254");
System.out.println(values.get(0));
Thanks,
Bill

Similar Messages

  • Programmatically set af:query attributes value

    Hello,
    Is there an option to programmatically execute af:query search giving some attributes value?
    I have a query component for the view criteria like:() Group
    Attrib1 =
    AND Attrib2 =
    AND Attrib5 =There are almost 30 attributes in this VO that can be used in a query with advanced search mode, so I wouldn't like to create 30 bind variables for them (not sure that would be a solution either).
    Maybe there are some methods in QueryModel or QueryDescriptor to archieve this?
    // set some attributes in a key/value style
    query.setAttribute("AttribX", 123);
    // execute query
    JSFUtils.resolveMethodExpression("#{bindings.InformationSearchVCQuery.processQuery}", null,
    new Class[] { QueryEvent.class }, new Object[] { queryEvent });Thanks.
    ADF 11.1.2.2

    You can use something like this to iterate through VC and set values:
    http://adf-code-corner.blogspot.com/2012/08/programmatically-changing-validation.html
    Dario

  • How can I set a VO Attribute value ?

    Hi,
    I'm relatively new to developing OA framework pages, so apologise in advance if my terminology is not quite right at the moment. But I have an experienced Oracle Forms developer so am getting to grips with new tools.
    I've managed to develop a number of simple pages (query page and create single record page). I now want to develop a simple "master-detail" page. I've created a page that has two regions Header region and Lines region. Region styles are set to Header and AdvancedTable (child of Header region). I created some test data in TOAD and have written the code to query back the header and related lines. This works and the correct lines get displays when a new header record is displayed. I coded this in the initQuery methods. But now I'm stuck trying to create detail/line rows from the page.
    I've added the "Add New Rows" to and want to populate the Lines row with the value of my parents primary key (eventually I'll make the child fkey column hidden). For the last few days, I've read lots of forum notes and the OA dev guide. At the moment, I've created a CO on my Lines region and this basically does the following in the processFormRequest :-
    a) Traps the Add Rows Event
    b) Fetches the current row for the parent and parent Id (primary key)
    c) Fetches the current child row
    d) Tries to update the child foreign key attribute using parent's primary key.
    When I pressed the Add Rows button I was getting an error "Attribute set <attribute> failed for ...>.
    I read various notes suggesting that I did not have my EO and VO properties set for the attribute I was updating. So I changed the EO and VO to allow the attribute to always be updateable. Now I don't get the error, but the column is not populated. An empty row appears. I used the messaging and am definately getting a value in the parentKey variable.
    I know I'm in the Add Rows event because I manged to display some dummy messages.
    Below is the code in my Lines CO processFormRequest :
    OAAdvancedTableBean tableBean = (OAAdvancedTableBean) webBean.findChildRecursive("RoutesRN");
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    OAViewObject parentVO = (OAViewObject)am.findViewObject("XXRPAirlineCreateVO1");
    OARow parentRow = (OARow)parentVO.getCurrentRow();
    String parentKey = (String)parentRow.getAttribute("CompCode");
    OAViewObject childVO = (OAViewObject)am.findViewObject("XXRPRouteFullVO1");
    OARow childRow = (OARow)childVO.getCurrentRow();
    //String childFKey = (String)childRow.getAttribute("CompCode");
    //childRow.setAttribute("CompCode",parentKey);
    childRow.setAttribute("CompCode",parentKey);
    ///// String message = "Pressed Add Rows Button Parent = " + parentKey + " Child = " + childFKey;
    /// // throw new OAException(message, OAException.INFORMATION);
    I guess the above may not be the best way to the "copy" of a parent id into a child foreign key.
    Any help would be really appreciated.
    Thanks
    Ramnik
    The region style for the Header

    Look in the dev guide, Tables --> Adding rows.
    If you are handling the add row event, you need to set autoInsertion off. You need to create a row in the child VO and then set the desired attributes

  • Setting up Flexfield Context Value programmatically in Custom.pll

    I need to default the context value of my DFF based on user profile/responsibility, How do I assign a value to context value field in custom.pll?
    Thanks,
    AJ

    Hi John,
    I got the same issue. Is yours being resolve yet?
    Can you share the solution.
    Thanks.

  • Setting form attribute value with php

    i am having trouble setting the checked attribute value of a
    radio button based on the url parameter search. if search == all
    then checked == checked else checked == unchecked.
    <input type="radio" name="search" value="all"
    checked="<?php if ($_GET["search"] == "all") { echo"checked";}
    else { echo"unchecked";} ?>" />
    what am i doing wrong?

    This code should work
    <input type="radio" name="search" value="all" <?php if
    ($_GET["search"] == "all") { echo "checked";} ?> />

  • OSB Setting SOAP Body Id value in proxy service when calling out to another service

    I have a proxy service deployed in OSB.  I need to set the Id attribute value on the SOAP Body element to a specific value prior to invoking the business service.
    In the service callout I currently has  "Configure Payload Document" selected.
    Do I need to do an XPath / XQuery transformation in an Insert or Update message processing action in a prior step of the message flow before the callout to the business service?

    Suppose below is your request you are passing to Business Service :
    <math:input
    xmlns:math="http://www.math.org">
        <math:inp1>100</math:inp1>
        <math:inp2>1</math:inp2>
        </math:input>
    Now before passing it to BS you need to change the value of inp2 to let say 200.
    So just before service callout , add a replace action
    Replace [ node contents ] of [ ./math:input/math:inp2 ] in [ body ] with [ 200 ]
    Your new request will become:
    <math:input
    xmlns:math="http://www.math.org">
    <math:inp1>100</math:inp1>
    <math:inp2>200</math:inp2>
    </math:input>
    Hope this helps.
    Regards,
    Karan
    Oracle Fusion Middleware Blog

  • How to set the DFF Attribute Programmatically?

    hi
    how to set the DFF Attribute Programmatically in Process Request of CO
    thanx

    Hi
    Do u want to set the value in DFF Programmatically ?
    u can capture the VO used for DFF and set the the value in controller.
    Thanks

  • Setting an attribute value of a tag equal to a String variable in scope

    Hi,
    I don't think this is possible because I get an "expression not allowed" error when trying it. But long story short I'm trying dynamically set attribute values on a taglib. For example:
    <%
    String value="attributevalue";
    // set the attribute of the tag below equal to this variable value
    %>
    <tag:mytaglib name="<%=value%>"/>
    I looked at the generated jsp page and seems like the variable "value" is not in scope of the method that processes the tag. Does anyone have any ideas or can confirm that there is no way to do this. Thanks!

    You can do it.
    In your tag library (*.tld) file, have an entry as:
        <attribute>
            <name>name</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>This should do the trick.
    Let us know if it worked for you.
    Thanks and regards,
    Pazhanikanthan. P

  • Setting property attribute values for multiple selected objects.

    Hello,
    Is there an easy way to set the attribute property values for more that one selected Table Operator Attribute (column) at a time. For example the target table has over 100 columns but I only want to INSERT/UPDATE 10 of those columns. The generated MERGE, INSERT and UPDATE statements will perform DML on all of the columns in the target table, setting the 90 columns with no mapping set to NULL. This is due to the Loading Properties 'Load Column when Updating Row' and 'Load Column when Inserting Row' both default to Yes. I would like to select multiple Attributes in the Table Operator and change the 'Load Column when Updating Row' and 'Load Column when Inserting Row' to No. This is similar to what you were able to do in Oracle Forms 9.0 Designer select multiple Items in a Block and change the properties en-masse.
    Thanks

    Hi,
    Using OMB scripting to set attribute properties in a data mapping sort of defeats the purpose of utilizing a graphical user interface to define and set properties for a data mapping? Surely the GUI data mapping tool was created to get away from writing scripts and scripting would also require that you know the name of the data mapping, table operator and the set of attribute names for which you have to write one line of script to set each property value, i.e. 90 lines to set 90 attribute values.
    Cheers,
    Phil

  • How to give  Value set for model attribute?

    Hi all,
           How to give value set for model attribute?
           plz explain me with some sample code.
    Regards,
    Srinu

    Hi Srinivasulu,
    An attribute (of basic data types like integer , string etc) holds a single values.
    Please clarify by what you mean value set ?
    Also, share the structure of context.
    Regards,
    Kartikaye

  • How to use SQL import to set the attribute value based on another?

    Hello all,
    I want to set an attribute of a dimension based on another attribute (if matches). Let's say I have a dimension PRODUCT. And I have defined two user defined attributes MANAGER and ISVISIBLE.
    Now within a PERMIT_READ program I want to set the ISIVISIBLE to true where the MANAGER Value is selected from a table.
    Something like
    <define a cursor c1 to select all the Manager values>
    sql import c1 into -
    :MATCHSKIPERR PRODUCT_MANAGER then <PRODUCT_ISVISIBLE (PRODUCT MANAGER) = true>
    <etc>
    Obviously the above is not correct. But I am stuck as to how this can be done? Can some one on this forum please help me with correct syntax/ approach please?
    Thanks a lot.
    Pxsheth
    This statement assigns true to the isvisible attribute for every gc_dim_bu dimension (selected as part of cursor c1).
    SO FAR SO GOOD.. NOW -
    If I want to change the above so that the attribute value gets assigned based on another attribute for the dimension (say a flag). i.e.
    Set the isvisible to true where attribute flag has a certain value. How do I code this in OLAP DML?

    There are a number of ways to do this. If you want to use an attribute that has been defined within AWM as an attribute of Product then simply using the mapping tool to populate the attribute as part of the normal dimension load procedure.
    Alternatively you could create an attribute at the DML level, and assuming you are not using surrogate keys, you can then define a cursor to read the relational table to populate your attribute. Something like this:
    sql declare MKT_BASKET cursor for -
    select PRODUCT_ID, PROD_MGR , PROD_VISIBLE -
    from PRODUCT_DIM
    if SQLCODE ne 0
    then goto ERROR
    sql open MY_CURSOR
    sql fetch MY-CURSOR loop into :append PRODUCT, :PRODUCT_MANAGER, :PRODUCT_ISVISIBLE
    sql close MY_CURSOR
    sql cleanup
    update
    commit
    If you want to create a complex PERMIT function using OLAP DML then personally I would create a formula and assign a program of type BOOLEAN and have the program return a YES or NO depending on the outcome of your test. Then your PERMIT_READ still references a dimension object. For example:
    DEFINE PROD.ISVISIBLE BOOLEAN FORMULA <PRODUCT>
    EQ PRG.ISVISIBLE(PRODUCT)
    DEFINE PRG.ISVISBLE PROGRAM BOOLEAN
    The program will then return Yes or No depending on the processing you need to do.
    Hope this helps
    Keith Laker
    Data Warehouse Solution Architect
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Need to add row and set attribute value on pageload

    Guys,
    On my page based on the pageflowscope variable value, i need to add a row for master and one row for detail viewobject and set attribute values. (Some of the attribute are LOV and Checkboxes as well)
    I am using following code to create records.....records are being added but i am not able to set the attributes
    OperationBinding ob;
    ob = ADFUtil.findOperationBinding("Create");
    ob.execute();
    ob = ADFUtil.findOperationBinding("CreateInsert3");
    ob.execute();
    I am using following code to set the attributes value
    DCIteratorBinding dc1 = ADFUtil.getBindingIterator("firstiterator");
    DCIteratorBinding dc = ADFUtil.getBindingIterator("seconditerator");
    row1=dc1.getCurrentRow();
    row=dc.getCurrentRow();
    row.setAttribute("activest","A");
    row1.setAttribute("type","dc14");
    Anything i am doing wrong here or any suggestion to try is greatly appreciated....

    Vinod,
    Yes commit button is there and yes its also has entry in pagedef...
    When I open the same page on edit mode and i can edit regular record and save them
    Problem is that when i open the page on new mode and try to add rows on page load..... and setting values as described above.... save button somehow doesn't work...
    seems like after i add the rows on the fly, i need to refresh the binding?
    any help is greatly appreciated....
    thank you guys

  • Is it possible to get and Set attribute value in OVD through JNDI or Java

    Hi,
    I have a requirement to read an OVD Attribute value from a Jsp Page and set the Attribute value in OVD.
    Is it possible to achieve it through JAVA/JNDI code, Any pointers or code snipplet are welcome.
    Thanks
    Ak

    Use JNDI with LDAP provider or another LDAP java library, plenty of examples on google

  • API to create value set with attribute values ?

    Hi
    I was hoping someone might be able to help with this question.
    I am creating a series of value set values using fnd_flex_val_api.create_independent_vset_value and fnd_flex_val_api.create_dependent_vset_value as part of a migration.
    These APIs do not allow you to pass in attribute column values.
    How can you create a value set value which has attribute values populated ? Is there another API does anyone know ?
    Thanks a lot
    Scott

    All APIs are listed in Oracle Integration Repository
    http://irep.oracle.com/index.html
    API User Notes - HTML Format [ID 236937.1]
    R12.0.[3-4] : Oracle Install Base Api / Open Interface Setup Test [ID 427566.1]
    Oracle Trading Community Architecture API User Notes, June 2003 [ID 241320.1]
    Technical Uses of Customer Interface and TCA-API [ID 269121.1]
    Pelase also check below:
    Api's in EBS
    Re: Api's in EBS
    http://sairamgoudmalla.blogspot.com/2009/05/script-to-find-oracle-apis-for-any.html
    API
    Fixed Asset API
    List of API
    Re: List of APIs
    Oracle Common Application Components API Reference Guide
    download.oracle.com/docs/cd/B25284_01/current/acrobat/jta115api.pdf
    List of APIs and open interface R12
    Re: List of APIs and open interface R12
    Regard
    Helios

  • Data Set - Encode Attribute Value?

    I'm using an HTML data set with an active region. Some of the
    data is to be used as attribute values (e.g. as the "value" of an
    "input" tag), and some of the data is to be used within the HTML of
    the document (but should not be rendered as HTML). What is the best
    way (recommended practice) for encoding the data for these uses? In
    other words, does the spry framework provide such utilities? Is
    there a way to pull the data out of the data set already encoded
    for use as an attribute value? Or with >, <, and &
    properly encoded for use in HTML?

    I guess you are also using SpryData.js in the same page.
    SpryData.js has a function called
    Spry.Utils.encodeEntities(string);
    It will encode your Entities for you and returns the changed
    string. If you data is already encoded before you brought it in to
    the SpryDataset, make sure you didnt set the columnType to html.
    If not you can do something like this
    <script type="text/javascript">
    function encodeEntities(region, lookupFunc)
    return
    Spry.Utils.encodeEntities(lookupFunc("{dsProducts::desc}"));
    </script>
    <div spry:region="dsProducts">
    <ul spry:repeatchildren="dsProducts">
    <li>{name} - {function::encodeEntities}</li>
    </ul>
    </div>

Maybe you are looking for

  • Online Number isn't showing up on people's caller ...

    Is there any way to fix this?  My online number works because I recently paid for it and it expires May 20.   I know the number works because when I call myself, it rings but displays the "unkown number" problem. Let me know if there's a way to solve

  • Portal Runtime Error in Performance Overview

    Hi Experts , I am getting portal runtime error while accessing performance overview and this error is occurring in test system not in prod. I have only passed our custom parameter in "ViewGroup" and "ViewID" , which comes under property Editor of Per

  • Why is the content of Photo Stream different on each device?

    I work on a 13" MacBook Pro and also have an iPad and iPhone 4s. I edited my Photo Stream photos down to a tight collection of 220 pictures and fully expected that to reflect on my iPhone and iPad, however, it simply is not the same. The iPad has mor

  • How to determine maximum field size?

    Hello! Here's my problem... I have a rather large CSV file which I have loaded into Numbers, but now i need to work out what the maximum size of each field is. There are far too many rows for me to just look through the CSV file (it's got a few hundr

  • ITouch will not reset.  Help!

    My ITouch will not reset.  It has the connect to ITunes icon on the screen, but will not connect or reset.