Failed to refresh an af:query with dynamic query

Hi guys, I'm on JDev 11.1.1.7.0 and have a usecase where I use a valueChangeListener on a selectOneChoice to dynamically set a pageFlowScope on the search box in the pageDef. The viewcriteria have different criteria and labels for the viewcriteriaitems in the resource group, so I will try to make the dynamic searchRegion. In a previous situation, I used https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf to use a dynamic iterator.

The problem I encounter is that the searchCountryCriteriaquery is not updated with the criteria for good. I watched Luc Bors Weblog: ADF 11 g: query component with the criteria of 'dynamic' view, but in this usecase, the user must click a button prior to loading of the search screen. In my case, I want the user to select the criteria through the selectOneChoice so on the page. I tried to see if I could refreshing the searchRegion and the related queryPanel.

pageDef code:

< searchRegion criteria = "#{pageFlowscope. . QueryOperationBean. searchCriteriaName} »

Customizer = "Oracle.jbo.uicli.Binding.JUSearchBindingCustomizer"

Binds = "searchCountriesIterator."

ID ="searchCountryCriteriaapplication" / > "

code selectOneChoice:

< af:selectOneChoice id = "soc1' autoSubmit = 'true '.

valueChangeListener = "#{pageFlowScope.QueryOperationBean.countryValueChangeListener} '"

unselectedLabel = "ANY" >

< af:selectItem label = "ANY" value = "ANY" id = "si1" / >

< af:selectItem label = 'CHINA' value = 'CALOSHA"id ="si2"/ >

< af:selectItem label = 'USA' value = "DLSE" id = "si3" / >

< / af:selectOneChoice >

Excerpt from bean Code for valueChangeListener:

{} public void countryValueChangeListener(ValueChangeEvent valueChangeEvent)

If (valueChangeEvent.getNewValue () .equals ("ANY")) {}

searchDataBindName = "SearchANY";

searchCriteriaName = "SearchCountryANY";

} ElseIf (valueChangeEvent.getNewValue () .equals ("USA")) {}

searchDataBindName = "SearchUSA";

searchCriteriaName = "SearchCountryUSA";

} ElseIf (valueChangeEvent.getNewValue () .equals ("CHINA")) {}

searchDataBindName = "SearchCHINA";

searchCriteriaName = "SearchCountryCHINA";

}

BindingContext bctx = BindingContext.getCurrent ();

BindingContainer links = bctx.getCurrentBindingsEntry ();

DCBindingContainer iter = bindings.get (DCBindingContainer) ("searchCountryCriteriarequest");

ITER. Refresh();

QueryModel qm = queryPanel.getModel ();

QueryDescriptor qd = queryPanel.getValue ();

QM. Reset (QD);

FacesContext fc = FacesContext.getCurrentInstance ();

queryPanel.refresh (CF);

}

AF code: query:

< af:query id = "qryId" headerText = "Search" disclosed = 'true '.

value = "#{bindings. . "{searchCountryCriteria.queryDescriptorrequest}.

model = ' #{bindings. . "{searchCountryCriteria.queryModelrequest}.

queryListener = ' #{bindings. . "{searchCountryCriteria.processQueryrequest}.

queryOperationListener = ' #{bindings. . "{searchCountryCriteria.processQueryOperationrequest}.

"resultComponentId =": pc1 ' lines argument maxColumns = "3" = "4".

displayMode = "compact" saveQueryMode = "hidden".

Binding = "#{pageFlowScope.QueryOperationBean.queryPanel} '"

"partialTriggers =": soc1 '/ >

Thank you!

Terence Pan

I was able to use the RichQuery link in the bean to set the setCurrentDescriptor of the QueryModel method to get the desired effect.

Tags: Java

Similar Questions

  • refresh the report with dynamic action title

    Hi all

    I have a report that is updated with dynamic action. When the update is done, first the value of two hidden variables are defined (P2_ID and P2_NAME) and are subject (using a dynamic action type "pl/sql", with the code "null"; and items to submit page: P2_ID, P2_NAME).

    In the report query, I use: P2_ID in the where clause. Everything works like a charm! The only thing that doen't work, is the title of the region: which is defined as "properties of & P2_NAME.", but the title is not updated when the report is refreshed.

    Is there a solution for this? I hope I am clear enough.

    See Re: dynamic action - update

    If you are right; the native just Refresh action updates the content of the report, it does not perform & POINT. substitutions throughout the region.

    What you could do is use a RANGE named as the title as

    &P2_NAME.
    

    and add a REAL action to your dynamic Action to set the title using Javascript to run code

    $s('my_title',$v('P2_NAME'));
    

    I hope this helps.

  • Procedure with dynamic query

    I am creating a procedure with dynamic select statement for a table. I have a sample of my procedure below.


    CREATE or REPLACE my_procedure
    (
    col1 in numbers
    col2 IN varchar2,
    cursorOut ON SYS_REFCURSOR
    ) IS

    filter varchar2: = ";
    Ask varchar2: = ";

    BEGIN

    IF col1 IS NOT NULL, THEN
    Filter IF & lt; & gt; "THEN filter: filter = | "AND." END IF;
    filter: filter = | 'a.COL1 =' | To_char (col1);
    END IF;

    IF col2 IS NOT NULL, THEN
    Filter IF & lt; & gt; "THEN filter: filter = | "AND." END IF;
    filter: filter = | ' a.COL2 AS "' | col2. '%''';
    END IF;

    query: = ' SELECT * FROM (SELECT a.*, ROW_NUMBER() over (ORDER BY a.col1) FROM myTable a rNum ';)

    Filter IF & lt; & gt; "THEN
    query: query = | 'WHERE ' | filter;
    END IF;

    query: query = | RNum ') TableInfo WHERE BETWEEN 0 AND 100';

    OPEN query cursorOut;

    END my_procedure;





    The problem I have is oracle does not correctly handle the criteria <>FI.

    For example, if I go = 55 col1 and col2 = 'a', the filter must be variable: a.COL1 = 55 AND a.COL2 LIKE 'a % '.
    But when I run the procedure, the result is: a.COL1 = 55 a.COL2 LIKE 'a % '.

    Same thing with the addition of variable filter to a part of the query.

    It's neither work well with & lt; & gt;. Can someone help me please how I can do this job correctly.

    Thanks in advance.


    EDIT: Try to do less of course that - more signs to designate is not equal to renders correctly.

    Published by: user1110823 on November 17, 2009 13:33

    Try with IS NOT NULL

    CREATE OR REPLACE my_procedure
    (
    col1 IN number
    , col2 IN varchar2
    , cursorOut OUT SYS_REFCURSOR
    ) IS
    
    filter varchar2(2000);
    query varchar2(2000);
    
    BEGIN
    
    IF col1 IS NOT NULL THEN
    IF filter IS NOT NULL THEN filter := filter || ' AND '; END IF;
    filter := filter || ' a.COL1 = ' || TO_CHAR(col1);
    END IF;
    
    IF col2 IS NOT NULL THEN
    IF filter IS NOT NULL THEN filter := filter || ' AND '; END IF;
    filter := filter || ' a.COL2 LIKE ''' || col2 || '%''';
    END IF;
    ..
    
  • Materialized with dynamic input possible view?

    Hello

    We have some end users have a very complex query of SQL reports (~ 2500 lines) they came with.  We are trying to tune and to create additional indexes as needed.  He has made more than one aggregation of xml and the chain in select statements.  in any case while I'm looking for other methods deal with the problem regardless of a potentially inefficient SQL query.

    In my opinion, they said that the query taking ~ 6000 sec to finish and basically http sessions expire of their web application after 4000 seconds of inactivity.  They have a few dynamic user input from the web page which is fed in the request for multiple WHERE clauses.  So I think we want to have this query that is run in offline mode (after the user input is collected) as well as the results stored in a table, then the wep app can do a simple select query to retrieve data from the table of results later.

    Is there a way to create a materialized view and replace user with some variables bind input and update the values of the variables bind with the participation of the user whenever they want the data, and then refresh the materialized view?  Or if there is a better mechanism for Oracle to run asynchronously this query offline with dynamic input and then store the results in a table?  My problem is that I don't know if they can call a sp and feed the bind values as parameters, but maybe I need to force them to.  I really don't want to process SQL statements dynamic that their request is so great andt hey asked me on GTT, but I was under the impression that the data is lost after each session and probably wouldn't really solve anything.  Thoughts?


    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    Web pages should return something in<5s or="" the="" end-user="" will="" hit="" the="" refresh="" button="" again="" and="" again="" and="" again="" and="">

    Do something like this:

    • store the query to run the sql in a table with the values for the variables bind (parent table)
    • run the SQL in the background via DBMS_SCHEDULER
    • store the results in a partitioned table. (child table) (I assume a large amount of data)
      • for example, use a partition of range interval by sequence ID 1. of the parent
    • update the parent with the status table "Hey, I'm made.
    • Maybe the applicant send an email.
    • Web page queries only the parent table.
    • a scheduled task removes the no-more-required data through DROP PARTITION.

    MK

  • VPN IPSEC ASA with counterpart with dynamic IP and certificates

    Hello!

    Someone please give me config the work of the ASA for ASA Site to Site IPSEC VPN with counterpart with dynamic IP and authentication certificates.

    He works with PSK authentication. But the connection landed at DefaultRAGroup instead of DefaultL2LGroup with certificate

    authentication.

    Should what special config I ask a DefaultRAGroup to activate the connection?

    Thank you!

    The ASA uses parts of the client cert DN to perform a tunnel-group  lookup to place the user in a group.  When "peer-id-validate req" is  defined the ASA also tries to compare the IKE ID (cert DN) with the  actual cert DN (also received in IKE negotiation), if the comparison  fails the connection fails. know you could set "peer-id-validate cert"  for the time being and the ASA will try to compare the values but allow  the connection if it cannot. 

    In general I would suggest using option "cert."

    With nocheck, we are simply not strict on IKE ID matchin the certificate, which is normally not a problem of security :-)

  • An unknown error has occurred during playback of the video file. failed to connect to the server of dynamic links

    I recently bought a drone DJI Phantom 3 kind have been treatment of videos more than usual and not have not had any problems. I use Lightroom for cataloging movies and I use the first to change.

    Since yesterday, I was not able to import any movie that I get the following error

    an unknown error has occurred during playback of the video file. failed to connect to the server of dynamic links

    2015-10-17_23-47-56.jpg

    Initially, I thought that it was due to a spectacular crash of drone (Physics isn't SHE!) who corrupted the file that was being logged, m ais I can now no longer import any movie to Lightroom.


    I tried the following

    1. a different memory with a new registration card

    2 removing and re - import an old movie

    3. to remove and re-import and old movie created by another camera

    4. to remove Lightroom and rolling back to the previous version of LR CC (CC 2015 [1014445])-had the advantage of getting rid of the annoying new import dialog screen. -

    5. upgrade to El Capitan to see if maybe OSX update may help.


    None of them had no effect, can anyone help?






    Hello

    You're welcome ShawWellPete, I thank you for everything.

    Yes, this person is the windows user, but it was the same question that could have been resolved by quicktime 7. (pending confirmation)

    Try to disable the start-up services and restart the mac and then try: take control of start-up and connection elements. Macworld

    There could be some service startup that is in conflict.

    Concerning

    Jitendra

  • Failed to parse the SQL query by user

    Hi all

    in my application, I have a piece of text with a button "submit". In this article, I type a name and a report after the element region show me the result (s). This works for all my users (> 2000) perfectly, but that users become an error in the area of the report:

    Failed to parse the SQL query:
    ORA-01403: no data found

    We try this with the same searchstring on the same computer/browser. If I connected the result is ok, if the logged on user, the error message appears. If I try this on the user's computer with me connected, ok result. If the user try this on another pc, error results.

    I have a production and a developer workspace. In the developer workspace the user can try this perfectly without errors. That in the space of productive work, clear the error.

    The SQL-Select in the ist verry simple reprirt:

    Select id
    name
    raum
    table
    where instr (upper (name), upper (:P60_SEARCH)) > 0

    However, all users can use this search box with report perfectly, only this one user has the error. There is no restrictions on this point or a State.

    Can someone help me?

    Hi Carsten,

    I don't think that there is a way to do it.

    Could you please mark the correct and useful answers in this thread? Otherwise I'll never get near Andy ;) :)

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • Tables created in a stored procedure cannot be used with dynamic SQL? The impact?

    There is a thread on the forum which explains how to create tables within a stored procedure (How to create a table in a stored procedure , however, it does create a table as such, but not how to use it (insert, select, update, etc.) the table in the stored procedure.) Looking around and in the light of the tests, it seems that you need to use dynamic SQL statements to execute ddl in a stored procedure in Oracle DB. In addition, it also seems that you cannot use dynamic SQL statements for reuse (insert, select, update, etc.) the table that was created in the stored procedure? Is this really the case?

    If this is the case, I am afraid that if tables cannot be 'created and used"in a stored procedure using the dynamic SQL, as is the case with most of the servers of DB dynamic SQL is not a part of the implementation plan and, therefore, is quite expensive (slow). This is the case with Oracle, and if yes what is the performance impact? (Apparently, with Informix, yield loss is about 3 - 4 times, MS SQL - 4 - 5 times and so on).

    In summary, tables created within a stored procedure cannot be 'used' with dynamic SQL, and if so, what is the impact of performance as such?

    Thank you and best regards,
    Amedeo.

    Published by: AGF on March 17, 2009 10:51

    AGF says:
    Hi, Frank.

    Thank you for your response. I understand that the dynamic SQL is required in this context.

    Unfortunately, I am yet to discover "that seeks to" using temporary tables inside stored procedures. I'm helping a migration from MySQL to Oracle DB, and this was one of the dilemmas encountered. I'll post what is the attempt, when more.

    In Oracle, we use [global temporary Tables | http://www.psoug.org/reference/OLD/gtt.html?PHPSESSID=67b3adaeaf970906c5e037b23ed380c2] aka TWG these tables need only be created once everything like a normal table, but they act differently when they are used. The data inserted in TWG will be visible at the session that inserted data, allowing you to use the table for their own temporary needs while not collide with them of all sessions. The data of the TWG will be automatically deleted (if not deleted programmatically) when a) a commit is issued or b) the session ends according to the parameter that is used during the creation of the TWG. There is no real need in Oracle to create tables dynamically in code.

    I noticed that many people say that the "Creation of the tables within a stored procedure" is not a good idea, but nobody seems necessarily explain why? Think you could elaborate a little bit? Would be appreciated.

    The main reason is that when you come to compile PL/SQL code on the database, all explicit references to tables in the code must correspond to an existing table, otherwise a djab error will occur. This is necessary so that Oracle can validate the columns that are referenced, the data types of those columns etc.. These compilation controls are an important element to ensure that the compiled code is as error free as possible (there is no accounting for the logic of programmers though ;)).

    If you start to create tables dynamically in your PL/SQL code, so any time you want to reference this table you must ensure that you write your SQL queries dynamically too. Once you start doing this, then Oracle will not be able to validate your SQL syntax, check the types of data or SQL logic. This makes your code more difficult to write and harder to debug, because inevitably it contains errors. It also means that for example if you want to write a simple query to get that one out in a variable value (which would take a single line of SQL with static tables), you end up writing a dynamic slider all for her. Very heavy and very messy. You also get the situation in which, if you create tables dynamically in the code, you are also likely to drop tables dynamically in code. If it is a fixed table name, then in an environment multi-user, you get in a mess well when different user sessions are trying to determine if the table exists already or is the last one to use so they can drop etc. What headache! If you create tables with table names, then variable Dynamics not only make you a lot end up creating (and falling) of objects on the database, which can cause an overload on the update of the data dictionary, but how can ensure you that you clean the tables, if your code has an exception any. Indeed, you'll find yourself with redundant tables lying around on your database, may contain sensitive data that should be removed.

    With the TWG, you have none of these issues.

    Also, what is the impact on the performance of the dynamic SQL statements in Oracle? I read some contrasting opinions, some indicating that it is not a lot of difference between static SQL and SQL dynamic in more recent versions of Oracle DB (Re: why dynamic sql is slower than static sql is this true?)

    When the query runs on the database, there will be no difference in performance because it is just a request for enforcement in the SQL engine. Performance problems may occur if your dynamic query is not binding variable in the query correctly (because this would cause difficult analysis of the query rather than sweet), and also the extra time, to dynamically write the query running.

    Another risk of dynamic query is SQL injection which may result in a security risk on the database.

    Good programming will have little need for the tables of dynamically created dynamically or SQL.

  • Calendar failed to refresh events in the calendar "calendar".

    My exchange calendar Office 365 always worked but somehow, an invitation he has screwed up and now it is showing

    Calendar failed to refresh events in the calendar "calendar".

    There was an error trying to send your changes to the exchange server.

    You can have the same problem like this:

    Apple and Microsoft Exchange calendar

  • Everytime I open a new window or refresh a getting started with firefox page opens with her. So, whenever I go to my homepage for example getting started with firefox opens along the coast in a separate tab.

    Everytime I open a new window or refresh a getting started with firefox page opens with her. So, whenever I go to my homepage for example getting started with firefox opens along the coast in a separate tab.

    This has happened

    Each time Firefox opened

    == I have this computer.

    You are welcome

  • any ideas? Installation failure: Windows failed to install the following update with error 0 x 80070663: update of security for Microsoft Office System 2007 (KB972581). That's what I get away

    Installation failure: Windows failed to install the following update with error 0 x 80070663: update of security for Microsoft Office System 2007 (KB972581).


    any ideas?

    Suggestion: Try to do a repair of Office 2007 installation, then try the updates (after a reboot).

    How to install and repair 2007 Office features
    http://support.Microsoft.com/kb/924611 TaurArian [MVP] 2005-2010 - Update Services

  • kb2633171 a security update wont install windows vista and keeps on saying failed in the history of updates with the error code 80070020

    Original title: kb2633171 security update will not install windows vista

    Hello

    as noted above, the kb2633171 of security update will not install on my computer used windows vista laptop. I had mcafee installed since the first day (it came with the pc). He continues saying failed in the history of updates with the error code 80070020. When I restart the pc, it says that it cannot configure the update and it is up to the old settings.

    I ran the fix it and aggressive to solve this problem, no luck :-(

    any help muchly appreciated.
    Thank you!

    Chiara

    Hi Chiara,

    Try following the steps in the following article.

    You receive error 0 x 80070020 when you use the Windows Update Web site or the Microsoft Update Web site to install the updates

    http://support.Microsoft.com/kb/883825

     

    Let us know if it helps.

  • L2l between an ASA 5505 and WatchGuard XTM330 with dynamic IP

    Hi guys,.

    I looked for a solution on this one but can't find inappropriate, most of the discussions were old and with dead links to the solution.

    We have an ASA 5505 with static IP address on the outside and a customer who have a WatchGuard XTM330 with dynamic IP address to the outside.

    Is it possible to have an L2L VPN between our ASA and the WatchGuard when he has a dynamic IP?

    I have no experience on the series of WatchGuard,

    so, I am very grateful for any answer!

    Thanks in advance and have a nice day

    BR

    Robin

    Hi Robin,

    Here are the links you can make reference when configuring static to the dynamic VPN tunnel: -.
    http://www.Cisco.com/c/en/us/support/docs/security/ASA-5500-x-series-next-generation-firewalls/112075-dynamic-IPSec-ASA-router-CCP.html

    This one is with Pix on the remote side, but the configuration will remain the same on the local side: -.
    http://www.WatchGuard.com/docs/4-6-Firebox-CiscoPix.PDF

    Kind regards
    Dinesh Moudgil

    PS Please rate helpful messages.

  • VRF support IPsec with dynamic VTI

    Hello

    I am Configuring IPSEC compatible with dynamic VTI e VRF. I followed the guidelines of the document

    http://www.Cisco.com/en/us/docs/iOS-XML/iOS/sec_conn_vpnips/configuration/15-2mt/sec-IPSec-virt-tunnl.html#GUID-C0A165BF-5866-4B13-BD73-0892B7E65488

    According to the example: "taking VRF support IPsec with a dynamic VTI when VRF is configured under year ISAKMP profile" I should be able to configure the features of the vrf and virtual-model under the same crypto isakmp policy.

    Unfortunalety, if I try to do, I get the following message

    R4 (conf-isa-prof) #virtual - model 1

    % VRF already set to isakmp profile. Unauthorized virtual model

    Is anyody knows why I'm not able to follow the configuration of this example?

    Here's my profile setup and configuration of the virtual model

    Crypto isakmp profile

    VRF HAS

    A Keyring

    function identity address 192.168.0.2 255.255.255.255

    type of interface virtual-Template1 tunnel

    Unnumbered IP Loopback2

    ipv4 ipsec tunnel mode

    Profile of tunnel ipsec protection has

    I do the test on the router of runningon 3725 XW3 IOS 12.4 (11).

    Thank you in advance for advice.

    Concerning

    Lukas

    Lukas,

    I don't know, but probably this was not yet supported 12.4.

    The document you're viewing is for IOS 15.2. I don't know by heart if your 3715 can run 15.2, if not give 15.1 (4) Mx to try?

    HTH

    Herbert

  • ASA - s2s vpn with dynamic ip - Dungeon tunnel upward

    Hi guys,.

    We want to set up a vpn between our central asa5520, and a new branch office asa5505 with dynamic public ip address.

    This type of configuration is supported, but the tunnel can only be initiated from the asa distance (the asa central do not know how to reach the asa remote).

    prove that on this vpn also transit traffic voice, we must always maintain the tunnel.

    A solution would be to have a kind of continuous ping from the remote office to the central office... is more 'professional' wat to reach our goal?

    Thank you.

    Try, 'management-access to the inside' of the asa and ping

Maybe you are looking for

  • HP envy 5530: E print app on my phone says this printer does not exist.

    I am trying to add my printer to my application on my phone and I get the error "this printer does not exist or you do not have access to him." I went on HP Connect site and it shows that my printer is online and ready to use.  I checked to make sure

  • Malicious software removal tool and system disk errors

    I ran a full Scan with the MRT tool last night and noticed that there are a bunch of disk errors in the observer of events during the same time period. Is there a reason that this may be the result of the analysis? Running the disk errors and tool MR

  • All the icons and screen menus desapeared start-up; Windows XP.

    After that I had "repaired" my PC with "AntiVir" asked me if I want all the files to repair damaged. I clicked 'Yes', the PC has restarted and I was amazed to see all the icons and the menu start disappeared from the screen. So, now I could open only

  • To display the disk that contains the price list

    I'm working at home and am really familiar with a lot on the computer. I just burned a disc with a price on this list and want to check to make sure that it is correct. I can't open it to see and print

  • is this useful?

    Reference Dell dimension e520 Windows xp home sp2 Intel core2 6300 1.86 ghz 1024 MB of ram IM currently paid for and fully updated suite mcafee internet security on my pc. I recently had a free trial 14 days counterspy v2. the free trial version is i