tag:blogger.com,1999:blog-5874979429188093780.post5033053734463443578..comments2024-03-18T06:46:54.352+01:00Comments on Andrej Baranovskij Blog: ADF Query Component and View Criteria Functionality with Custom Query Listener in 11gAndrej Baranovskijhttp://www.blogger.com/profile/04468230464412457426noreply@blogger.comBlogger74125tag:blogger.com,1999:blog-5874979429188093780.post-62193688067514605962019-04-18T16:17:12.105+02:002019-04-18T16:17:12.105+02:00If a view criteria has 2 items, say ID and DATE, t...If a view criteria has 2 items, say ID and DATE, then is it possible to make ID independent of DATE. ie, if only ID is entered then it should search with only ID but if DATE is entered, it should consider ID if it is not null? I'm using af:query here in my JSFF page.<br />SHEVINhttps://www.blogger.com/profile/08469828909849375291noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-41203953222766457442017-02-13T15:52:17.274+01:002017-02-13T15:52:17.274+01:00hi
Have a use case where have to do the af:query ...hi<br /><br />Have a use case where have to do the af:query 'Add Feilds' button does programmatically. Can do that by getting the current af:query view criteria and adding new rows to the VC.<br />Like:<br />ViewCriteriaRow vcRow = vc.createViewCriteriaRow();<br />vcRow.setName("Service");<br />ViewCriteriaItem viewObjectVCRowItem = vcRow.ensureCriteriaItem("Service");<br />viewObjectVCRowItem.setValue("value");<br />vc.addElement(vcRow);<br /><br />But is there any way we can get the currentRow(existing row) in the view criteria.So that can add the new fields as criteria item to the row. Is that possible?<br />Any pointer on how the Add fields button behaves in the backend.<br /><br />Jeethu<br />Anonymoushttps://www.blogger.com/profile/06142852987705281500noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-32324424682880904812016-12-21T17:07:53.731+01:002016-12-21T17:07:53.731+01:00Hi Andrejus,
I need a way to clear search paramete...Hi Andrejus,<br />I need a way to clear search parameters. Standard Reset not only clears but removes the parameters added in advanced mode and switches to a basic mode.<br /><br />In basic query mode, a custom button to clear bind parameters works, but in advanced mode this doesn't work.<br /><br />Any way to reset the values of search parameters, in advanced query mode?<br /><br />-VishnuAnonymoushttps://www.blogger.com/profile/16516015917284016735noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-14223807590143210602016-04-26T15:20:08.236+02:002016-04-26T15:20:08.236+02:00Hi Andrejus,
It's been a wonderful experience...Hi Andrejus,<br /><br />It's been a wonderful experience with ADF learning from your blog in this short span of 4 months started learning on ADF. I want the latest code for reset button action where it has to empty the inputs textboxes even after the when we take the cursor out of the fields.<br /><br />This code is certainly not working when we input some data and come out of the fields and click somewhere on the screen. then the reset functionality is not working.<br /><br />My requirement is not just bringing the search form. I am using execute with parameters in operations from the table, not queryable attributes. So, I will not get reset button with execute with parameters. <br /><br />if you can please give the solution this will be a great help.<br /><br />Best wishes,<br />Pavan. <br /><br />Anonymoushttps://www.blogger.com/profile/03887304205336875683noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-43710913419609635682016-04-18T21:19:29.785+02:002016-04-18T21:19:29.785+02:00Im having problem with this specific situation eve...Im having problem with this specific situation everytime i click on the search for my rows it say "no data to display" need helpannnnn101https://www.blogger.com/profile/12228771683421039511noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-40631208804871039852016-01-22T20:17:43.015+01:002016-01-22T20:17:43.015+01:00Hi,
Is it possible to put more than one ids in re...Hi,<br /><br />Is it possible to put more than one ids in resultcomponentid? i want to have a single af:query and with those search parameters i want to show result in more than one result tables. is it possible? <br /><br />actually we have 4 different views and all of them have three common fields and i want to built a single search for all four views.<br /><br />Regards<br />Atif Atif Darhttps://www.blogger.com/profile/10406106489570467763noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-25809491609903845432016-01-18T14:29:23.858+01:002016-01-18T14:29:23.858+01:00Hi,
Nice post....
I have a requirement to add can...Hi,<br />Nice post.... <br />I have a requirement to add cancel button at bottom for consistency.<br />Is it possible to customize view criteria in search form so that we can have search,reset and one more cancel button.<br /><br />please let me know.vimalhttps://www.blogger.com/profile/04993790351502819074noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-10776990775925148772015-07-29T00:57:52.477+02:002015-07-29T00:57:52.477+02:00hi ...
can i replace the department id like 60...hi ... <br />can i replace the department id like 60 with the matching name like Administration after the search .... <br />Thank youTokandohttps://www.blogger.com/profile/10092700609653335953noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-50540262269552692662015-05-05T20:28:00.329+02:002015-05-05T20:28:00.329+02:00Andrejus, I found a work-around. Even though I fin...Andrejus, I found a work-around. Even though I find oracle.jbo.domain.Timestamp in the hierarchy search, the xml file still shows java.sql.Timestamp which then causes the type conversion problem. So I updated the xml file from java.sql.Timestamp to oracle.jbo.domain.Timestamp and it worked. Now if I play around with it, I have to keep setting it back as jDeveloper wants to keep changing it on me. But once I set it and leave it alone it is fine.<br /><br />Unfortunately using the bind variable gave me a side effect that I wasn't expecting which was that the bind variable then showed up as one of the search parameters. In fact the variable that I wanted to pre-populate while it was populated with the Bind variable's value, the search form was using the value set on the bind variable rather than the value beside the date field that I had prepopulated. So I had to abandon this solution. Fortunately I have found another possible solution using CompOper directly in the xml code. I found it here: http://docs.oracle.com/cd/E25178_01/web.1111/b31974/web_search_bc.htm in section 27.3.3 How to Create Custom Operators or Remove Standard Operators. So far I have yet to get it to work, but I know that I am close. The db date field generates code or not depending upon what I place in the TransientExpression. Now I am testing converting SYSDATE to a timestamp using the TO_TIMESTAMP function to match the code that was generated during the last run when the code wrapped the REQUEST_DATE field with TO_TIMESTAMP and wrapped that in TO_CHAR when I just passed SYSDATE. Hopefully I will find a solution before I leave from work in about 3hrs.<br /><br />Thanks again!<br /><br />RichardRichard Burkhttps://www.blogger.com/profile/11146179281490428746noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-48929323407081045062015-05-05T16:46:34.178+02:002015-05-05T16:46:34.178+02:00Thanks Andrejus, that got me further, but I am sti...Thanks Andrejus, that got me further, but I am still running into the problem of converting apparently a groovy date to a oracle.jbo.domain.Timestamp. I have been trying different data types and different date formats to make it work, but nothing yet. It seems like date conversion is difficult when it comes to basically prepopulating an af:query search field of date/timestamp data type.Richard Burkhttps://www.blogger.com/profile/11146179281490428746noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-71196790194781194812015-05-05T06:45:28.279+02:002015-05-05T06:45:28.279+02:00Hi,
Try to check this post: http://andrejusb.blog...Hi,<br /><br />Try to check this post: http://andrejusb.blogspot.com/2013/03/default-dynamic-value-for-adf-query.html<br /><br />Regards,<br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-55541591000699391042015-05-04T21:27:09.643+02:002015-05-04T21:27:09.643+02:00Andrejus, thanks for all of your blog postings! Th...Andrejus, thanks for all of your blog postings! They have been very handy since I started with ADF programming Dec 2013. There is so much more to learn.<br /><br />My question: How do I default a mandatory query date field to the current day's date?<br /><br />I have been searching for a solution for a few days without any solutions that have actually worked. I am hoping for a declarative solution versus a programmatic solution. It seems intuitive to me that I should be able to provide SYSDATE as the value, but the only choices of operand provided by the Edit View Criteria window of the query is Literal Value and Bind Variable value. What I'd like to choose for Operand is SQL and value of SYSDATE, but that is not available.<br /><br />Any ideas? I will take a programmatic solution, but declarative is preferred.<br /><br />Thanks in advance for your time!<br /><br />Richard BurkRichard Burkhttps://www.blogger.com/profile/11146179281490428746noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-69722696943295415042014-12-27T18:50:18.113+01:002014-12-27T18:50:18.113+01:00Hi, we have a requirement where we have to handle ...Hi, we have a requirement where we have to handle ADF query component with custom search query in advance mode.<br />Currently we have the query component in basic mode and the query clauses are constructed dynamically based on the entered search criteria values. We have a requirement recently to enable advanced mode for this adf query component. Could you please help in understanding how could we handle custom query in advance mode especially when a view criteria item is added multiple times.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-31845277096880047882014-03-23T08:15:55.999+01:002014-03-23T08:15:55.999+01:00Hi Andrejus,
I know this is a very old post but i...Hi Andrejus,<br /><br />I know this is a very old post but i am stuck in a scenario of af:query.<br /><br />We have a requirement where we need to display say two LOVs in search criteria corresponding to same attribute. Our database table is something like follow:<br /> <br />ColumnName -> Lookup_Type Lookup_Value<br />Data -> BusinessUnit BU1<br /> BusinessUnit BU2<br /> ClientCode CC1<br /> ClientCode CC2<br /> <br />So its a simple look up table where we can provide the lookup type and get the values. On top of this table we have created one query based view object "select Lookup_type, Lookup_Value from Lookup_table". Now the requirement is to display each lokup type as drop down with all lookup values in search criteria. Means in search criteria we should have two drop downs , one for businessUnit and one for ClientCode.<br /> <br />What we tried is, we created LOV on Lookup_type attribute, created two bind variables with default values as BusinessUnit and ClientCode and created one view criteria. In view criteria we added two items,like, lookuptype =:pBusinessUnit and lookupType=:pClientCode. On dropping the view criteria on page, we can see two drop downs. But problem is they both are populated with all the values. BusinessUnit drop down is populated with all the values but BU1 as selected value and ClientCode is populated with all the values but CC1 as selected value. However they should be populated with there corresponding values.<br /> <br />Please suggest if we can achieve this in single VO or we need to create separate VO for looup type, then create LOV in all the VO and drop them on the page.<br /> <br />Using JDev11.1.1.6.<br />Appreciate your help..<br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-58072136478469117992013-10-16T09:39:20.279+02:002013-10-16T09:39:20.279+02:00Yes, you can get it in VO Impl class.
AndrejusYes, you can get it in VO Impl class.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-54377206679253079252013-10-16T09:26:50.025+02:002013-10-16T09:26:50.025+02:00Is there any way of getting the view criteria quer...Is there any way of getting the view criteria query that is fired on the click of search button? Anonymoushttps://www.blogger.com/profile/08707741955324362651noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-29105541232233670892013-08-22T11:45:06.691+02:002013-08-22T11:45:06.691+02:00Hi,
What happen if I want to use af:Quickquery wit...Hi,<br />What happen if I want to use af:Quickquery with customize named view criteria?Anonymoushttps://www.blogger.com/profile/06166836470563098973noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-16852372854431381422013-05-10T13:55:01.142+02:002013-05-10T13:55:01.142+02:00Thanks.
Its an open issue for us. It got me curiou...Thanks.<br />Its an open issue for us. It got me curious. Please look whenever you have time. Praksashnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-5719804089297609742013-04-18T11:15:05.729+02:002013-04-18T11:15:05.729+02:00No time yet - busy in projects. Will do.
Andrejus...No time yet - busy in projects. Will do.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-61724295562718909002013-04-18T11:09:44.754+02:002013-04-18T11:09:44.754+02:00Hi,
Were you able to test this?
ThanksHi, <br />Were you able to test this?<br /><br />ThanksPrakash Gnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-5114687350818250972013-04-01T13:17:48.470+02:002013-04-01T13:17:48.470+02:00Another thing-
You will have to use this command ...Another thing- <br />You will have to use this command vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS | ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES) so that QBE starts working for uncommitted rows at all.Prakash Gnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-68820356228362011292013-04-01T12:44:50.163+02:002013-04-01T12:44:50.163+02:00Please do. Appreciate your help.
I am using an in...Please do. Appreciate your help. <br />I am using an internal build of Jdev v11.1.1.7.0<br />Sorry for the late reply.Prakash Gnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-24519305352108656912013-03-17T08:23:08.901+01:002013-03-17T08:23:08.901+01:00Quite interesting - I will test it as well and let...Quite interesting - I will test it as well and let you know. Which JDev version are you using? This might be ADF bug...<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-72018745732128877982013-03-15T11:02:47.112+01:002013-03-15T11:02:47.112+01:00Thanks for reply. I will post my problem in case y...Thanks for reply. I will post my problem in case you might be knowing something useful about that.<br /><br />In our case we need to have QBE enabled on a af:table in which we can insert rows. Suppose I have 3 uncommitted rows and 2 committed rows and now I filter the table using some value then the filter results are correct (and say 1 uncommitted row is being shown) but when i clear the filter the I won't get back all the uncommitted rows in the table. So now I will only have the 2 committed rows and that 1 filtered uncommitted rows back. 2 uncommitted rows are lost. And even if i commit the changes to db only that 1 uncommitted row will be added to the DB. Any idea?Prakashnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-73599607090357036642013-03-11T18:00:08.806+01:002013-03-11T18:00:08.806+01:00Hi,
Mainly because transaction will remain dirty,...Hi,<br /><br />Mainly because transaction will remain dirty, and when next time user press Commit - it may cause unexpected results of data being changed which is not currently on the screen.<br /><br />Technically its possible, but it might be risky to make data dirty.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.com