Bug : Customizing af:query component
Hi,
I am using jdev 11.1.1.6.0 version. I want to know how i can customize the error messages displayed by an af:query component. Example: suppose i am using advanced search on a field called productId. The search criteria used is 'Between' and if i mention only one value in the text field and the other text field is empty. Error message pops up saying that Attribute ProductId is required. I want to customize this message with my own error message. How can i achieve this ?
Thanks in advance.
check [url http://docs.oracle.com/cd/E12839_01/web.1111/b31974/bcadvgen.htm#BABEFGCI]Customizing Business Components Error Messages
Similar Messages
-
Customizing af:query component?
Hello friends,
Is it possible to customize af:query component. For example i need to move "search", "reset","save" buttons to the toolbar of the component and change the background of the toolbar. Also i have a request to hide that "+/-" thing which make able user to collapse or disclose af:query form.
Is it possible or only way to achieve this is to create my own search mechanism - what i can imagine could take a while?
thanks in advanceHi,
as far as color coding goes, you can use skinning for this. Look for "af:query component" in http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e15862/toc.htm
This should also allow you to hide the +/- icons. However, it does not allow you to move buttons
Frank -
Add custom field to af:query component?
Anyone had any experience overriding af:query copmonent? I need to add my custom search field (to query component), which would have a search icon next to it, and on click, a popup widow would open containing my custom task flow where I could select a record with certain value and on return that custom field (in query component) would get populated with selected value. I hope I'm being clear. Please point me to any useful information. Is that even possible? I use JDeveloper 11.1.2.3.4.0 Regards, Marko
Hi,
af:query is a component that comes as is. Its not designed for customization in that you can add your own fields. If you have a requirement for this then
1. expose a method on the VO Impl or AM Impl that expect arguments (your query parameters)
2. Use the arguments to populate bind variables used by a ViewCriteria
3. Apply the View Criteria to the View Object
4. Execte the View Object
5. Drag and drop the method from the DC panel as a parameter form
6. Ensure the result table PartialTrigger property is pointing to the button ID of the parameter form
7. Change whatever UI component you want to change in the parameter form
This gets you going ...
Frank -
Customizing Layout of Query Component
Can i customize layout of fields in query component? I searched it but could not find anything about it either in documentation or in books?
No i want to have same functionality as we can in forms like visually grouping certain fields, adding headings on groups and like that.
I have searched through but nothing find much useful. It seems either i have to build my own query component or extend query component. If any body knows related material / book, kindly tell me. -
'is null' not working in dynamic sql and SQl Query component (OBPM 10gr3)
I'm using a SQL Query component with sql like this
'select col1, col2 from table where col3 is null'
for some reason this does not work.
Has anybody faced this issue? Is there a known bug with handling nulls
Thanksplz post which DB version u r working with
dont use paramters in Procedure with : sign
Write simply the name of the Paramters like p_userid etc etc
this might help u as well
http://baigsorcl.blogspot.com/2010/02/get-rid-of-addtional-quotes-with-quote.html -
Af:query component added field not removed when remove icon is clicked
I have an af:query component on a popup dialog. In advanced mode when I add a field, the new field appears in the searchRegion followed by a red X remove icon. If I subsequently click that remove icon, the query refreshes, the red icon is gone, but the newly added field still remains. The query component is linked to a standard VO query executable in the bindings. There is no custom processing of the value, model, queryListener or the queryOperationListener. In all other respects the query component works fine. The only problem is a newly added field not being removed when the remove icon is clicked. Here's how the component is setup (an added wrinkle is that the query component is hosted in a Declarative Component, so that makes this code a little harder to decipher).
Does anyone know where I should start looking for this? Hopefully I don't have to implement my own queryOperationListener.
JDev version is Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
--- snippet from the page fragment ------
<af:popup id="frmsLstPU" contentDelivery="lazyUncached">
<af:dialog id="d1" type="ok"
styleClass="AFStretchWidth" resize="on"
stretchChildren="first" contentWidth="840"
contentHeight="480"
title="#{UnifiedResourceBundle['FORMSLIST.DIALOG.TITLE']}">
<idmkr_adf:Correspondence_Formslist_Query idmkr_query_model="#{bindings.FormVOFlatQueryCriteriaQuery}"
idmkr_table_binding="#{viewScope.FormsListBacking}"
idmkr_table_model="#{bindings.FormVOFlatQuery1}"
idmkr_bindings="#{bindings}"
idmkr_resourcebundle="#{preferences}"
idmkr_printStreamBean="#{viewScope.FormsList}"
id="cf1">
</idmkr_adf:Correspondence_Formslist_Query>
</af:dialog>
</af:popup>
-- snippet from the Correspondence_Formslist_Query declarative component ------
<af:query id="qryId1"
headerText="#{UnifiedResourceBundle['FORMSLIST.QUERY.SEARCH.TEXT']}"
disclosed="true"
value="#{attrs.idmkr_query_model.queryDescriptor}"
model="#{attrs.idmkr_query_model.queryModel}"
queryListener="#{attrs.idmkr_query_model.processQuery}"
queryOperationListener="#{attrs.idmkr_query_model.processQueryOperation}"
resultComponentId="::resId1" displayMode="default"
styleClass="AFStretchWidth"
rows="4" maxColumns="2"/>I have changed the contentDelivery from "lazyUncached" to "immediate" and the same problem occurs. Thank your for your suggestion.
-
Timezone effects on Date and Timestamp fields in af:query component
Hello,
I'm working on an ADF application where time zone is configured as follows:
* Dynamic View Layer time zone is configured in trinidad-config.xml file and bound to a session scoped value:
<trinidad-config>
<skin-family>fusionFx</skin-family>
<time-zone>#{sessionScope.tz}</time-zone>
</trinidad-config>* ADF BC time zone is configured in adf-config.xml file and bound to View Layer time zone:
<adf-config>
<user-time-zone-config xmlns="http://xmlns.oracle.com/adf/usertimezone/config">
<user-timezone expression="#{adfFacesContext.timeZone.ID}"/>
</user-time-zone-config>
</adf-config>The problem here is that Dates and Timestamp values work as expected all over the application except for the af:query component. When displayed as af:inputDate in af:form, Dates and Timestamp values are NOT getting converted to the time zone (TZ) configured in trinidad-config.xml file, whereas TimestampTz and TimestampLtz are. However, when displayed in af:query component, Dates and Timestamp values are automatically converted to View Layer TZ after a search has been performed.
For example, say View Layer TZ = US/Pacific and we enter 01/jun/2011 as a search criteria of type Date and then click on the Search button. The displayed value automatically changes to 25/nov/2011, that is, it gets converted to the WLS JVM time zone, which is set to Europe/London.
Is conversion of Date and Timestamps in af:query component the expected behaviour or could this be a bug?
Is there any way to avoid this conversion?
Thanks in advance
Version:
ADF Business Components 11.1.1.59.23
Java(TM) Platform 1.6.0_21
Oracle IDE 11.1.1.4.37.59.23
PMD JDeveloper Extension 4.2.5.3.0
Repost on 26-nov-2011 9:29
Repost on 28-nov-2011 15:10
Edited by: Barbara Gelabert on 26-nov-2011 9:29
Edited by: Barbara Gelabert on 28-nov-2011 15:10Hi,
Thanks for your reply. This certainly seems promising. However, I am getting a connection error now.
The following...
jar_loaded = require 'ojdbc14.jar'
puts "Oracle jar loaded? #{jar_loaded}"
puts "Starting active record"
require 'rubygems'
gem 'activerecord'
gem 'activerecord-oracle_enhanced-adapter'
require 'activerecord'
puts "Connecting to MXGN"
ActiveRecord::Base.establish_connection(
:adapter => 'oracle_enhanced',
:host => 'THEHOST',
:port => '1550',
:database => 'THEDB',
:username => 'THEUSER',
:password => 'THEPASSWORD'
... produces
Oracle jar loaded? true
Starting active record
Connecting to MXGN
ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
C:/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76:in `establish_connection': Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (LoadError) (RuntimeError)
from H:\sandbox\DBPlay\lib\main_enhanced.rb:12
I'm confused. Am I missing the driver, or have I failed to setup the enhanced Oracle adapter?
I have tried moving the jar to $JRUBY_HOME/lib too, but the result was the same.
All help would be greatly appreciated.
Many Thanks
Adrian -
Aligning fields horizontally in af:query component
Hi friends,
i am developing a search region using the named criteria of my VO by dragging it. This created an af:query component in the search region. However the fields are displayed in rows in the search region. I want to align these fields so that all the fields are displayed in a single row. also how can I set the length of the fields.
Any ideas or hints how to do this.
Thanks in advance
Edited by: user9197772 on May 20, 2013 3:58 AMHi,
Check
http://www.jobinesh.com/2011/01/customizing-component-display-by.html
http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12419/tagdoc/af_query.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 -
Create new / add Custom Node in Component Pallete - Workflow Editor
is there anyway to Create new / add Custom Node in Component Pallete - Workflow Editor in SQL Developer - Oracle Data Miner?
Now i'm in progress create data cleansing engine in database package, and I have an idea to create new node in workflow editor, the node will call my procedure data cleansing.
Anybody help?Hi,
Not currently.
We are working on a SQL Query node that would process data on connected input nodes and allow the user to create any sql query specification they would like.
So as long as your implementation is compatible with being included as part of a sql query, then you may be able to take advantage of this new node.
Since you describe your implementation as a data cleansing implementation, I could see it taking in what ever input is provided in the flow, and then returning a cleansed result set.
Thanks, Mark -
af:query component - need help
hi
I am implemeting a search page wiht <af:query> component with view criteria. (to be specific drag and drop viewCriteria as query panel with table)
what i observe is that when I do "Add fields" at runtime the compnent moves up and up till it hides the panelHeader and the other fields with no access to it.
After i refresh the screen the component comes back to its normal positon but pushes the table component below it down till its barely visible.
This component seems to be very unstable.
Let me know if there is any workaround without making the screen unstable.Hi,
You can find some related info here..
Can I achive valueChangeListener in af:query?
and
http://jobinesh.blogspot.com/2011/03/retrieving-viewcriteria-from-custom.html
Thanks,
TK -
How can I use the Rownum/Customized SQL query in a Mapping?
Hi,
* I need to use a Rownum for populating one of the target field? How to create a mapping with Rownum?
* How can I use an Dual table in OWB mapping?
* Can I write Customized SQL query in OWB? How can I achieve this in a Mapping?
Thanks in Advance
KishanHi Niels,
As I'm sure you know, the conundrum is that Reports doesn't know how many total pages there will be in the report until it is all done formatting, which is too late for your needs. So, one classical solution to this problem is to run the report twice, storing the total number of pages in the database using a format trigger, and throwing away the output from the first run when you don't know the total number of pages.
Alternatively, you could define a report layout so that the number of pages in the output is completely predictable based upon, say, the number of rows in the main query. E.g., set a limit of one, two, ... rows per page, and then you'll know how many pages there will be simply because you can count the rows in a separate query.
Hope this helps...
regards,
Stewart -
Error while creating query component
Hi,
I working in a production environment where I have 2 application servers, 2 query servers and 2 crawling servers. I have created the search service application on the application server with the default topology then I modified the topology to add the crawl
components on the crawl servers successfully.
Now I have an issue creating new or modifying the current query components. Every time i try the create new query component I receive the below issue. The query server is having the services "SharePoint Server Search" and "Search Query and
Site Settings Service" running and other services are stopped.
So, does anyone knows why this issue happens and how to fix it
Errors were encountered during the configuration of the Search Service Application. Microsoft.Office.Server.Search.Administration.SearchConfigWizard+SearchConfigWizardException: Topology provisioning failed due to an error.Topology activation was aborted
because of System.ArgumentException: File to copy \\RUH-NDC-KBP-A01\b941e2c4-c227-40d6-9f40-20d25e59b39e-query-0\b941e2c4-c227-40d6-9f40-20d25e59b39e-query-0\Projects\AnchorProject\Indexer\CiFiles\02030001.bsd does not exist on RUH-NDC-KBP-Q01. at Microsoft.Office.Server.Search.Administration.CopyFilesJob.Initialize()
at Microsoft.Office.Server.Search.Administration.CopyFilesJob..ctor(SPService owningService, SPServer serverToRunOn, String name, Guid searchApplicationId, String[] sourcePaths, String[] destinationPaths) at Microsoft.Office.Server.Search.Administration.SearchApi.RequestFileCopy(String
fileCopyName, String serverNameToRunOn, Guid searchAppId, String[] sourcePaths, String[] destinationPaths) at Microsoft.Office.Server.Search.Administration.QueryComponent.RequestRepartitionIndexesFiles(QueryComponent component) at Microsoft.Office.Server.Search.Administration.QueryComponent.CopyRepartitionIndexes(QueryComponent
component) at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage(). To retry the activation, run the cmdlet Set-SPEnterpriseSearchQueryTopology -Active. If the error persists, restart the activation by calling the CancelActivate()
method on the query topology object, and then calling Set-SPEnterpriseSearchQueryTopology -Active. at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.WaitForTopologyTimerJobToFinish() at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.UpdateSearchApp()
at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.ProvisionSearchServiceApplication() at Microsoft.Office.Server.Search.Administration.SearchConfigurationJobDefinition.ExecuteTimerJob()
2/13/2014 5:04:35 PM
Regards,
Ehab
EhabAre you creating the new topology using Central Administration or PowerShell?
It looks like there is an issue synchronizing the search configuration files in the share.
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights -
Setting default value read from user session, for an LOV in Query component
I want to set the default value of a field in VO that participates in a named view criteria and thereby in Query component. That field is configured with an LOV by mean of a view accessor. The values are Y and N and the corresponding display strings obtained from view accessor are true and false respectively.
I am able to set the default value by setting the value of the criteria item corresponding to that field in view criteria. I am setting the value as either Y or N and I am able to corresponding display string as per the view accessor, on the query component when it is rendered.
I want to read the defauilt value from the ADF BC user session and set it as default value. I tried setting the values as "adf.userSession.userData.usageFlag". Iam ensuring that the attribute usageFlag is set before the view activity that has the query component is invoked. But this is ending up showing no default value in the Query component when rendered.
Can any one let me know how to go about with this?I made up your table since you didn't provide some example, but I'm sure this will give you the picture:
SQL> var run_type varchar2(1)
SQL> exec :run_type := 'A'
PL/SQL procedure successfully completed.
SQL> create table my_cycles as select level cycle_id
2 , level cycle_status
3 from dual connect by level <= 5;
Table created.
SQL> select cycle_id
2 from my_cycles
3 where case
4 when :run_type = 'D' and cycle_status = 1 then 1
5 when :run_type != 'D' and cycle_status in ( 2, 3 ) then 1
6 end = 1;
CYCLE_ID
2
3
2 rows selected.
SQL> exec :run_type := 'D';
PL/SQL procedure successfully completed.
SQL> /
CYCLE_ID
1
1 row selected.
SQL> -
Issue in Binding Custom controller to Component Controller
Dear All,
I have enhanced a standard component ERP_H.
I created a custom controller with context nodes BTSTATUS, BTSTATUSH
I enhanced the component controller with context node BTSTATUS, BTSTATUSH
Now when i try to bind the custom controller to component controller using this code in the context class of my custom controller
bind to component controller
owner->do_context_node_binding(
iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_COMPONENT
iv_target_node_name = 'BTSTATUS' " component controller context node
iv_node_2_bind = BTStatus ).
its not working since this context node in component controller is not the standard one but the custom added one.
Am i missing something, or is there any way to bind customer context node in custom controller to customer context node in component controller.
regards,
pradeepHi pradeep,
Try the other way round go to the context class in the component controller and paste the following code in the
create_contextnode( context node = name of the node to be linked).
*owner->do_context_node_binding(
iv_controller_type = cl_bsp_wd_controller=>co_type_custom <-----linking from component to custom
iv_target_node_name = 'BUILHEADER' "target node: component controller node
iv_node_2_bind = BUILHEADER ). "source node: current node.
See if this works.
Thanks
Maybe you are looking for
-
Adobe Photoshop Lightroom 3 won't run with Windows 8. Is there a solution or update
I installed Windows 8 and now Photoshop Lightroom won't even boot up. I just get a message that there is a problem and shuts down the program.
-
so i know that i only have a one gig or ram in this mac min i but how come it seems to lag now.It never used to . Even when i go to ITUNES and go to "add to library" then choose my external hard drive it lieterally takes forever. I mean it doesnt rea
-
How would you make a server on Visual Studio?
I would like to make a database server on Visual Studio which can be accessed by other computers as well. I know how to make a basic local database but please can somebody help me with this. Thanks!
-
Help cascading linksys voip router to linksys voip router
Hello, I'm trying to connect a Linksys RT31P2 to my existing Linksys WRTP54G to be able to be able to use the VOIP phone connections on both units. I have set the ip address of the first router WRTP54G to 192.168.15.2 which is connected to the cable
-
I have been burning a 14 gig movie to I DVD along with a slide show that has about 20 slides from jpegs exported from Keynote. The first few times I burned it I noticed the contents of the DVD were about 3.8 gigs. Now its 1.9. I have made only a coup