Session state and checkboxes

Hi guys,.

I'm a little hard with the checkboxes in the APEX 4.2

I am trying to add 2 boxes in my application to filter the data

The problem is how then to value by default when the user opens the page, some data are displayed

If I use the 'Default' section in the details of the box (setting may 1 as default), when I open the web page, the checkbox is marked, but in the session state is not defined so no data will appear. If I submit the new page then Yes, the data is displayed

I could use a calculation that defined the box = 1 if it is not set when the page loads, but it would not work as the calculation would give it 1 time and again when the user the box remove the flag

Anyone know how I could apply this?

Thank you very much

Hello

so I found a solution according to the following:

-create box 2 or more

-create a hidden text field

-create a header after calculation that has always defined the hidden field = 1

-create one before the calculation of header for each box the value = 1 box only if the value of the hidden text field is null

Tags: Database

Similar Questions

  • What the Protection of Session State and when it is used.

    Hello

    I just want to know what is the Protection of the State of Session and where it should be used.

    Thank you
    Deepak

    Deepak,

    Protection of the State of session in the Oracle apex is a built-in feature that allows you to prevent users / hackers to a URL handling in your application.

    http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e11838/sec.htm#CDDGIGJH

    A simple way to undersatnd, what would be your banking session. As soon as you connect, your URL would include a key and probably session information for the session that you log on. But if you copy this URL and log off and reuse the URL, you wouldn't be able to connect as that the session is over.

    Or once you connect and navigate to a page, you would have the information information session and the page in your browser to the URL (say it's balance transfer page). However, this page would not directly accessible using the URL with someone else. A similar security feature can be activated by using "URL access" in the access page for Apex session state protection.

    Hope this helps,
    Rajesh.

  • session state variable, concept and work around

    I use the variable session state and tried under the code element. But so far, I've had it is that when a variable assigned a value in plsql block, its scope has ended so only.

    And in the next step using the simple sql variable within the same session, we had manifest error.

    Is there a work around using too simple sql variable.

    SQL> CREATE OR REPLACE PACKAGE MYPACKAGE
      2  as
      3  mysess_var number;
      4  end;
      5  /
    
    
    Package created.
    
    
    SQL> create table tmp_sess as select 1 sess_id from dual;
    
    
    Table created.
    
    
    SQL>
    SQL> declare
      2  begin
      3  MYPACKAGE.mysess_var := 1;--Assiging value
      4  insert into tmp_sess values (MYPACKAGE.mysess_var);
      5  commit;
      6  end;
      7  /
    
    
    PL/SQL procedure successfully completed.
    
    
    SQL> --I also want this to be achive for plain sql syntax,  is it possible
    SQL> insert into tmp_sess values (MYPACKAGE.mysess_var);
    insert into tmp_sess values (MYPACKAGE.mysess_var)
                                 *
    ERROR at line 1:
    ORA-06553: PLS-221: 'MYSESS_VAR' is not a procedure or is undefined
    

    You cannot access variable defined in a package of SQL. Good way would be to define the getter and setter methods.

    SQL> create or replace package mypackage
      2  as
      3    mysess_var number;
      4    procedure set_value (pvalue in number);
      5    function get_value return number;
      6  end;
      7  /
    
    Package created.
    
    SQL> create or replace package body mypackage
      2  as
      3    procedure set_value (pvalue in number)
      4    is
      5    begin
      6      mysess_var := pvalue;
      7    end;
      8
      9    function get_value return number
     10    is
     11    begin
     12      return mysess_var;
     13    end;
     14  end;
     15  /
    
    Package body created.
    
    SQL> exec mypackage.set_value(1)
    
    PL/SQL procedure successfully completed.
    
    SQL> select mypackage.get_value
      2    from dual;
    
     GET_VALUE
    ----------
             1
    
  • APEX Session point of the Application or the item of Session State set and get?

    I need assistance with items and values in a single Application-Apex:

    I have a List-Item (P101_UMGEBUNG) selected on the page of connection (Page 101) in my application (next to username and password).

    After this item has been selected in the list of outfits and the "Login" button pressed, I want to use this value of the element in the context of different select statements on other pages for example in reports to the 4 Page, like this:

    "select * from mytable where environment =: P101_UMGEBUNG;

    The select statement is faulty, it dosent go back any line. It turns out that the value I just chose in the list is not saved in session state, so of course the select statement fails.  I determine this by clicking on the session menu item in the developer bar - the item itself presents itself, but the value of the element is empty:

    Unbenannt.png

    Which would cause a selected list value not end upward in session state and how to make sure he gets there?

    I've tried different solutions (process of pl/sql, javascript actions dynamics and brances) I found here in further discussions and with google, but maybe im wrong,

    Someone has a solution for this problem and could explain it in detail?

    Hello

    Value of the item on your login page is disabled by the process of "Empty the Cache page (s)". To save the State of this element, you can:

    1. remove the "Empty the Cache" page (s) process or set the condition to "never". It security hole.

    2 create the point on another page (for example, on page 10 P10_UMGEBUNG) and create processes on the login page BEFORE the process of "Empty the Cache" page (s), which will be

    Save the State of P10_UMGEBUNG. Make the process of PL/SQL:

    BEGIN
      APEX_UTIL.SET_SESSION_STATE('P10_UMGEBUNG', :P101_UMGEBUNG);
    END;
    

    After that, you can use the value of the P10_UMGEBUNG element:

    select * from mytable where environment =:P10_UMGEBUNG;
    
  • How to set the value of the box check the plug-in in session state using a DA

    I want to click on the box (plug version) and set (Y or N) in session state without submitting the page.  Is it possible to do it in a dynamic action? or a code in the ? The HTML Form element attributes

    I tried the code proposed to

    Value of session state changes checkbox without submitting

    using AJAX, but can't make it work.

    I also tried the following code, but doesn't seem to work for checkboxes.

    <script language="JavaScript" type="text/javascript">
    function f_setItem (pItem)
    { 
    //alert('running fsetItem');
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',&APP_PAGE_ID.);
      get.add(pItem,$x(pItem).value)
      gReturn = get.get();
      get = null;
    }
    </script>
    

    More modern solutions using a DA?

    Should I use an event 'onCheck' or 'onchange '?

    Thanks in advance

    PaulP

    APEX V4.2.3

    DB EA 11.2

    APEX listener V2.0.5.287.04.27

    13 blue-gray theme

    IE9.0.8112

    FF26.0

    Paul, in fact, you can use a dynamic Action.

    Say your question change event, say P1_CHECKBOX.

    So here's the clincher.

    Action: execute the PL/SQL Code

    PL/SQL code:

    Start

    null;

    end;

    Page to submit items: P1_CHECKBOX

    That's all.

    Read the help on the elements of Page to submit

    «Specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your 'code PL/SQL'.»

    Kofi

  • Popup LOV selected the value not in session state

    I have a pop LOV element on a page in my application.  Once the item has been selected in the list presented, I would like to use as part of a select statement.  Select statement failed.  It turns out that the value I want the popup THAT LOV is not being saved in session state, so of course the select statement fails.  I determine this by clicking on the session menu item in the developer bar - the item itself presents itself, but the value is empty.

    What would cause a popup LOV value choice not finish by in session state, and how do I make sure he gets there?

    Thank you!

    If you need the value in a SQL report, you can just set "Elements of Page to submit" in your report to your LOV element definition. Otherwise, create a dynamic fire action when your LOV is changed with a set of pl/sql null process action; then set Page elements to send to your LOV element.

    Alternatively you could do it manually with your own function/Manager javascript using the '$s' Apex API by creating a dynamic action that JavaScript is triggered then the loading of the page:

    $("#PXX_YOUR_LOV").on('change',function(){
      var getValue=$(this).val();
      $s('PXX_YOUR_LOV', getValue);
      });
    

    Changing the value in LOV only updates the HTML code, the element must be submitted to the server so that the value that will be put in session state. The gurus can explain more, but the above methods are what I use depending on the situation.

    see you soon,

    John

  • Connect all the elements of session state?

    I need to create a record of routine that captures the current user to an APEX session state and she pours in a table of error log.

    I already have the paper table and an autonomous_transaction function defined in one of my pl/sql packages, but now I need to get information from the user's session, for example what page they were, what their item app values were, what the last request has been, etc..

    Does anyone know how to do that without grant select on apex_030200.wwv_flow_data the ID of the workspace where the logging feature?

    Wwv_flow_data contains information for all users, I want just the logarithmic function to access the current user/app/session data only. Yes, I can filter with a where clause clause, but I rather it would be more like a self filtering view that shows you your own data (defined in the schema of the apex/flow). Even better would be a function APEX_UTIL that returns the session state in a clob or varchar2 32K maybe even in the name = value format.

    My version of db is a business with Apex 3.2.0.00.27 11.1.

    You'll want to use the built-in views. Here is a sample of something that I use to record values report.

    DECLARE
    CURSOR c_items IS
          SELECT item_name
            FROM apex_application_page_items
           WHERE application_id = p_application_id AND
                 page_id = p_page_num AND
                 (region_id = p_region_id OR
                  p_region_id IS NULL) AND
                 display_as NOT IN ('Stop and Start HTML Table (Displays label only)', 'Hidden and Protected');
    
      BEGIN
        FOR r_items IN c_items LOOP
          store_report_value(p_report_id, r_items.item_name, v(r_items.item_name));
        END LOOP;
    
      END;   
    

    You can pass the values of Apex as: APP_SESSION,: APP_PAGE_ID,: APP_USER as parameters in a procedure.

  • LOV displayed as null when it has a value in session state

    I use ajax to Dene Kubinek cascading select list example and it works fine. I have only one small problem. After the process of database update is running, and the page is refreshed the second selection list of with the null value when it has a value of 6 session state. Even if the database is updated with the correct value users will think that a null value has been updated because it shows - select Team - rather than the team that was selected.

    How can I fix it? I have read dozens of threads on the forum about the cascading selection lists and none of them seem to address this issue. I followed messageID = 2803572. When I changed the first select list of a select list with submit it wouldn't work because the onchange process did not run.

    It's very frustrating because the first select list contains the correct value in session state, and it is to show the selected value. I only have this problem with the second select list. I don't have two selection lists, one meets the other.

    Here is the code for my second selection list:

    SELECT TEAM_DESC, TEAM_ID
    OF CEAH_TEAMS
    WHERE UNIT_ID = NV(:P116_CENTER) or NV(:P116_CENTER) = - 1

    I use the same code in another form and it works very well. The only difference is that the other form already has a value for the first list in the selection, so I didn't need additional code to check the value zero. If I don't check the null value (: P116_CENTER = - 1) I get a LOV error when the page initially loads.

    Help. Thanks in advance, Elizabeth

    Salvatore - brilliant! Of course.

    Scott

  • Session state protection error

    Hello

    I get an error on the browser Internet Explorer (doesn't happen in chrome), which States "Session State protection violation: this can be caused by manually editing the protected page P11_NEW_FLAG point." If you don't know what caused this error, contact the administrator of the application for assistance. Contact your administrator for the application. "


    I don't know why this error because the element P11_NEW_FLAG is NOT protected at all. Here's the security properties are attributed to him:



    Capture.PNG

    It has a readonly condition associated with him making it readonly based on some logic PL SQL.

    I don't know where to start debugging? What can be the root cause?

    Thank you

    Sunil Bhatia

    Hi Sunil Bhatia,

    Sunil Bhatia wrote:

    Hi mohamed,.

    No, its not hidden item, it's a FLAG (Checkbox) I display on the front end. There are readonly. I debugged and error occurring only when the box is read-only. It automatically creates checksum argument.

    Other settings to watch?

    Thank you

    Sunil Bhatia

    You use the condition parameters of article readonly?

    CheckBox and select items does not in HTML readonly property. ReadOnly checkbox in the case of Oracle APEX is setting the disabled property. Therefore, on presentation of the page it is originally the error of session state protection.

    An easy way to do this is to write a dynamic action (run Javascript) to disable the checkbox if necessary:

    $("#P11_NEW_FLAG").attr("disabled",true);
    

    But write a front page submit dynamic action (run Javascript) to activate elements disabled on the page, so that the layout of the page works fine:

    $("#P11_NEW_FLAG").removeAttr("disabled");
    

    Reference: Apex tips and tricks - an easy way to make read-only items

    I hope this helps!

    Kind regards

    Kiran

  • If sqlplus session statement

    Hi all

    I have to get the result of a statement and continue.

    This runs a sqlplus session.

    Oracle 11g

    declare v_dname varchar (20);
    Start
    Select djob.get_dbname in the sys.dual v_dname;
    end;

    If (v_dname = "PRD") then

    run IMMEDIATELY 'truncate table MY_DAT_TBL;

    -all the summary records
    INSERT in MY_DAT_TB v
    SELECT *.
    OF ROLL_SALES_DATA;

    Commit;

    end if;

    Thank you
    Jac

    Put all your logic/code in a pl/sql block.

    SQL Plus is not a programming language.

  • Session state protection violation

    I created the sample application to the free workspace

    https://Apex.Oracle.com/pls/Apex/f?p=4550:8:0

    Name of workspace: WMS_USER

    Username: [email protected]

    Password: password! 23

    Request 40363 - shipping Office
    : - > Run: click the report item

    When I select the number of the item 50004257 and click on the button new 1 then show the error like session
    violation of protection State

    Can you please help

    This link is not a job for me.

    2942415 wrote:

    I created the sample application to the free workspace

    https://Apex.Oracle.com/pls/Apex/f?p=4550:8:0

    Name of the workspace: WMS_USER

    Username: [email protected]

    Password: password! 23

    Request 40363 - shipping Office
    :-> Run it: click the report item

    When I select item number 50004257 and click on the button new 1 then show the error like session
    violation of protection State

    Can you please help

    This link is not a job for me.

    Check your work application.

    p3_item_desc--> edit-->--> No. session state

  • Get the session state of the order of the day in javascript

    Is there anyway to get the value of an element of demand through jS?

    [I have an app that loads a different source into an iframe depending on which page the user is.]  I can load this value in session state for a part of the application (or a point probably page) but for the redirect which is made in java script I don't know how to get the value of session.  [I do not have it as the value of the client side.]

    Thanks guys, but I think that it would give me only the value in the DOm not in session state.  I had to make a page zero point and dynamic action that populated the in the DOM, and then I could use JS ($v) to get the variables.

    I couldn't find a way to get session state directly.

  • Apex 5.0 "session state protection violation" during the change of display only value point in dynamic action.

    The following feature gives us a message "session state protection violation", after we migrated our application from Apex 4.02 to 5.0.

    For example, in apex.oracle.com: https://apex.oracle.com/pls/apex/f?p=50676:1:

    Whenever the value of the input field changes, the URL to test changes. This is done in a dynamic action of 'change' on the version field. The action of the set value changes the value of URL to test.

    When the page is sent to the error message is displayed.

    1. Why do we get this message in Apex 5.0 and not in 4.0.2?

    2. What is the way to do this in the Apex 5.0?

    Thank you

    René

    Just try save session state - no.

  • Session state protection violation: this can be caused by manually editing the protected page P67_C point. If you don't know what caused this error.

    Hi friends,

    I create three field A textfield,textfield B,C textfield and apply the formula with dynamic action.

    C = A + B.

    Now, I want to protect user could not be total change at point C, so I change it is property of the text field to display only and change in

    Settings-> save the Session State-> Yes

    After all changes when I ran page and provide the registry then it shows me error below.

    Session state protection violation: this can be caused by manually editing the protected page P67_C point. If you don't know what caused this error, contact the administrator of the application for assistance.


    How to disable the total at point C when I use the dynamic action to calculate the Total of A + B.

    Thank you.




    Hi Maxence,

    1. in the case of a display one element

    Change your point of P67_C and change the State of Session Save-> No.

    2. in the case of a text field

    Change your point of P67_C and make it read-only

    go to the attributes of the HTML Form element-> readonly = "readonly".

    Hope this helps you,

    Kind regards

    Jitendra

  • Interrupted SQL statement and start several times with several SQL_EXEC_ID

    Hi all

    We meet a strange phenomenon, maybe someone can help.

    We see that sometimes, when our client runs a single statement, implemented Oracle to process the statement with a special SQL_EXEC_ID, but after a while stops and starts processing the statement along with different SQL_EXEC_ID. Then, after a while, it happens again - stop Oracle processes the statement and start from the beginning with the new SQL_EXEC_ID. This happens again and again until we kill all of the other sessions on the database (then it ends).

    What we see exactly: Client executes the statement (sql_id = "2tp7pz6yv87qp"). Monitor us v $ SQL_MONITOR and get this:

    SELECT Sql_id, sql_exec_id, to_char (SQL_EXEC_START, "HH24:MI:SS MON-DD-YYYY) SQL_EXEC_START, status OF V$ SQL_MONITOR where sql_id = '2tp7pz6yv87qp' ORDER BY SQL_EXEC_START DESC;

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 the EXECUTION

    After a while check us again and see this:

    2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 the EXECUTION

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

    After a while, we see this:

    2tp7pz6yv87qp 16777219 28 may 2015 08:09:58 the EXECUTION

    2tp7pz6yv87qp 16777218 28 may 2015 07:53:37 FACT

    2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 FACT

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

    and so on — will happen again and again until we kill all of the other sessions in the database.

    When comparing the follow-up of the different SQL_EXEC_IDs SQL reports, we see that each of them did exactly the same job: used the same execution plan, beginning treatment she even read/wrote the same amount of e/s and each of them stopped at the same point during execution. You can see that for each SQL_EXEC_ID execution 'stops' in the middle and never reach the end of the plan. She always stops in the JOIN by HASH and never continue to the next steps in the implementation plan.

    When you look more deeply, we see in V$ ACTIVE_SESSION_HISTORY always last thing that happens for every SQL_EXEC_ID is HASH JOIN RIGHT OUTER (SQL_PLAN_OPERATION = HASH and SQL_PLAN_OPTIONS = RIGHT OUTER JOIN). Then comes the new SQL_EXEC_ID and it starts to do the same thing as the previous SQL_EXEC_ID did when it was launched.

    Kill all other sessions, run finally ends. We see that the final (successful) SQL_EXEC_ID work and completes his plan to run to completion.

    When executing the same single statement (when it comes to the single session in the database), it ends with a single SQL_EXEC_ID. Its SQL monitoring report looks like the final execution when the phenomenon occurs after killing all other sessions.

    -We checked that the customer executing the query only once. AWR also only shows simple execution of the query.

    -We have reproduced in many different clients (plus SQL, JDBC thin client OIC and DBMS_SCHEDULER job).

    -It has no PARALLEL in the query or table.

    -In this case for different statements (different INSERT-SELECT and MERGE instructions).

    -Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Does anyone have an idea?

    Finally found the root cause of the problem.

    This phenomenon occurs when the cursor of the active query being invalidated. This can occur in several scenarios, in our case, what happens when we work on a single partition (read or write) and perform DDL operations on different partitions of the same or the tables.

    Steps to reproduce:

    1 launch long command DML that affect the single partition

    2. in the course of executing this SQL, do one of the following values in a session different all 1 minute:

    2.1 do the indexes to a different partition unusable: ALTER TABLE X EDIT PARTITION Y UNUSABLE LOCAL INDEX

    2.2 rebuild the unusable index of different partition: ALTER TABLE X EDIT PARTITION Y REBUILD UNUSABLE LOCAL INDEX

    2.3 a partition different truncate

    Support of Oracle we were told that this problem is known and there are several requests for bugs and improvements thereon, for example this one:

    Bug 12905327 : TRUNCATE to an INVALID PARTITION TABLE UNNECESSARILY IMMEDIATELY all THE SLIDERS

    In our case (ETL process), we used to perform all these operations DDL and DML operations long (we work on different partitions in parallel). In order to solve, we have separated these operations to the different phases in our process and don't be DDL and DML operations at the same time more. This solved the problem for us.

Maybe you are looking for

  • 7610 officejet large format e - has: firmware

    I got a new printer, and with my mac 10.9 the accompanying Cd is not approved to be updated. So, I guess I should donload and install the complete package of software/driver from the HP website. My question is: I also see option for firmware to downl

  • Why updates KB2686828, KB2656369 has offered several times?

    Why updates, KB2686828, KB2656369 has proposed several times, after supposed to install successfully? They have been on the menu for two Patch Tuesday, if not more. ADD / REMOVE show KB2686828, KB2656369v2.

  • printed transparent envy 4504

    I want to print on transparenies with my printer Envy 4504, however, there is no transparency option - any suggestions please?

  • Re-install Win.7

    How to re-install Win 7 on my old HP PC... In my view, there is a way to re - install the software on the hard drive... Help, please.  The PC has a Celeron processor and only 1 GB of RAM... he had a virus and I eliminated it and plan to re - install

  • Garry s Mod 13, install DirectX has failed, "a .cab file is needed for installation is not reliable?

    Hey! I did research on this problem literally all over the web, on the forums, support contact Dell and Microsoft hardware too. But the question is always free! -Very well, so I recently downloaded 13 beta Garry Mod, and I wanted to play. I clicked o