How to search on a transient attribute in a VO ?

Hi,
I want to search on a field, on my page, that's not in the database. So I created a transient attribute, in the view object, that is queriable so it appears on the find page.(with JDeveloper/JHeadstart) But when I use the attribute in the where clause of the View Object I get the following error: "SQL Query Error Message: ORA-00904 "STATUSGROEP": invalid identifier".
I also tried to use a bind variable (:1) instead of the attribute name in the where clause but then I get the runtime error: "java.sql.SQLException: ORA-01008: not all variables bound".
What am I doing wrong ?
Regards,
Chris van Dijk

Michiel / Chris
Based on the find attributes, JHeadstart automatically adds a SQL WHERE CLAUSE to the ViewObject. Since transient attribute do not map to a valid column name, this will not work.
I built a little testcase with a transient attribute, and it was simply ignored, I did not get the ORA-904. From your description, it looks like you added some bind variables to the ViewObject as well. That is not supported in combination with find pages, unless you overwrite method
DataObjectSet getDataObjectSet(String queryType, HashMap arguments, Object sessionId, int startRange , int rangeSize)
on the handler.
Anyway, if you really want to filter on a transient attribute, you will have to do that in java code, overriding the aforementioned method:
- remove the transient attribute from the arguments HashMap
- call super to execute the query without the transient attribute
- loop over the result set and remove the rows that do not match with the transient attribute value.
This might be quite slow, depending on the size of the result set returned by the query. Can't you somehow translate the transient attribute value to some SQL column values so all filtering can be done using SQL?
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Advanced Search dropdownlist shows transient attributes

    Dear Forum,
    When I set a couple of attributes on display = false, they DO appear in my dropdownlist for the advanced search screen.
    Any ideas how to hide them there also?
    Kind regards,
    Arjen

    Got that already covered.
    Manually remove them from the uix-code..

  • How to search for a "singleselect" attribute

    Hi experts,
    currently I have got some problem with the "advanced search" function in SAP IdM 7.1 SP3 UI. I would like to build a dropdown-menu for searching a certain attribute A in the advanced search modus in the IdM UI. Therefore, i have define the attribute A as a "single select" attribute, and also defined some valid values for this attribute. In the modify-modus, it work pretty well. I can choose the value from the dropdown menu. But in the advanced search modus, I can see the dropdown-button, but the dropdown menu is empty. I cannot see the value I have defined there.
    Is this a bug of the UI??
    Can anyone help me to solve the prolbem? Or does anyone have other idea to build a dropdown menu in the advanced search modus?
    Thanks a million in advance!
    BR
    Xuan

    You can't search through email content using buil-in search
    If you're using Gmail, you can use their native Google Mail app which will allow you to search through body content and server-stored emails.

  • How to save transient attributes?

    Hi,
    I have a query related to saving the View Object transient attributes :-
    Following is the scenario which we want to implement:-
    1. We have a  page on which we are using a table component with 5-6 VO transient attributes and n number of rows.
    2. There is a save button on the page which allows user to save the activity which he is performing and able to resume the activity later on.
    3. As soon as he click on the save button, all the EO attributes get persisted.
    4. When he re-opens a flows, he can see a resume button which allows him to resume the activity from the point he left.
    5. So User should be able to see the changed he made on the table component on clicking the resume button which he made before saving the activity.
    Now, the question is how we can retrieve the transient attributes on resuming the activity or is there any way by which we can save the transient attributes of View object ?
    Please help !!

    Refer
    ADF Practice: Passivation and Activation of View Objects with Transient Attributes

  • How to query involving Multi-Value Attributes objects

    Hello.
         I have one question regarding coherence. We are looking for best and the fastest way to query multi-value attribute of objects. In Coherence User guide there is example, that shows, how can this be made with java.lang.String object:
         Set searchTerms = new HashSet();
         searchTerms.add("java");
         searchTerms.add("clustering");
         searchTerms.add("books");
         // The cache contains instances of a class "Document" which has a method
         // "getWords" which returns a Collection<String> containing the set of
         // words that appear in the document.
         Filter filter = new ContainsAllFilter("getWords", searchTerms);
         Set entrySet = cache.entrySet(filter);
         // iterate through the search results
         But I would like to know, how can this be made with some other object type. For example I could have object MyCoherenceObject with attribute HashSet<Identifier> idHashSet that would represent Person object that has composite key comprised of name and lastname. Identifier object would contain two attributes of type String: name & value.
         So basically I could have two identifiers in list:
         public MyCoherenceObject {
         public HashSet idHashSet = new HashSet();
         public MyCoherenceObject() {
         Identifier id1 = new Identifier("name", "John");
         Identifier id2 = new Identifier("surname", Smith");
         idHashSet.add(id1);
         idHashSet.add(id2);
         public HashSet getIdentifiers() {
         return idHashSet;
         This object would later be inserted in coherence cache. When query over coherence cache would be performed I would like all objects where multi-value parameter with name="name" equal "John" and parameter with name="lastname" equal "Smith". My code would look something like this:
         Set searchTerms = new HashSet();
         searchTerms.add("John");
         searchTerms.add("Smith");
         // The cache contains instances of a class "Document" which has a method
         // "getWords" which returns a Collection<String> containing the set of
         // words that appear in the document.
         Filter filter = new ContainsAllFilter("getIdentifiers", searchTerms);
         Set entrySet = cache.entrySet(filter);
         // iterate through the search results
         How can this be done. Basically I don't know how to search in multi-value attribute if one value represents arbitrary object and how to tell coherence which getter fuction must be used for comparison. In my case getValue() must be used and not getName().
         Second problem:
         Coherence must not return Person object with name="Smith" and lastname="John". Here upper filter would be satisified, but problem is that I am looking for person with lastname "Smith" and name "John".
         Domain description:
         I will have different objects of same type in coherence cache with different multi-value attribute list length. For example some objects will have only one identifier object in list (e.g. Phone "phoneNumber") some two (e.g. Person "name", "lastname") and other objects will have maybe three identifier objects (e.g. City "country", "area", "state").
         If there is faster way to do this in Coherence (I saw examples with getters that contain attributes for example), please give me some directions.
         Thank you very much for your help.

    When filtering based on the getIdentifiers, you should add Identifier instances into the searchTerms collection, and it will satisfy all your expectations. If you add simple Strings into that searchTerms collection, then none of your queries will return anything, because the String will never equal() the Identifier instances.
         You can also add an index on the getIdentifiers() method. However, the Identifier class should properly implement the equals() and hashCode() methods, and in order to be able to use an ordered index (you don't need that for the current requirements you listed), it should also implement Comparable.
         BR,
         Robert

  • ViewObject Transient Attribute Refresh...

    Hi All,
    I and using JDeveloper 11.1.1.6.0
    I have a transient attribute that gives me the total cost of orders whose boolean attribute is true.
    The transient attribute works fine, but at runtime when the boolean is changed to false the attribute does not refresh. I've tried setting partial refresh and that still does not work. the updated value of the total cost is only displayed when a new session is created.
    How do I get this transient attribute to update as im changing the boolean checkbox value e.g true to false and the other way around.?
    Thanks.

    What is a "new session"?
    I think there is no enough information to help you.
    Where are you doing the calculations? On the transient attribute settings or in a Managed Bean?
    If you have  calculations on the trasient attr then "Always" the calculations will be done after you filled the fields values and your boolean attr will be ignored.
    Jhon

  • Transient attributes

    Cache scheme: replicated
         If our data objects has a few transient attributes (say large attributes, that we do not like to replicate until the need arise, a.k.a lazy loading), how do we code this logic in our put/get API? An example would suffice.
         I think this issue also arises in Coherence *Web, where large attributes can be declared as transient, and are stored as different entities for performance reasons as in ``split'' session model.
         Regards,
         Bulut.

    The easiest approach is to mark the fields as     > transient, then use getter methods with lazy loading.
         > This can read those attributes from the appropriate
         > data source (which may be a cache or even a database,
         > depending on your requirements).
         Do you think Coherence would help in this case? Where would you implement this lazy loading logic? And more importantly, how would it look like? I can see two alternatives:
         i) using Coherence services... maybe using a near cache?
         ii) independent of Coherence? which definitely looks more cumbersome.
         > Coherence*Web simply queries a method which indicates
         > whether a given named attribute should be clustered
         > or not (this class is provided by the application
         > developer). Also, note that Coherence*Web does not
         > lazily load non-clustered attributes; it actually
         > determines whether to make them visible to other
         > cluster member.
         Basically, my question is how Coherence implements handling of transient attributes, if we need a local transient attribute at a remote site.

  • How to add new transient attribute in VO ?

    Greeting ,
    I just want to add new transient attribute in VO .suppose i have a VO which have 5 attribute and i want to add one new transient attribute type of select one choice .
    how does it possible .
    regards
    prateek
    Edited by: Prateek on Jul 10, 2011 10:25 AM

    see, i want just add a static select one choice for example :
    <af:selectOneChoice label="Connection Type"
    requiredMessageDetail="Please select a connection type"
    id="soc2" showRequired="true" autoSubmit="true"
    value="#{uploadBillDetails.connectionType}">
    <af:selectItem label="Select Connection Type" value="Select" id="si4" />
    <af:selectItem label="Landline" value="Landline" id="si3" />
    <af:selectItem label="CDMA" value="CDMA" id="si2"/>
    </af:selectOneChoice>

  • Search on Transient attribute LOV not working properly.

    Hi All,
    I made LOV on a transient attribute of VO. While drag & drop it onto the page I selected the option: List of values-->ADF LOV Input.
    In LOV search form there are 2 fields : org code & org name. Whenever we provide either/both of the search parameters. It works fine but as & when we click on SEARCH button without providing any search parameters(i.e. org code & org name both are blank) it makes subsequent search of LOV with either/both of the search parameters not working.
    Please suggest any solution for the same.
    Thanks & Regards,
    Manu
    Edited by: rechin on May 16, 2012 3:16 AM

    I selected the VO attribute(while VO is opened) on which I want to create LOV. Added list of values for it with following details:
    Configuration tab :
    List Data Source - same VO as VA
    List Attribute - org code
    UI hints :
    Default list type : Input text with list of values
    Display attributes : org code, org name
    List search : All querable attributes
    let me know if you need more details.
    Edited by: rechin on May 16, 2012 3:27 AM

  • SAF TREX search how to search multiple attributes

    Hello,
    Any of you programmed in the SAF framework? I need some code help to search for multiple attributes.
    example: I want to do a search like this
    attribute 1 `Description` = Robotarm AND
    attibute 2 `Problem` = blocked
    I can search only on one attribute at a time.
    I use
    cl_crm_saf_se_trex_abap
                if_crm_saf_se_genil~search
    and also tried the function module contained in it
                TREX_EXT_SEARCH_DOCUMENTS
    Although I make query it does not seem to work for multiple attributes. Can any of you give a code sample.
    Best Regards,
    Frederik Defour

    Hallo,
    the reason why your query did not work ist simple: you have to tell TREX about the AND operator as well. Here in an example how the query table could look like:
    LOCATION     | VALUE1          | ROWTYPE          | OPERATOR
    |--||--
    short_text     | my product     | ATTRIBUTE          | EQ
    AND          
    OPERATOR          
    BRACKET_OPEN     
    article_type     | 15          | ATTRIBUTE          | EQ
    OR          
    OPERATOR          
    article_type     | 07          | ATTRIBUTE          | EQ
    OR          
    OPERATOR          
    article_type     | 99          | ATTRIBUTE          | EQ
    BRACKET_CLOSE     
    I hope this helps
    Best regards,
    Martin

  • How to reference a custom property in a vo transient attribute expr + bug

    Hi all
    I have created a transient attribute with an expression that evaluate null content to replace it by a appropriate text.
    <ViewAttribute
        Name="DescriptionUI"
        IsUpdateable="false"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="VIEW_ATTR"
        SQLType="VARCHAR">
        <TransientExpression><![CDATA[((Description == null) ? 'Pas de description' : Description)]]></TransientExpression>
      </ViewAttribute>I have defined a custom property for that attribute that contains the message text. I was surprised to see that the custom property was not associate with the attribute in the source file. Don't understand where the association is done
        <Properties>
          <CustomProperties>
            <Property
              Name="flex.tree.noLabel"
              ResId="flex.noDescription"/>
          </CustomProperties>
        </Properties>I had some difficulties to use the custom property editor. When creating a new related one by using an existing resource the property column value is not changed and the content 'Property' is generated. Because no relationships exists between attribute and the property, the entry is lost in the table referring custom property list for the attribute when your come back into the view object or if you save an another entry in an another attribute.
    So my first question ? Is the attribute editing part the right part to define custom property pairs if they are not related to attributes ? is it a bug ?
    My second question is : is it possible to evaluate the bundle in the expression (replacing the literal 'Pas de description' by an expression) ? What is the expression to use ? Where it is described to do such things in the help or in the documentation ?
    Thank you

    This is wrong
    ((Label == null) ? {FlexParameterModelBundle['flex.tree.noLabel']} : Label)
    What is the correct syntax to refer to the project model standard bundle in the groovy expression ?
    Thank for the help !

  • How to populate transient attribute from view object dynamically

    I have three 4 tables named as "employee,event,event_progress,and checklist progress". i have created a view object using the first three tables . i ahave also created 5 transient variables in to the same view object.when i dragged the view object in to my page as a table i want to populate those transient attribute.
    i have 5 transient attribute which are present as a column value named as chechlist_name in another table "checklist".those all transient attribute also having two sub rows whose data should be populated from the checklist progress table.

    Hi
    Please post your question on this forum, your question belong to this forum.
    JDeveloper and ADF
    Muhammad Nasir

  • How to make Transient Attribute Mandatory in View Object?

    Hi ,
    I have a Transient Attribute 'TransientFromCode' which is based on LOV .On UI ,I am showing this 'TransientFromCode' as 'SelectOneChoice' .
    So on selection of this i am populating other mandatory attributes.
    My requirement is to show this as 'Required' on UI but in View Object i am not able to find mandatory property for this attribute.
    I dont want to use required='true' . So can you plesae tell me is there any way to make Transient attibute as mandatory on UI .
    Thanks

    940637 - Your Use Case is a little vague\confusing.
    If you are just trying to get the standard "Required" architecture, it probably isn't working because you have incorrect syntax. It is #{bindings.MyViewObj.MyAttr.hints.mandatory}
    Yours: "#{bindings.UnitOfMeasureIntraClassConversion.hints.TransientItemDesc.mandatory}"
    It will "dynamically" pick this up at Runtime from the ViewObject Attributes "Mandatory" property (Attributes\Details tab), BUT the EL will always evaluate to "true" so this is the same functionally as just hard coding the UI component's Required property to "true" (although doing so is against Best Practices)
    If you are just wanting to SHOW the field as required without the standard Validation logic (because you are coding your own), you could:
    1) JUST set the UI component's "ShowRequired" property = true. This displays the * next to the Label (regardless of actual View Object Attr setting) but fires no validation.
    2) If you want to not show * but some custom standard, you could just create ANOTHER transient Attribute in the View Object and call it "TransientItemDescRequired" and set it to a Literal "y" or leave it blank and programmatically set it later... You can code your own validator\method\whatever against it, etc
    Edited by: donhoyt on Jul 5, 2012 7:58 AM

  • How to call a method in Viewimpl from transient attributes value

    Hai,
    I have a method in ViewImpl say validate().I need to call this method from an transient attributes value where value type is expression.i used adf.object.validate() but its not working.
    Can any one help me
    Thanks in advance

    Hai,
    Jabr i read these in a pdf where it explains about Introduction to Groovy support in JDeveloper and Oracle ADF 11g
    Referencing custom methods in the EntityImpl class
    If you have defined a method in your EntityImpl class, then this can be called as part of your
    expression for an attribute default:
    adf.object.getDefaultSalaryForGrade()
    Unlike when referencing an attribute of the entity object, which can be done by simply
    referencing the attribute name, when referencing a method, you are required to prefix the
    method name with adf.object.
    So is there a way?
    regards

  • How to add transient attribute to URL Data Control

    Hi,
    Is it possible to add a kind of "transient" attribute to an URL Data Control on model layer?
    regards
    Peter

    Hi,
    no. it doesn't. Even with ADF BC, the transient attributes need to be held by the business service and not the data control
    Frank

Maybe you are looking for

  • Different Audio Levels in Edit View vs. Multitrack View

    Here's what happens... I begin a new session. I then import a .wav file and it appears in the left column. I double-click the .wav so I'm in Edit View. When I play the clip, it ranges from about -9 to -6 dB. Now I go back to Multitrack View without h

  • TFS Power Tool 2013 Process Editor won't launch

    I installed VSTF 2013 (Team Explorer for Visual Studio 2013) and also TFS Power Tool (12.0).  I rebooted after installing and then launched VSTF successfully and connected to my Team Project successfully.  I then go to ""Tools>Process Editor>Work Ite

  • Vendor - Control - Type of Busines

    Hi, How to take 'Type of Busines' field available in Vendor master Control data (SAP T.Code: MK03) to BI? Is there any datasource available? Thanks in advance!!

  • How to block spam with subject "Here you have"?

    Hello,   Cisco IronPort has identified a SPAM Outbreak with Subject "Here you have" and has published IronPort AntiSpam rules to protect from these messages. If you notice the messages bypassing your Email Security Appliance, please verify that these

  • Cryptotools - Passphrase

    hi experts, to add a credential entry in credentialstore.xml, I use the cryptotools without encrypting the password, everything works well. however, when password is encrypted with Passphrase, there are problems. in these samples, the Passphrase is a