Programmatically setting QueryDescriptor attribute values

Hi all

How can I set the values of the attribute in a descriptor of query programmatically? From the application descriptor, you can get a handle on a particular attribute criterion that has a getValues() but not setValues(). Is this possible?

Also, is it possible to program a panel of query mode base on the edge of fashion and vice versa?

I use JDeveloper 11.1.1.7

Thank you

Bill

Try

QueryDescriptor qd = queryEvent.getDescriptor ();

AttributeCriterion test = qd.getCurrentCriterion ();

/ * Gets the key currently in the search criteria

* You can manipulate the values here :)

*/

String attrLabel = criterion.getAttribute () .getLabel ();

Object attrValue = criterion.getValues () .get (0);

To change the value, you get the list of values and set in the new list.

Timo

Tags: Java

Similar Questions

  • view setting code attribute value

    Hello

    I use ADFBC 11 g.

    I have added a transitional attribute to a view object, and I want to fill the value programmatically. Where should I go for it? I tried to set the value of ViewRowImpl, set the attribute method, but this method is not called.

    Thank you.

    Hello

    I tried to set the value of ViewRowImpl, set the attribute method, but this method is not called

    try to set the value in the get method, not in the set method.

    Sameh Nassar

  • How to solve [' < ' may not appear in the attribute value]

    Set the attribute value to inputText as follows:
    value="#{bean.newMode==true ? '<auto>' : bean.someValue}"
    but I got the error in the title.

    I tried to add a '-' before ' < ',.
    but still does not work.

    Thank you.

    Kevin.

    Try

     & lt; and & gt; 
    

    Remove the space after the &

    Timo

    Published by: Timo Hahn 25.06.2009 at 09:17

  • programmatically set the bind view variable value of object that showed to the query Panel

    Hello

    I have a case in 11.1.1.7 Jdev, I deploy my application on BPM 11.1.1.7.

    I have a VO that three attributes of it was put in a viewcriteria... Let's attribute A1, A2, and A3. the view criteria is any condition "AND".

    and then I create a variable binding in the VO named b. my vo also query using this variable B.

    in the jspx, I create a query panel based on the viewcriteria. then in the A1, A2, A3 and B query pane shows.

    I can reset the Panel request programmatically using this tutorial http://www.jobinesh.com/2011/04/programmatically-resetting-and-search.html

    but unfortunately he didn't succeed for A1, A2, A3 because they are in the display criteria, but B can't reset.

    I tried to put the value programmatically using queryModel, queryDescriptor, setNamedWhereClauseParam, but this failed and it starts to makes me crazy...

    anyone here seen cases like me? and found the workaround? pls throw some light.

    Thank you

    Have you tried with VariableValueManager? http://www.jobinesh.com/2010/10/how-to-set-bind-variable-values-at.html

    Dario

  • What is the best way to set a default value on an attribute that is dependent on a query?

    Hello master,

    I use Jdev 12.1.2. I have a project requirement where I have to set a default value for an attribute. The default value is derived from an SQL query.  I was intending to set the value of the Create method of the entity using VO class. But I preferred to have an opinion on if I do best.  Please advise

    Thank you and best regards,

    Mohamed

    It is a logical place, so just go ahead with this...

  • How to set the default value of the attribute with a sequence number? Is it possible to add a string to seq.no. like abc0001?

    Mr President.

    How to set the default value of the attribute with a sequence number? Is it possible to add a string to seq.no. like abc0001?

    Concerning

    For the date, you can use groovy expression adf.currentDate to set the current date. reference http://adfgouravtkiet.blogspot.in/2012/11/how-to-set-default-values-for-entity.html

    You already have ways to use the sequence.

    How do you add a new value in the form. You're creating a new line of your page (user interface) and by engaging with validation operation? Unless you commit you will not be able to see anything in the table.

    Thank you

  • How to set the initial value programmatically in af:selectOneChoice

    Hi all

    How to set the initial value programmatically in af:selectOneChoice

    filled with view object instance, but I want to show the value initial programmactically

    This can help you: Re: how to set the default value of the component selectOneChoice in ADF

    and the default af:selectOneChoice programmatically from backing bean

  • The attribute value set using plugins

    Hi Experts,

    I am confronted with error when you set the value of the attribute in the event "OnInvestigationStartedEvent". Any suggestion to solve the problem

    Code:

    Its session = onInvestigationStartedEvent.getSessionContext () .getInterviewSession () .getRuleSession ();

    Start of attribute = ses.getGlobalEntityInstance () .getEntity () .getAttribute ("test_start_time");

    Date start_date = new Date();

    start.setValue (ses.getGlobalEntityInstance (), start_date);

    Error:

    25750 [http-Apr-8080-exec-9] INFO com.oracle.determinations.engine.Session - setting test_start_time attribute, global entity, name of the world body, session 1 value user 21/07/13 14:17

    25752 [http-Apr-8080-exec-9] ERROR com.oracle.determinations.web.platform.templatingengine.ErrorRenderer - a change to the Session of the rule has been detected.

    com.oracle.determinations.interview.engine.exceptions.CorruptSessionException: an unauthorized at the Session of the rule changes was detected.

    at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.checkSessionIntegrity(RuleSessionManager.java:760)

    at com.oracle.determinations.interview.engine.data.local.RuleSessionManager.getRuleSession(RuleSessionManager.java:144)

    at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getRuleSession(LocalInterviewSession.java:203)

    at com.oracle.determinations.interview.engine.data.model.InterviewEntityInstanceIdentifier.findEntityInstance (InterviewEntityInstanceIdentifier.java:73)

    at com.oracle.determinations.interview.engine.local.AttributeGoal.getNextScreen(AttributeGoal.java:112)

    at com.oracle.determinations.interview.engine.local.LocalInterviewSession.getNextScreen(LocalInterviewSession.java:222)

    at com.oracle.determinations.web.platform.controller.actions.InvestigateAction.getResource(InvestigateAction.java:65)

    at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doGet(WebDeterminationsServlet.java:112)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:589)

    to org.apache.tomcat.util.net.AprEndpoint$ SocketProcessor.run (AprEndpoint.java:1852)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (unknown Source)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    Thank you

    Vinay

    Vinay,

    When you work in an engine of the interview event handler, you can use objects of the engine of the Interview to set the values. Take a look at the example 'use of the OnInterviewSessionCreatedEvent to start in a session data newly created' in the 'the Oracle policy Automation Developer's Guide'.

    Your code should look like:

    get the globalInstance of a new InterviewUserData;

    Data InterviewUserData = new InterviewUserData();

    InterviewEntityInstance globalInstance = data.getGlobalInstance ();

    the value of the test_start_time

    Date start_date = new Date();

    globalInstance.setValue ("test_start_time", start_date);

    submitting data to the session of the interview.

    Result TransactionResult = session.submit (data);

    I hope this helps.

    See you soon

    Frank

  • Set a default value for an attribute in modules - OPM

    Hello

    I'm trying to set a default value for a numeric attribute 0. I tried a few things but did not work.
    I was trying to default custom function that defines the default value of "0".
    I'm new to OPA, and I know not java.
    This is the java program that I intend to deploy as jar.but unfortunately it does not work.

    import com.oracle.determinations.engine.CustomFunction;
    import com.oracle.determinations.engine.EntityInstance;
    import java.util.Random;

    SerializableAttribute public class DefaultFunction extends CustomFunction
    {
    public Object evaluate (EntityInstance entityInstance, Object [] objects)
    {
    If (items [0] is nothing)
    {
    return 0;
    }
    }
    public Object requireKnownParameters (EntityInstance entityInstance, Object [] objects)
    {
    If (items [0] is nothing)
    {
    Returns false;
    }
    }

    }
    Is there any reference material where it has all the functions or the sample programs.

    Have you seen the article using developer?
    http://docs.Oracle.com/HTML/E29403_01/content/tutorials%20and%20Samples/Eg_Create_CF_to_Default_a_Value.htm
    This shows you how to use a custom default attribute (number) function. Maybe it's not 100% what you're after, but it might help.
    See you soon
    Ben

  • executeQuery tent get/set a different attribute to a blob type attribute value

    Hi all

    I use the p9172975_R12_GENERIC patch file.

    I have a customized OPS page and he is required to include a few more fields to the page, among them the paid one is to facilitate the download and upload of a file.

    To achieve this upload of file, I use messagefileUpload point of style and I am able to successfully create the folder with the file that is being stored in the blob column.

    When I try to update the record, it gives the error below

    ""oracle.jbo.domain.DataCreationException: Houston-25009: failed to create an object of type: oracle.jbo.domain.BlobDomain with value: 81".

    Here the 81 value belongs to another attribute (a column of data type number). When I checked the table, attribute values are registered in their corresponding columns.

    The error occurs when vo.executeQurey is called.

    Could you help me with this problem?

    Thank you

    K. Kumar

    Hi Johny,

    After seeing your reply, I figured that it would be incompatible index attribute in the VORowImpl.java, but could not identify any incompatibility comes from the VORowImpl.java file.

    So, I deleted the original Version and it created again, to my surprise its works very well!

    Thanks for your help.

    See you soon

    K. Kumar

  • programmatically set the display format minimum field width

    Hi all

    I am designing a user interface for a digital ASIC assessment and I wanted to programmatically set the minimum field width of a digital control that takes a binary value. Is it possible to do?

    Thank you

    Nick

    Hi Nick,

    Yes, it is possible.

  • Looking for a way to programmatically set the visible front part when opens a Subvi

    I'm looking for a way to programmatically set the visible portion of the front panel, when a Subvi opens.  Did not find all the messages that are related, but I do not know how to ask the right question.  To be clear, I want to write a VI assistance programme through a list of subVIs to ensure that background images are all in the same place when to open their respective subVIs.  I hate to play manually with scroll bars before I save each of the screws...  I'm thinking I need to find the top/left of the background image location (know already do) and then to set a property of the VI FP some offset or these values, but I can't find the corresponding property. FP:run - timeposition:custom looked promising, but only affects the location of the window, and not the area of the front panel displays the window.

    I should have added that the idea of using the background image does NOT change the origin.  Therefore, always be close enough, as your controls and indicators won't move, just the image.

    I personally use the OpenG VI and the open method of front panel, when I am in your situation.

  • How can I set the default value of a selection in the Query Panel with table.

    Hi Experts,

    JDev 12.1.3.0.0

    I have a view Criteria (contains a attribute with LOV). and the named criteria is dragged as a query with Table Panel.

    In the user interface, the LOV is now visible in the query Panel. Suppose that the LOV has 3 values: 'Manual', 'Other' and 'portfolio '.

    How can I set a default value for the choice of a select. ?

    Thank you

    Roy

    refer to:

    Andrejus Baranovskis Blog: Dynamic value by default for the field in query ADF search

    but rather to express as in the bellows of the image, choose literal and let 2

  • How to set the return value of the method to the /outputText inputText field

    Hello

    How to set output return value method of a /outputText adf inputText field

    Concerning

    sevanan

    Well put method's return value to a managed bean variable.

    Create a variable in the bean and set the return value to this variable.

    the inputText and outputTextValue to this managedBean.variable value

    That's all...

    and add partial trigger for inputText programmaticly

  • The element of Interaction of the user does not correct my Boolean attribute value

    Hello

    I'm just starting using the element of User Interaction. In my workflow, I set several attributes - some string and a Boolean value. I have a script task that makes treatment and eventually set these attributes. I then a piece of User Interaction that has these characteristics than external contributions. The Interaction of the user unit shows the correct values to strings, but the Boolean value is always shown as wrong - regardless of what I put the attribute in the script task immediately preceding.

    I'm confused. I plugged everything in the binding in the same way, but it does not seem to reflect the State of the attribute. I can switch the Boolean value in the Interaction of the user and the attribute is replaced as expected.

    Thank you

    Edit: I have reproduced this issue with a very simple affair. Make a new workflow and put only a part of the Interaction of the user in it. In the UI element, create an external of entry as a Boolean attribute of the workflow. Default font to True/Yes. When you run the workflow, the user interface element shows the value as a no.?

    Hello

    Looks like a bug in the client Java vRO (but works in vSphere client to Web). I am able to reproduce it in my environment, on the two vRO 6.x and 7.0.

    I'll open a PR in order to track and remedy in the future vRO releases.

    BTW, I vaguely remember there is a reported similar problem long time for vCO 4.x. It seems that the problem has reappeared again in silence

Maybe you are looking for