Using quick query component
hi,
I am using quick query component. There is any way to show in the combo box of the quick query component only some and not all fields, because I do not need to display all.
Please..
Vane,
If you're using ADF Business Components - I believe you can do this by creating a named view criteria on your View Object and then dragging-and-dropping the named view criteria on to the page as an af:quickQuery - haven't tested this personally, though.
A really quick test - no more time today - seems to show that named view criteria can create an af:query, but I didn't see af:quickQuery as an option...
Time to read the Fusion Developer's Guide, I guess.
John
Similar Messages
-
Quick query component without dropdown
Hi,
I am using quickquery component on ADF Tree table .. I want to display quick query without the dropdown in its layout..I want to display only Label, InputText and search button.
how can I achieve this?
Thanks,
SwathiHi,
Check
http://blog.applegrew.com/2012/02/adf-super-code-snippets/ -
How to customize quick query to search with SQL in contain keyword
I want to build simple query using quick query component. But it will search with SQL equal keyword. How can I customize it to use contain keyword instead. That means, I enter 'sc' to return 'scott'.
Not sure if the technique described here http://tompeez.wordpress.com/2011/08/21/extending-viewcriteria-to-use-sql-contains-4/ can be used for quick query, but you can try ...
Timo -
Dashboard quick query limit component
Hi All,
I am using quick query limit in a dashboard...
I set it up ok in the ESM file... everything is working as advertised, BUT when I create the runtime version everything from the component disappear... the query panel button in the other frames is missing , the runtime dashboard doesn't start from the query panel even if it's defined in the dashboard properties as the startup frame...
I tried to build the runtime version from the quick query limit sample and I noticed the same behaviour, there is some hidden flags in building the runtime version?
I'm using version 9.3.1.0.0.248 on Vista
TIA & best wishes
GianlucaHi,
Check
http://blog.applegrew.com/2012/02/adf-super-code-snippets/ -
Multiple queries happeing in adf query component using LOV
Hi,
I am using a programmatic view object in adf query component and have created List of values for one attribute by adding another programmatic ViewObject as ViewAccessor.
To populate the lov ViewObject, i have overwritten the method executeQueryForCollection in which i call the webservice to fetch the data. So lov is working fine inside QueryComponent.
I have overwritten queryListener attribute of query component in my backing bean. In the queryListener method, to populate the result grid, am populating the view object by using createRow and insertRow apis. While doing so, Whenever i do setAttibute for the lov field, the overwrittern method executeQueryForCollection getting invoked. Hence my webService getting invoked. So if i have 10 rows, the webservice is getting invoked 10 times.
I put sops in the executeQueryForCollection method for the queryMode and getName.
System.out.println("executeQueryForCollection::::"+this.getQueryMode()); i get as 7
System.out.println("executeQueryForCollection:::=" +this.getName()); i get as CurrencySummaryLOVVO_5708_findByVC_ The number 5708 varies for every row.
Please tell me How to avoid invoking the executeQueryForCollection everytime when i do setAttribute.
One workaround i have currently is to have one dummry attribute for the lov which can be used for display in grid and actual attribute will be used in Query Component for the lov to function.
Is there any other better workaround?
Thanks a lot in Advance.
Vivek
Edited by: Vivek Singh on Oct 22, 2009 9:16 PMWhen you set a value to LOV field it tries to validate it from the LOV data. thats why it execute query.
Try setting Row Level Bind Values = false for the accessor.
yet, i would suggest to find an other way to populate values of LOV since the executeQueryForCollection will be executed many times when you use that LOV:
[http://adfbugs.blogspot.com/2009/08/lov-execute-query-many-times.html] -
Incorrect operators in af:query component
We have created a search popup using af:query component based on a view criteria.
The view criteria uses two string[varchar2(60) in EO] attributes named "Name" and "Owner".
TerritorySearchViewCriteria
Group
Name CONTAINS :BindTerritoryName -- String in VO, Varchar2(60) in EO
AND Owner CONTAINS :BindOwnerName -- String in VO, varchar2(360) in EO
Issue:
The operators drop down shows some irrelevant search operators(not meaningful to strings) such as "BETWEEN",
"NOT BETWEEN", "BEFORE", "AFTER", "ON OR AFTER" and "ON OR BEFORE". Because of this we are seeing some unexpected
search results when this operators are used for searching.
On looking at the Bali site and BLAF guidelines page it clearly states that the list of operators for string are
"EQUALS", "NOT EQUALS", "STARTS WITH", "ENDS WITH", "CONTAINS", "DOES NOT CONTAIN", "LIKE", "IS BLANK" and "IS NOT
BLANK".
Bali link: http://dadvmc0454.us.oracle.com:9002/faces-11.1.1.2.0/faces/components/query.jspx?_afrLoop=19876843626481699&_afrWindowMode=0&_afrWindowId=null
BLAF guidelines: http://blafstaging.us.oracle.com/blafSite/guidelines5/search.html#queryPanelCond
Attribute Definition in TerritoryEO:
<Attribute
Name="Name"
IsNotNull="true"
Precision="60"
ColumnName="NAME"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="MOT_TERRITORIES">
Attribute definition in TerritoryVO:
<ViewAttribute
Name="Name"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="Name"
EntityUsage="Territory"
AliasName="NAME">
Query component in ManageTerritories.jsff:
<af:query id="qryId1" headerText="#{acrGenBundle['Header.Search']}"
disclosed="true"
value="#{bindings.TerritorySearchQuery.queryDescriptor}"
model="#{bindings.TerritorySearchQuery.queryModel}"
queryListener="#{backingBeanScope.ManageTerritoriesBean.onTerritorySearchQuery}"
queryOperationListener="#{bindings.TerritorySearchQuery.processQueryOperation}"
resultComponentId="::pc2:resId1"
saveQueryMode="hidden"
modeChangeVisible="false"
conjunctionReadOnly="true"
styleClass="AFStretchWidth"/>
Is there a way to eliminate the operators which does not make sense for String type.
Thanks,
SekarAs per the guidelines mentioned for String, You could remove the unwanted operators from the view criteria item.
The example below shows - how the unwanted operators namely BETWEEN & NOTBETWEEN could be removed.
For more details, look into the following section 27.3.3 in the developer's guide:
http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_search_bc.htm#CIHIDGGC
Sample:
<ViewCriteria
Name="EmployeesVOByFirstNameOrLastName"
ViewObjectName="model.views.EmployeesVO"
Conjunction="AND">
<Properties>
<CustomProperties>
<Property
Name="displayOperators"
Value="InAdvancedMode"/>
<Property
Name="autoExecute"
Value="false"/>
<Property
Name="allowConjunctionOverride"
Value="true"/>
<Property
Name="showInList"
Value="true"/>
<Property
Name="mode"
Value="Basic"/>
</CustomProperties>
</Properties>
<ViewCriteriaRow
Name="vcrow0"
UpperColumns="1">
<ViewCriteriaItem
Name="FirstName"
ViewAttribute="FirstName"
Operator="CONTAINS"
Conjunction="AND"
Value=""
Required="Optional">
*<CompOper*
Name="Category"
ToDo="-1"
Oper="BETWEEN"/>
*<CompOper*
Name="Category"
ToDo="-1"
Oper="NOTBETWEEN"/>
</ViewCriteriaItem>
<ViewCriteriaItem
Name="LastName"
ViewAttribute="LastName"
Operator="CONTAINS"
Conjunction="OR"
Value=""
Required="Optional"/>
</ViewCriteriaRow>
</ViewCriteria>
Thanks,
Navaneeth -
Af:query component and persisting preference to database
I am using af:query component for search functionality and that component has an saving preference option to store the preference in session. I would like to store/persist the preference to database and retreive them and show to the user when they come next time.
Could you please let me know, how to accomplish this?
ThanksEjsp2000,
In order to do this, you need MDS, which didn't make it into this release of JDeveloper.
I asked this very question a month or so back - you may be able to find it by searching.
John -
In af:query component , need to make Match option invisble
Hi,
i am using af:query component and do not want to show the Match with radio button options (All, Any).
Can anyone suggest how to achieve this.You use view criteria, as this is what af:query is for. You use 'All queryable Attributes' which is an implicit view criteria.
There is no easy way (I don't know one) to remove the 'Match all/any' radio button other than the way Luc described. In your case you have to build a view criteria like the 'All queryable Attributes' to get to the switch in the UI hint tab of the view criteria.
To do this you create a new criteria and add all attributes you want to one group without specifying and literal or bind variable and use an operator like StartWith for strings and equal for numbers. Then uncheck the 'Show Match all Any' checkbox and use this view criteria for your af:query.
Timo -
Getting the current Mode - Basic or Advanced in the Query Component
Hi,
I am using the query component for search with programmatic view objects and have modified the processQuery() method according to my requirement. I am getting required attribute names , values and operators with the help of queryEvent.getDescriptor(). But still am not able to get the cuurent mode whether it is in Basic Mode or Advance Mode. Can anyone please provide a solution to this. Thanks in advance.
Vivekwith the help of queryEvent.getDescriptor()queryDescriptor.getUIHints().get(QueryDescriptor.UIHINT_MODE)
The above will return either:
QueryDescriptor.QueryMode.BASIC or
QueryDescriptor.QueryMode.ADVANCED
Ref:
http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10684/oracle/adf/view/rich/model/QueryDescriptor.QueryMode.html
http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10684/oracle/adf/view/rich/model/QueryDescriptor.html -
Accessing fields of the af:Query Component
Hi all,
I need to get the value of a dynamic field that is added to the query component at runtime.
In my application there is field named "Member Id" which adds a "select one component" in the advanced search mode.
This "select one component" has a string value "self".
What I need to do is,
When the value "self" is selected from the "select one component" I need to use the Id of the user
as the "Member Id" for the search query.
Is it possible achive this by using af:query component ? or is there a different approch?
I'm using JDeveloper 11.1.1.0.1
Thanks,
MelakaMelaka,
first create a custom View Object Class for your View Object from the Java Classes pane. Then override the buildQuery() method of the ViewObjectImpl by writing the following code:
@Override
protected String buildQuery(int noUserParams, boolean forRowCount) {
// call super.buildQuery() to allow the framework to build the query
String query = super.buildQuery(noUserParams, forRowCount);
// here you will modify the query
// if the query contains your keyword
if (query.contains("'self'")) {
// replace it with the actual user id
// return the modified query
return query;
I am sure there are other cleaner ways to accomplish this.
Consider for example using two separate attributes: one Transient for your "Member Id" query criteria - what is shown to the user - and another attribute actually mapped to a column that is used for querying. You set the value of the second attribute as the first one changes.
Regards,
Nick -
Programmtically Setting View Criteria in ADF Query Component
I have created two view criterias for a View Object and used ADF Query component for searching. User can select any one of the View Criteria from "saved search" in ADF Query component. but i want to set it programmatically based on some business rules. How i can do that?
No I don't want to set view criteria on search click. Actually I have ADF Query component on my page which is by default disabled. There are also some fields outside the query component on the value of which i enable ADF Query component and wants to set a particular ViewCriteria based on context. All ViewCriterias are defined and listed in "saved search" of ADF Query component but i don't want to allow user to select it but wants to application set it automatically based on context. For it i will be needed to set a particualar ViewCriteria for ADF Query component through code and then refresh ADF Query component to show newly set ViewCriteria. I know how to refresh query component or any other component through code but don't know how to set ViewCriteria on ADF Query component?
-
Designing Layout of Query Component
Hi, I am using the query component both in basic and advanced mode. I just want to know whether i can change the layout pattern of fields in query component or not. If yes, then please provide some guidelines.
You basically build an input form and design it anyway you want, and then use a button on the page to invoke an AM method that will set the VO to use the named view criteria you want.
Something along the lines of this:
http://blogs.oracle.com/shay/entry/am_service_method_-simpledem -
Is it possible to use the af:query component with programmatic VOs?
My understanding is that the view criteria in a normal SQL-based VO are used to add WHERE clauses to the VO.
Since programmatic VOs do no have this capability, is there something I need to override in the view object implementation class to support the view criteria that will be established by the af:query component?
Does someone have an example of how this might be done?
Thanks, -KlausUnfortunately no. The remote control will work, but the radio will not.
The radio only works with the iPod video and the nano. -
How to use my Declarative Component in query component ???
Hi everybody,
I want to change inputDate in query component to my declarative component for Date fields. I did not find any way except implementing the Model of Query component so read "Web User Interface Developer’s Guide for Oracle Application Development Framework 11g Release 1 (11.1.1) " document and use the ADF Faces Demo Application. now I don't know can I change type of search component to my declarative component in DemoQueryBean class ??
the code of oracle.adfdemo.view.query.rich.DemoQueryBean that I changed is :
public static final ComponentType myDatecomponent=ComponentType.valueOf("myDate");
private void _createPageDef()
_pageDef = new DemoPageDef();
_pageDef.addAttributeDef("Ename",
"Employee Name",
"Full name of the Employee [Last Name, First Name]",
String.class,
persianDate,
false, null, true, true, true);
As you can see I changeed type of Employee Name component to my Component but I see below exceptions :
]] Root cause of ServletException.
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
Truncated. see log file for complete stacktrace
java.lang.IllegalArgumentException: No enum const class oracle.adf.view.rich.model.AttributeDescriptor$ComponentType.myDate
at java.lang.Enum.valueOf(Enum.java:192)
at oracle.adf.view.rich.model.AttributeDescriptor$ComponentType.valueOf(AttributeDescriptor.java:121)
at oracle.adfdemo.view.query.rich.DemoQueryBean.<clinit>(DemoQueryBean.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
Truncated. see log file for complete stacktrace
>
I think these exceptions happend because of there is not any constant of AttributeDescriptor$ComponentType in ComponentType class for myDate component.
I try to create a class and extends ContentType and add my component type to it but I can't. is there any way for solving this problem ?
please help me :(
Thanks.Hi,
saying it this way: There is no native option to do this. Since I never tried hacking into the framework classes, I can't say if there is a glimpse of hope for you
Frank -
How can I use FK description in a BC4J data query component?
Hi all,
I am facing the following problem.
Although I use renderers in the DataEdit component for displaying the descriptions of the FKs this is not useful for the BC4J data query components.
How can I get the same functionality as in the dataEdit components?
Thanks in advance,
AggelosAnfortunately,
This is not the same when I have a DataQuery component.
The question now becomes as following:
How can I use FK description in a BC4J data query component?
Thanks in advance
Aggelos
Maybe you are looking for
-
System Throws short dump while executing data source 2LIS_11_VASCL in RSA3.
Hello Experts, I got short dump while executing data source 2LIS_11_VASCL in RSA3. The details are as follow. When importing object "MC11VA0SCL_TAB", the structure did not match the structure of the target object. The error occurred in component no.
-
HT4437 where do you put airplay code at
tring to get ipad to work with apple tv with airplay can not get music on ipad to work with apple tv
-
Can I order photo books or prints for shipping to Canada?
Will the iPhoto photo book and prints deliver to Canada? Is there an extra cost for shipping?
-
Using an expression to set checkbox value
Hi, I am working on an application that has a whole suite of javabeans where boolean fields are expressed as Y/N flags. Regardless of whether or not this is a good idea, that is how it is and I cannot change them (it came about because the beans map
-
Magic Mouse Windows 7 Bootcamp 3.1
Can someone confirm whether or not the new Bootcamp Magicmouse drivers for Windows enable all the finger swiping features of the mouse? If not, exactly what is enabled? Thanks in advance