Problem changing portlet state and mode programmatically

I am trying to change state/mode of a portlet programmatically in backing file.
My request is, when a portlet is changed to EDIT, I want it be maximized. Based on that, I put logic in handlePostbackData() like this,
if (PortletBackingContext.getWindowMode().
equalsIgnoreCase("EDIT")) {
// change to EDIT mode
PortletBackingContext.setupStateChangeEvent(
WindowCapabilities.MAXIMIZED.getName());
} else {
PortletBackingContext.setupStateChangeEvent(
WindowCapabilities.NORMAL.getName());
However, I found during handlePostbackData() phase, the mode I retrieved by PortletBackingContext.getWindowMode() was the one before the clicking.
Say for view mode, I click the EDIT button and I expect in the handlePostbackBack() phase, I could get "edit" returned by PortletBackingContext.getWindowMode(). But actually it returned "VIEW".
The mode keeps in the previous mode till it enters the preRender() phase. But as API, setStateChangeEvent() should be used in handlePostbackData() ONLY.
Any suggestions?

you should be able to do this through declerative IPC
of course you can do this via the IDE but you can also add it to the .portlet file. Something like this...
<netuix:handleEvent event="onEdit"
fromSelfInstanceOnly="true"
eventLabel="handleOnEditGeneric_el">
<netuix:changeWindowState newState="maximized"/>
</netuix:handleEvent>
Chris Jolley
Portal Architect

Similar Messages

  • Changing boolean state and read change

    Hello Everybody,
    sorry to bother you, but as a new user of Labview, I still have problems to program VI's. I try to do my best alone, but right now I have been in a dead end for a while... Thats why I come back to you.
    Here is my problem:
    - in A VI I made, I have a boolean , which command if data are recorded or not. When recording is on, the led enlights, when it is off the led is of.
    - Actually, I would like to link the recording action to something more complicated:, I would like the changing state of the boolean to enlights several leds in a specific order. 
    Thus, when the boolean change, this should change the state of the leds. 
    I managed to do so, when pressing the button in the boolean_count.VI, that has the result I would like to obtain.
    My problem is that, the change of state is not initiated only by a push button. It depends of several state (true or false), which order the recording or not.
    To simulate that, I have tried to do same as previously, but with 2 booleans, which have to be both true to initiate a change. I tried to do so in the file Try_out_boolean.VI 
    But iin this file, when I push my buttons, there is no change of state in the right part of my panel...
    I hope You can underrstand what I mean. If you have any suggestions, I will be glad to read them.
    Solved!
    Go to Solution.
    Attachments:
    Try_out_boolean.vi ‏15 KB
    boolean_count.vi ‏12 KB

    in the property node "1and2" of your Try_out_boolean.vi, you read the property "BindingLEDVisible".
    (as well as I downloaded) That makes no sense.
    -> click with the mouse on this property node an choose the property "Value" instead.
    Then your application should react as wanted.
    Thre may be other improvements possible, e.g. using event structures instead of continually polling -
    but that is another topic...
    i hope, this helps a little bit.

  • Changing portlet state

    Can I set and modify portlet state(minimized, maximized, invisible) in a pageflow action?

    Yes.. using the backing context
    //to maximize the portlet
    protected void maximize()
    PortletBackingContext context = PortletBackingContext.getPortletBackingContext(super.getRequest());
    context.setupStateChangeEvent(WindowCapabilities.MAXIMIZED.getName());
    }

  • Problem w/ Case Statement and Video Capture

    Hey!
    I've got a question about a topic which seems pretty trivial, but has been giving me quite the trouble for some time now. I was hoping that someone on this forum would be able to help me catch and fix my mistake.
    Basically what I'm trying to do is capture video from a camera, run some video analysis for a certain duration, and store the raw footage for that same duration in an avi file. I'm using IMAQdx and a Logitech C920 camera to gather video. When I run the program, I want there to be an output of the raw video on the front panel. When I then hit a button, I would like the camera to save a .avi file of the video for a set number of frames and concurrently run some analysis and display the results on another display on the front panel. The purpose of the raw footage in the .avi file is to be able to run the analysis again at a later date.
    I've attached both a screenshot and the .vi file to this post. When I run the current script, I'm confronted with one of two possible errors (not sure why they're different from time to time). The Video Acquisition Block either "Time Out"s or the Write to AVI block issues an incompatible image type error. The reason why I'm baffled by this is because when I take it out of the case statement and have it run with the rest of the program, the .avi file is generated accurately and stored.
    Any help would be greatly appreciated. Thanks!
    Attachments:
    Script Image.png ‏39 KB
    11_30_12 TrackVIEW.vi ‏271 KB

    Greetings, 
    Would the time out error happen every time you run the VI? In addition, do these errors have a code?
    I was able to replicate the issue and initially believe that it might be that we are simultaneously opening two sessions to the same camera. Could you simply take a finite number of images from the first acquisition and chain the second one via sequence structure? It would limit the viewer to only view the video on the other Image Display during saving the AVI, but it might be worthwhile looking into. 
    It might also be worthwhile to consider enquewing a certain number of images whenever the button is pressed, but that would require some more programming logic.
    Cordially;
    Simon P.
    National Instruments
    Applications Engineer

  • Problem with PIVOT statement and ORA-56901

    Hi,
    I am having a problem with PIVOT in Oracle.
    I have a view in an oracle 11g database
    that returns me data in the format:- (... indicates left out text)
    DefinitionID ... AttributeValue FieldID
    ============ ============== =======
    ... 3000 X30a9...
    ... JohnN X4674...
    I am then trying to use a PIVOT statement to hopefully give me data
    in the format
    COLUMN1 COLUMN2
    ======= =======
    JohnN 3000
    The PIVOT statement I am trying is
    SELECT X4674... AS Column1,
    X30A9... AS COLUMN2
    FROM (SELECT instanceid, definitionid, attributevalue, FIELDID
    FROM PI_ENTITY_INSTANCE_VIEW) up PIVOT (MAX(ATTRIBUTEVALUE)
    FOR FIELDID IN (X4674...,X30A9... ) )
    where definitionid = hextoraw('7353C67A56C74B5A8234CD16064399E8')
    I have used a very similar VIEW and PIVOT statement for sql server
    (with necessary changes for Oracle applied) and the
    data returns in SQL Server as expected.
    Unfortunately I am getting the Oracle error
    ORA-56901: non-constant expression is not allowed for pivot|unpivot values
    Is there anyway to get a PIVOT working on Oracle where I use the
    fieldid's like I do above or is there some other way to supply the vales to the
    IN clause to overcome this error?
    Thank you for any help you can provide
    John Nugent

    Hi, John,
    Welcome to the forum!
    X4674, X30A9 and os on are the literal values that you're looking for, right?
    In Oracle, string literals need to be enclosed in single-quotes, like this:
    FOR FIELDID IN ('X4674', 'X30A9') You might find it more convenient to assign column aliases in the PIVOT clause, like this:
    PIVOT   (     MAX (attributevalue)
         FOR     fieldid       IN ( 'X4674'     AS column1
                        , 'X30A9'     AS column2
         ) Remember that anything inside quotes is case-sensitive, so 'X30A9' is not equal to 'X30a9'. Use UPPER (or LOWER) to do case-insensitive string comparisons.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    If you can use commonly available tables (such as those in the scott or hr schemas) to show your problem, then you don't have to post any sample data; just the results and explanation.
    Always say which version of Oracle you're using. You did say you were using Oracle 11g, but there's no 11f or 11h, and sometimes the difference between, say 11.1 and 11.2 can be significant. Why not say exactly what you're using, e.g. 11.1.0.7.0?
    You'll get better answers faster if you always supply this information whenever you post a question.
    Edited by: Frank Kulash on Sep 22, 2011 2:09 PM
    Added allliterative alias alternative
    Edited by: Frank Kulash on Sep 22, 2011 4:04 PM

  • URGENT! Having problem with while statement and other syntax errors

    I am trying to teach myself JSP for a school project due very soon. But I keep receiving errors surrounding my while statement. The errors are:
    Syntax: ";" inserted to complete BlockStatements
    Syntax: "}" inserted to complete Block
    I have checked it over and over again, comparing against other examples found in this forum and against servlet examples and I can see no difference. This is my file for your information. It is supposed to list all the users in the user table. Is there a simpler way to do this?
    regards
    rach
    <%@ page language="java" import="java.sql.*, java.util.*"%>
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <%! String selected = null; %>
    <%
    try{
         // Connect to the database
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
         Connection con = DriverManager.getConnection("jdbc:odbc:dbtest");
    catch(ClassNotFoundException e) {
         System.out.println("Database driver could not be found.");
         System.out.println(e.toString());
         throw new UnavailableException(this, "Database driver class not found");
    try{
         //create SQL statement
         stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery("SELECT * from USER ORDER BY User_lastname, User_firstname");
    catch(SQLException e){
         System.out.println("Error connecting to the database.");
         System.out.println(e.toString());
         throw new UnavailableException(this, "Cannot connect to the database");
    %>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
         <td width="10">    </td>
         <td width="200" valign="top" align="center">
         <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr><td><form method="post" action="userupdatedelete.jsp" target="content" name="userlist">
                   <h2>Users</h2>
              </td>
              </tr>
              <tr>
                   <td width="10">    </td>
              </tr>
              <tr>
                   <td valign="top"><select size="15" name="rec">
                   <!-- if the resultset is not null -->
                   <% try {
                   //if (rs.next()) {
                        While (rs.next()){
                             //retrieve data from User table
                             String userid = rs.getString("User_ID");
                             String firstname = rs.getString("User_firstname");
                             String lastname = rs.getString("User_lastname");
                             out.println("<option value='userid'>lastname + ', ' + firstname</option>");
                             //<option value="<%=userid%>"><%=lastname + ", " + firstname%></option>
                   //else {
                   //     out.println("<option>    - No Users Entered - </option>");
                        //<option>    - No Users Entered - </option>
                   stmt.close();
                   con.close();
                   catch (SQLException ex){
                        System.err.print("SQL Exception :");
                        System.err.println(ex.getMessage());
                   %>               
                   </select>
                   </td>
              </tr>
              <tr>
                   <td align="center"><input type="submit" value="Update/Delete"></td>
              </tr></form>
              <tr>
                   <td><br></td>
              </tr>
              <tr>
                   <td align="center">
                   <form method="post" action="useraddform.jsp" name="addbuttonform">
                   <input type="submit" value="    Add New    " name="addnew">
              </tr></form>
              </table>
         </td>
         <td width="10">    </td>
    </tr>
    </table>
    </body>
    </html>

    There is a problem here with the "scope" of variables namely your variables "rs" and "stmt". Variables declared within a try block are available only within that try block. Also, the type for stmt is not even given.
    Change:
    try{
    //create SQL statement
    stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * from USER ORDER BY User_lastname, User_firstname");
    catch(SQLException e){
    System.out.println("Error connecting to the database.");
    System.out.println(e.toString());
    throw new UnavailableException(this, "Cannot connect to the database");
    }to:
    Statement stmt = null;
    ResultSet rs = null;
    try
        //create SQL statement
        stmt = con.createStatement();
        rs = stmt.executeQuery("SELECT * from USER ORDER BY User_lastname, User_firstname");
    catch(SQLException e)
        System.out.println("Error connecting to the database.");
        System.out.println(e.toString());
        throw new UnavailableException(this, "Cannot connect to the database");

  • How can I change Output Method and Mailbox# programmatically (without GUI)?

    We have several iR5075s and about 300 workplaces. For security reasons we only allow "Store" output method. So every user has access to some printers and for every printer they need to reconfigure printing preferences.
    For convenience we'd like to do the following automatically (via Group Policy or scripts):
    1) Change "Output Method" to "Store".
    2) Set the correct mailbox number.
    The problem is that the related settings seem to be stored in registry as a binary blob (HKCU\Printers\Connections\<printer name>\DevMode). I've been searching for a while but I couldn't find anything that would explain what's what in that blob.
    Any clues?
    Or maybe there's another way?
    P.S. I'm familiar with scripting, regular expressions, etc. Acquiring the necessary parameters (such as mailbox#) is not a problem at all. I only need to know where and what I should change (in registry or elsewhere).
    [Edit] Update: Actually it seems the settings are stored in HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Providers\Client Side Rendering Print Provider\<user sid>\Printers\Connections\,,<server name>,<printer name>\RemotePrinterCache. It's also a binary blob though.
    Eventually I'll reverse engineer it enough for my goals. I just don't understand why it must be so complicated...

    https://mega.co.nz/#!5QQWmaTI!cryW-pykueRNffdDYnj1OpxiHgG0mcAqLOh4Gmt2PJk
    But I'm not sure how useful you'll find it. I wrote it as a temporary solution (we're now migrating to UniFlow) and it's anything but universal. At best, I guess, you'll be able to salvage some of my code while writing your own.

  • Oracle 9i, Rel.2 - Problems with dynam statement and cursor

    Hello,
    I have the following problem with Oracle 9i, Release 2:
    I have a SQL-statement, which I create with the help of a configuration table. That means I don’t know how this statement looks at runtime. It could be look like this:
    SELECT Att1, Att2, Att3
    FROM Tab1
    or this…
    SELECT Att1, Att2
    FROM Tab1
    or this…
    SELECT Att1
    FROM Tab1
    etc.
    That means I don’t know in advance how many columns will be in the select-clause.
    Here my code snippet until here:
    v_query_str := 'SELECT ' || v_select_clause_str
    || ' FROM cb.' || v_table;
    ,,v_select_clause_str" willl be created dynamically
    ,,v_table" is as well from the config-table
    Now I want to iterate through the result of the query and do further processing.
    For this reason I wanted to use a cursor, iterate through the rows and save every value of each row in an own variable (but I don’t know the number of columns!!!).
    But how can I open a cursor and iterate through it without knowing the number of columns???
    The following code is NOT working:
    TYPE t_dataColumnComp IS TABLE OF VARCHAR2(200);
    a_dataColumnComp t_dataColumnComp;
    --here I create the query…
    v_query_str := 'SELECT ' || v_select_clause_str
    || ' FROM cb.' || v_table;
    OPEN c_tempAtt FOR v_query_str;
    LOOP
    FETCH c_tempAtt INTO a_dataColumnComp; --THIS DON’T WORK
    EXIT WHEN c_tempAtt%NOTFOUND;
    FOR i IN 1..a_dataColumnComp.COUNT
    LOOP
    DBMS_OUTPUT.PUT_LINE(a_dataColumnComp(i));
    END LOOP;
    END LOOP;
    CLOSE c_tempAtt; --close cursor variable
    Regards
    Homer

    You will need to use DBMS_SQL to handle this since the number of columns in the result set is not known until runtime.
    See here for an example of using DBMS_SQL:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:235814350980

  • Problem with wireless keyboard and wireless mouse

    All of a sudden, after more than 6 mos., I am having problems with both the wireless keyboard and wireless mouse. I am getting a "connection lost" message on the screen with a picture of the keyboard. It only stays there a few seconds, disappears, then the keyboard is ok again.
    The mouse is even more frustrating. I am not using the ball for scrolling, just moving the mouse to move the pointer. It will be working perfectly, then for 15 to 30 seconds will either not respond, or be extremely slow, then be ok again. This has repeated a number of times today, especially when I am in iTunes. The batteries are fine in both devices, since I had the problem, changed the batteries, and still have these problems. Any ideas?

    Brian, I called Apple and I think they fixed the problem with the keyboard. Unfortunately, I did not write down the exact keystroke sequence they gave me, but let me tell you what I did. I unplugged the computer and waited 60 seconds. After I plugged in back in, I was told to immediately hold down 4 keys. I think they were something like Ctrl, Command, Shift, and R. Those may not be the exact keys, maybe it was Option instead of Ctrl, and maybe R is not right. I am not sure. Those keys are held down until the second beep is heard after the computer was turned on. Supposedly, this re-established connections between the computer and the keyboard. Sorry I did not write down the key combination. If you can, call Apple and get the proper key stroke combination

  • I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes.   I hav

    I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes. I have viewed some videos and read numerous articles but haven't found the one to help me. Please point me in the best direction. Thank you Vincent TC

    For the sake of clarity and to save people time, Todd is asking about the behaviour of the Patch tool when using it to repair the area next to the young lad's head.  Todd gets a blurred dark tone pretty much regardless of the options he uses.
    IMO that's what I would expect to happen because of the close proximity of the other image elements i.e. the lad's neck and the strong lines of his shirt.  I would not choose to use the Patch tool in this situation.  Content Aware Fill makes a better stab at it. 

  • Problems with explain plan and statement

    Hi community,
    I have migrated a j2ee application from DB2 to Oracle.
    First some facts of our application and database instance:
    We are using oracle version 10.2.0.3 and driver version 10.2.0.3. It runs with charset Unicode 3.0 UTF-8.
    Our application is using Tomcat as web container and jboss as application server. We are only using prepared statements. So if I talk about statements I always mean prepared statements. Also our application is setting the defaultNChar property to true because every char and varchar field has been created as an nchar and nvarchar.
    We have some jsp sites that contains lists with search forms. Everytime I enter a value to the form that returns a filled resultset, the lists are performing great. But everytime I enter a value that returns an empty resultset, the lists are 100 times slower. The jsp sites are running in the tomcat environment and submitting their statements directly to the database. The connections are pooled by dbcp. So what can cause this behaviour??
    To anaylze this problem I started logging all statements and filled-in search field values and combinations that are executed by the lists described above. I also developed a standalone helper tool that reads the logged statements, executes them to the database and generates an explain plan for every statement. But now there appears a strange situation. Every statement, that performs really fast within our application, is now executed by the helper tool extremely slow. So I edited some jsp pages within our application to force an explain plan from there (tomcat env). So when I'm executing the same statement I'm getting with the exactly same code two completely different explain plans.
    First the statement itself:
    select LINVIN.BBASE , INVINNUM , INVINNUMALT , LINVIN.LSUPPLIERNUM , LSUPPLIERNUMEXT , LINVIN.COMPANYCODE , ACCOUNT , INVINTXT , INVINSTS , INVINTYP , INVINDAT , RECEIPTDAT , POSTED , POSTINGDATE , CHECKCOSTCENTER , WORKFLOWIDEXT , INVINREFERENCE , RESPONSIBLEPERS , INVINSUM_V , INVINSUMGROSS_V , VOUCHERNUM , HASPOSITIONS , PROCESSINSTANCEID , FCURISO_V , LSUPPLIER.AADDRLINE1 from LINVIN, LSUPPLIER where LINVIN.BBASE = LSUPPLIER.BBASE and LINVIN.LSUPPLIERNUM = LSUPPLIER.LSUPPLIERNUM and LINVIN.BBASE = ? order by LINVIN.BBASE, INVINDAT DESC
    Now the explain plan from our application:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 101 | 28583 | 55 (0)| 00:00:01 |
    | 1 | NESTED LOOPS | | 101 | 28583 | 55 (0)| 00:00:01 |
    | 2 | TABLE ACCESS BY INDEX ROWID| LINVIN | 93709 | 12M| 25 (0)| 00:00:01 |
    |* 3 | INDEX RANGE SCAN | LINV_INVDAT | 101 | | 1 (0)| 00:00:01 |
    | 4 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 1 | 148 | 1 (0)| 00:00:01 |
    |* 5 | INDEX UNIQUE SCAN | PK_177597 | 1 | | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - access("LINVIN"."BBASE"=:1)
    filter("LINVIN"."BBASE"=:1)
    5 - access("LSUPPLIER"."BBASE"=:1 AND "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    Now the one from the standalone tool:
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 93773 | 25M| | 12898 (1)| 00:02:35 |
    | 1 | SORT ORDER BY | | 93773 | 25M| 61M| 12898 (1)| 00:02:35 |
    |* 2 | HASH JOIN | | 93773 | 25M| 2592K| 7185 (1)| 00:01:27 |
    | 3 | TABLE ACCESS BY INDEX ROWID| LSUPPLIER | 16540 | 2390K| | 332 (0)| 00:00:04 |
    |* 4 | INDEX RANGE SCAN | LSUPPLIER_HAS_BASE_FK | 16540 | | | 11 (0)| 00:00:01 |
    | 5 | TABLE ACCESS BY INDEX ROWID| LINVIN | 93709 | 12M| | 6073 (1)| 00:01:13 |
    |* 6 | INDEX RANGE SCAN | LINVOICE_BMDT_FK | 93709 | | | 84 (2)| 00:00:02 |
    Predicate Information (identified by operation id):
    2 - access("LINVIN"."BBASE"="LSUPPLIER"."BBASE" AND "LINVIN"."LSUPPLIERNUM"="LSUPPLIER"."LSUPPLIERNUM")
    4 - access("LSUPPLIER"."BBASE"=:1)
    6 - access("LINVIN"."BBASE"=:1)
    The size of the tables are: LINVIN - 383.692 Rows, LSUPPLIER - 115.782 Rows
    As you can see the one executed from our application is much faster than the one from the helper tool. So why picks oracle a completely different explain plan for the same statement? An why is a hash join much slower than a nested loop? Because If I'm right a nested loop should only be used when the tables are pretty small..
    I also tried to play with some parameters:
    I set optimizer_index_caching to 100 and optimizer_index_cost_adj to 30. I also changed optimizer_mode to FIRST_ROWS_100.
    I would really appreciated, if somebody can help me with this issue, because I'm really getting more and more distressed...
    Thanks in advance,
    Tobias
    Edited by: tobiwan on Sep 3, 2008 11:49 PM
    Edited by: tobiwan on Sep 3, 2008 11:50 PM
    Edited by: tobiwan on Sep 4, 2008 12:01 AM
    Edited by: tobiwan on Sep 4, 2008 12:02 AM
    Edited by: tobiwan on Sep 4, 2008 12:04 AM
    Edited by: tobiwan on Sep 4, 2008 12:06 AM
    Edited by: tobiwan on Sep 4, 2008 12:06 AM
    Edited by: tobiwan on Sep 4, 2008 12:07 AM

    tobiwan wrote:
    Hi again,
    Here ist the answer:
    The problem, because I got two different explain plans, was that the external tool uses the NLS sesssion parameters coming from the OS which are in my case "de/DE".
    Within our application these parameters are changed to "en/US"!! So if I'm calling in my external tool the java function Locale.setDefault(new Locale("en","US")) before connecting to the database the explain plans are finally equal.That might explain why you got two different execution plan, because one plan was obviously able to avoid a SORT ORDER BY operation, whereas the second plan required to run SORT ORDER BY operation, obviously because of the different NLS_SORT settings. An index by default uses the NLS_SORT = 'binary' order whereas ORDER BY obeys the NLS_SORT setting, which probably was set to 'GERMAN' in your "external tool" case. You can check the "NLS_SESSION_PARAMETERS" view to check your current NLS_SORT setting.
    For more information regarding this issue, see my blog note I've written about this some time ago:
    http://oracle-randolf.blogspot.com/2008/09/getting-first-rows-of-large-sorted.html
    Now let me make a guess why you observe the behaviour that it takes so long if your result set is empty:
    The plan avoiding the SORT ORDER BY is able to return the first rows of the result set very quickly, but could take quite a while until all rows are processed, since it requires potentially a lot of iterations of the loop until everything has been processed. Your front end probably by default only display the first n rows of the result set and therefore works fine with this execution plan.
    Now if the result set is empty, depending on your data, indexes and search criteria, Oracle has to work through all the data using the inefficient NESTED LOOP approach only to find out that no data has been found, and since your application attempts to fetch the first n records, but no records will be found, it has to wait until all data has been processed.
    You can try to reproduce this by deliberately fetching all records of a query that returns data and that uses the NESTED LOOP approach... It probably takes as long as in the case when no records are found.
    Note that you seem to use bind variables and 10g, therefore you might be interested that due to the "bind variable peeking" functionality you might potentially end up with "unstable" plans depending on the values "peeked" when the statement is parsed.
    For more information, see this comprehensive description of the issue:
    http://www.pythian.com/blogs/867/stabilize-oracle-10gs-bind-peeking-behaviour-by-cutting-histograms
    Note that this changes in 11g with the introduction of the "Adaptive Cursor Sharing".
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Session state and browser cache - Back button problem

    Hi all,
    I have a problem (and unless I'm missing something I think we all do) with session state and use of the browser's Back button. I really hope I'm just being dumb...
    Background scenario:
    Page P has a sidebar list allowing the user to select what content is displayed (e.g. 'stuff relating to X, Y or Z' where X, Y and Z are rows in, say, a table of projects). When a list entry is clicked, we branch to page P with the value of the list item placed in an application-level item (call it G_PROJECT). Reports on page P use G_PROJECT in their WHERE clauses.
    So, click list entry X and G_PROJECT is set to X and page P shows reports for project X.
    Page P also has a set of buttons which branch to various edit pages which allow attributes of page P's current project to be updated. These pages similarly use G_PROJECT in their WHERE clauses.
    Problem scenario:
    1. The user goes to page P and picks project X off the list. Project X's stuff is displayed (G_PROJECT = X).
    2. The user then picks project Y off the list. Project Y's stuff is displayed (G_PROJECT = Y).
    3. The user then clicks the browser's Back button. The page is served from browser cache, so project X's stuff is displayed, but G_PROJECT still = Y.
    4. The user clicks an 'Edit' button; we submit, and branch to an edit page which displays (and will edit) data for project Y because G_PROJECT still = Y.
    This is SERIOUSLY BAD NEWS - apart from being confusing, the user's edit permissions on projects X and Y may differ, and so the user may be able to perform 'illegal' updates.
    I've read what I can on this forum and the rest of the web looking for ways to a) inhibit browsers' 'Back' functions and/or b) prevent pages being cached by the browser, but none of them have worked for me.
    Short of waiting for browser manufacturers to recognise that the web is now full of applications as well as static pages, and enable robust programmatic control of cache behaviour, does anybody know how the problem can be avoided - or at least detected?
    Thanks,
    jd
    Failed attempts to date:
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="cache-control" content="no-store">
    <meta http-equiv="cache-control" content="private">
    <meta http-equiv="cache-control" content="max-age=0, must-revalidate">
    <meta http-equiv="expires" content="Wed, 09 Aug 2000 01:01:01 GMT">
    <meta http-equiv="pragma" content="no-cache">
    Disallowing duplicate submission (page attribute).
    window.history.go(1);

    Thanks Scott,
    I may be being dumb here but I don't see how that would help...
    P250_PROJECT and G_PROJECT are currently kept in sync by app logic. Whichever is used to drive, if the page is rendered from cache then the app logic is not executed, so the rendered page contents are not those keyed by P250_PROJECT, as illustrated in steps 1-4 of the problem above.
    The user sees X, the session items say Y. The engine doesn't know what the user is seeing.
    when page P is POSTed, its hidden item P250_PROJECT should always be used to derive the application item G_PROJECT. Then whether the page was pulled from cache or rendered anew via a click from the sidebar link, the project ID is determined by the contents of that page.
    As I said above I tried this, with the 'Edit' branch set to:
    Set these items: G_PROJECT
    With these values: &P250_PROJECT.
    but it makes no difference. The project ID is not determined by the rendered page contents - the engine gets the value of P250_PROJECT from session state.
    I can code the 'Edit' pages such that they check permissions and if necessary redirect back to p250 (conditional before-header branch), but that's a clunky cure rather than the prevention I was hoping for.
    Please tell me if my understanding is incorrect.
    jd

  • My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    Connect the iPod to your syncing computer and restore it via iTunes.  However, if iTunes asks for the unknown passcode you need to place the iPod in recovery mode and then restore the iPod from backup.  For recovey mode see:
    iPhone and iPod touch: Unable to update or restore
    "If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software."
    Above is from:
    http://support.apple.com/kb/ht1212

  • I tried changing my password, and it changed to one that wasnt it, and i dont know it. So i tried it too many times and now its saying it is disabled, connect to itunes. but a problem is that my power button on top is broken. how to i fix it?

    I tried changing my password, and it changed to one that wasnt it, and i dont know it. So i tried it too many times and now its saying it is disabled, connect to itunes. but a problem is that my power button on top is broken. how to i fix it?

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • Problem with window repaint and scrollbars in edit mode (LabVIEW 8.0.1)

    I am running LabVIEW 8.0.1 in Windows XP SP3.  For my main VI, I ran into a strange problem about 5 months ago.  The front panel window - in both edit mode and run mode - stopped repainting itself on the right side which is most visible when you scroll up and down, but also visible with overlapping windows.  Coincident with the repaint problem, both scrollbars look disabled with greyed-out arrows and no boxes in the bars that you can click and drag to scroll the window.  The scrollbars still partially work if you hover the mouse over them and roll the mouse wheel but clicking and dragging doesn't work. 
    The front panel has lots of controls and indicators including tab-control containers and is larger in the horizontal and vertical directions so both scrollbars should be active.  But I deleted all elements on the front panel and everything in the block diagram and the problem persists.  So the problem is not directly related to some control/indicator display.
    I saved the simple VI with this problem (using a wide text line and a tall rounded box to test), then created a new VI and copied the two elements to the new VI.  This new VI does not have the repaint and scrollbar problem.  The two VIs differ slightly in memory usage and in revision number (the bad one is revision 1785 and the good one is revision 3), but otherwise the two VIs are identical.  I attached both VIs to this posting.  When you first open the bad VI, you'll see the disabled scrollbars whereas the good VI has active scrollbars.  To replicate the repaint problem, scroll the window up and down with your mouse wheel.  If it's fine when you first open the VI, click on another window, then click back on the VI window and try the mouse wheel again.  This clicking-away-and-back always causes the repaint problem for me.  I tried the VIs on two different computers both running Windows XP SP3 and LabVIEW 8.0.1 with identical results.
    Here's what I discovered from troubleshooting with the simple VIs:
    * scrollbars always disabled
    * repaint problem in main window for window widths larger then 680 pixels
    * repaint problem in main window menu toolbar for widths larger than 646 pixels
    * entire window becomes disabled for window widths larger than 1348 pixels
    * can repaint window by minimizing and restoring, but only repaints that one time
    * scrollbar boxes sometimes flicker into view but then disappear
    * scroll left and right by hovering mouse over horizontal scrollbar and using mouse wheel
    I found something similar on this forum (thread: Problem with front panel refresh) - it might be related to the CAR about the panel being offset internally.  I don't have access to LabVIEW 8.5 or later and don't plan to upgrade - I haven't tried the trial version as that user did.  I could try to copy and paste my entire block diagram to a new VI but the VI is so large I'm afraid something would break, plus I don't want this to happen again in a few months.  The problem seemed to occur after a certain number of saves (or revision number).  I save backup copies often and when the problem first happened, I was able to go back to a previous version, make the missing changes and save it with no problems, but this only delayed the problem and it came up later.  So maybe it's the revision number.  It didn't seem related to a particular addition or modification in the front panel or diagram.
    The image attached shows the repaint and scrollbar problems in the bad VI.
    This brings up a question I have - if this problem is a bug and was fixed in 8.5 and later, is there a way to apply bug fixes to earlier versions?  Or do I have to pay for an upgrade to fix such bugs?
    Solved!
    Go to Solution.
    Attachments:
    RepaintTest_Bad.gif ‏27 KB
    Test Repaint - From Bad VI, scrollbar and repaint problems.vi ‏7 KB
    Test Repaint - From Blank VI, no problems.vi ‏5 KB

    Seems something got corrupted with this VI. Copy things over to a fresh VI and things should be OK.
    See also this recent report of a similar issue.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Nokia c5-03 volume and media player issues

    i recently bought a nokia C5-03, i transfered some music from my pc to the phone but after playing 2 or 3 songs(video clips), the clips start breaking up, this has been happening since i purchased it a month ago. now the phone has started acting up o

  • How to create a popup view in mobile application?

    Hi folks, i need some help to do popup window in mobile application, i see that mobile don´t have a wdComponentAPI that is a controller of Web Dynpro JAVA, so what i´ll should do?   So, thats it

  • How to activate low pass filter of 6115 with daqmx?

    Hello, I am not able to find the property node to activate the low pass filter of the 6115. Could anyone give me a hint? Thanks a lot. Best regards, Michael Solved! Go to Solution.

  • Smartform output as Email.

    Hi, Can a smartform output be sent directly as a mail into SAP inbox with out converting it into .PDF format? Help needed regarding this. Regards, suresh.

  • Printer driver for Canon MP730

    i am am totally fed up with my HP 8500 officejet printer (paper jam all the time). I want to start using my older printer (Canon MP 730) again in combination with an iMac running on OS X Yosemite DId anyone find a printer driver for a Canon MP 730 th