Client vs. session state saving

I keep reading that JSF can preserve the current state on either the client via form fields or on the server via user session.
How do you specify the configuration if you'd like the client state to be preserved via forms rather than session? Am i totally incorrect with these assertions?

thanks,
I found the following document regarding the faces-config.xml, where can I find one outlining web.xml for jsf? In other words, what reference did you use to find that config element?
http://www.horstmann.com/corejsf/faces-config.html#view-handler

Similar Messages

  • Saving session state on authentication

    Hey all...
    In all my applications that interact with each other, I am running an application-level process on authentication which loads two preferences into applicaton-level items. I am seeing different results when jumping into different applications even though the executing code is the exact same in all applications, a stored procedure in the database. Here is a simplistic example.
    When application A calls a page in application B, an "on authentication" application-level process of application B reads two preferences and appropriately populates them into two application-level items of application B. When application A (or B for that matter) calls application C, the same-coded application process in application C attempts to populate two application-level items, but one of them is not being populated.
    It appears that the problem lies only with application C because regardless of whether I come from application A or application B, the same problem happens.
    When I go from application A to application B in debug mode, I see the following in reference to this problem:
    0.05: Computation point: ON_NEW_INSTANCE
    0.05: ...New Session = True
    0.05: Processing point: AFTER_AUTHENTICATION
    0.05: ...Process "Setup Seed Data": PLSQL (AFTER_AUTHENTICATION)
    1.11: ...Session State: Save Item "ORIGINAL_APP_ID" newValue="104" "escape_on_input="Y"
    1.11: ...Session State: Save Item "ORIGINAL_PAGE_ID" newValue="7" "escape_on_input="Y"
    When I go from either application A or application B to application C, I see the same debug messages except for an additional line that doesn't make sense to me. Following is an example:
    0.05: Computation point: ON_NEW_INSTANCE
    0.05: ...New Session = True
    0.05: Processing point: AFTER_AUTHENTICATION
    0.05: ...Process "Setup Seed Data": PLSQL (AFTER_AUTHENTICATION)
    1.11: ...Session State: Save Item "ORIGINAL_APP_ID" newValue="104" "escape_on_input="Y"
    1.11: ...Session State: Save Item "ORIGINAL_PAGE_ID" newValue="7" "escape_on_input="Y"
    <strong>1.11: ...Session State: Saved Item "ORIGINAL_APP_ID" New Value=""</strong>
    In all three applications, the exact same code is being run which determines if the preferences "is not null", and if so, sets the two preferences in the "current" application. I'm happy to show you the code of my stored procedure that does this if you like.
    The only thread I've seen in the forum that looks similar is the following:
    Re: Session state issues
    I've followed its suggestion of deleting and recreating the application-level item, but that did not solve my problem.
    I'm confused as to why the new line indicating "Saved Item" is showing up in the application C. Is there documentation available to explain the difference between "Save Item" and "Saved Item" when running a page in debug mode?
    Shane.

    Here are the different componets that are in play and some notes that may help understand the situation:
    - the failure happened when the two application-level processes below were just one process. works fine when they are split up.
    - the trick of using the SESSION as the USER_ID is because I want the preference to only be good for the session, not everytime the user logs in. ( i learned this trick from the ApEx forum! )
    - the stored procedure is in a package owned by a separate schema than the built-in ApEx user.
    On-Authentication Application-Level process with Sequence 10:
    begin
    :person_id := iv_portal.iv_emp_pkg.get_person_id ( v('USER') );
    apex_util.set_session_state ( 'PERSON_ID', :person_id );
    :core_app_id := iv_htmldb.iv_gen_pkg.get_core_app_id;
    apex_util.set_session_state ( 'CORE_APP_ID', :core_app_id );
    :user_vax_id :=
    substr ( iv_portal.iv_emp_pkg.get_vaxsub_id ( :person_id ), 1, 6 );
    apex_util.set_session_state ( 'USER_VAX_ID', :user_vax_id );
    :user_sub_id :=
    substr ( iv_portal.iv_emp_pkg.get_vaxsub_id ( :person_id ), 7, 1 );
    apex_util.set_session_state ( 'USER_SUB_ID', :user_sub_id );
    :proxy_person_id := apex_application.fetch_app_item
    ( 'PROXY_PERSON_ID', :original_app_id );
    apex_util.set_session_state ( 'PROXY_PERSON_ID', :proxy_person_id );
    end;
    On-Authentication Application-Level process with Sequence 15:
    declare
    l_username varchar2(50) := v('SESSION');
    begin
    iv_htmldb.iv_gen_pkg.setup_homepage_preferences ( l_username );
    end;
    SETUP_HOMEPAGE_PREFERENCES Stored Procedure
    procedure setup_homepage_preferences ( l_username in varchar2 ) is
    l_app_id varchar2(5) := v('APP_ID');
    l_page_id varchar2(5) := v('APP_PAGE_ID');
    l_pref_app_id varchar2(5) := null;
    l_pref_page_id varchar2(5) := null;
    begin
    -- clean up old sessions
    -- cannot do this however due to lack of access to the ApEx tables.
    delete from flows_020200.wwv_flow_preferences$ p
    where user_id != v('SESSION' )
    and user_id in ( select to_char ( id )
    from flows_020200.wwv_flow_sessions$ s
    where s.cookie = v('USER')
    and s.last_changed < sysdate - ( 0.5 ) );
    commit;
    if apex_util.get_preference ( 'ORIGINAL_APP_ID', l_username ) is null
    then -- then set the preference to the current application and page.
    apex_application.debug ( 'setting the ORIGINAL application items.' );
    apex_util.set_preference ( 'ORIGINAL_APP_ID', l_app_id,
    l_username );
    apex_util.set_preference ( 'ORIGINAL_PAGE_ID', l_page_id,
    l_username );
    else null;
    end if;
    -- set the application level items to the preference values
    l_pref_app_id := apex_util.get_preference ( 'ORIGINAL_APP_ID', l_username );
    l_pref_page_id := apex_util.get_preference ( 'ORIGINAL_PAGE_ID', l_username );
    apex_application.debug ( 'about to set ORIGINAL APP ID to ' || l_pref_app_id );
    apex_util.set_session_state ( 'ORIGINAL_APP_ID', l_pref_app_id );
    apex_application.debug ( 'just set ORIGINAL APP ID to ' ||
    apex_util.get_session_state ( 'ORIGINAL_APP_ID' ) );
    apex_application.debug ( 'about to set ORIGINAL PAGE ID to ' || l_pref_page_id );
    apex_util.set_session_state ( 'ORIGINAL_PAGE_ID', l_pref_page_id );
    apex_application.debug ( 'just set ORIGINAL PAGE ID to ' ||
    apex_util.get_session_state ( 'ORIGINAL_PAGE_ID' ) );
    end setup_homepage_preferences;
    Shane.

  • Is there an option to not do State Saving?

    We have a constraint that prevents us from using the Session (a load balancer prevents sessions from persistenting), so I tried using "client" as our State Saving option. However, this adds 4-8Kb per page with the hidden fields, which seems unnecessary. Is there an option to disable state saving entirely?
    K.C.

    Hi,
    In a documentation, they say :
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
    </context-param>
    The javax.faces.STATE_SAVING_METHOD is how you specify where the state of the view is saved and restored between requests. You can specify client or server. The JSF Implentation you use will default to one or the other if this is not specified.Sebastien Degardin

  • Problem with application item and session state

    Okay, let's see if I can explain this problem coherently.
    I have a small app (one page), with an application item, F_WHERE_CLAUSE.
    This page has three regions in which there are items that the users can populate for search conditions. A couple of these items are "select list with submit" (I still need to upgrade to the AJAX method, I know). There is another region which has one hidden field, called P1_WHERE_CLAUSE. This field is defined to "Always, replacing any value in session state..." with source type of "Item (application or page.....", and a source value of F_WHERE_CLAUSE with no default value.
    I have a button called "Search" which submits the page and fires a PL/SQL process which builds a where condition based upon the other page items and stores the value to the application item F_WHERE_CLAUSE (correctly).
    For testing, I've made the P1_WHERE_CLAUSE field visible so that I can see what's going on. I've also clicked the debug and session buttons to help trace this. After I click the "Search" button and the page submits, debug shows:
    0.02: ...Session State: Save "P1_WHERE_CLAUSE" - saving same value: "1=1"
    followed later by:
    0.05: ...Session State: Saved Item "F_WHERE_CLAUSE" New Value="lower(primary_class) = 'rock' and country = 'Spain'"
    The field P1_WHERE_CLAUSE displays with the correct search criteria as signified by F_WHERE_CLAUSE above. However, If I click the "session" button to view the session state values, P1_WHERE_CLAUSE shows up as:
    P1_WHERE_CLAUSE Textarea    1=1    U while F_WHERE_CLAUSE displays the correct value still.
    The reason this "problem" came up, is that this page also has three SQL report regions which use &P1_WHERE_CLAUSE. for the where condition. While they display the correct results on-screen, each report region also has the "Export to csv" enabled, and the export seems to be using the "1=1" condition (from the "session" window) instead of the search criteria that the on-screen region is using (F_WHERE_CLAUSE and the displayed P1_WHERE_CLAUSE), resulting in a retreival of all records.
    Anybody have any idea what's going on and why, and how to get the csv export to use the correct value for the where condition?
    Thanks,
    Bill Ferguson

    It appears the "Export to CSV" functionality requires the item value to be set in session state. The P1_WHERE_CLAUSE item value never gets saved to session state. The page is rendered and the value is put in the item on the page but until you submit the page session state doesn't know what P1_WHERE_CLAUSE is.
    Create a before header computation or process to set the value of P1_WHERE_CLAUSE (which will save it to session state). It is interesting that the report regions didn't need to look at the value in session state but the "export to csv" does.
    --Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Corrupt Session State? - Apex form posts text value as Null

    Recently I've discovered an issue with our Apex installation in which any value chosen as a source for a text field ends up being posted as a null to the database.
    We are running APEX version 3.2 within an Oracle 10.2.0.4 database using the Oracle HTTP Server from the 10g companion disk.
    At first glance, everything appears to function as expected; I have created a simple table called "oracle_sr" with 2 columns both not null:
    SQL> desc capacity.oracle_sr
    Name Null? Type
    ORACLE_SR_ID NOT NULL NUMBER
    TIMESTAMP NOT NULL DATE
    Within APEX the form wizard was used to create a form on this table.
    After executing the pages and entering a value for the timestamp field I can create records without issue.
    The issue arises when I choose a source value for the timestamp field.
    Any of the source options result in the same error (including a static value) so I will focus on the SQL Query for the source as:
    select sysdate from dual;
    This should substitute the system date within the timestamp text field when the page is executed.
    As expected, the value appears in the text box but when I submit the form to create the record I receive the error:
    ORA-01400: cannot insert NULL into ("CAPACITY"."ORACLE_SR"."TIMESTAMP")
    I have been working with APEX for quite some time and have successfully used this technique in many applications but just started to see this error over the past few days. What is particularly odd about this message is that default "not null" validations created by the form wizard sees the timestamp filed as having a value. The session state information included below is reporting a value yet the database is throwing the ORA-01400.
    Has anyone experienced a similar issue? I've spent a fair amount of time trying to research this issue but cannot seem to find any similar posts.
    I have included the debug output from my test page, from what I can see, there does seem to be a value associated with the timestamp filed:
    0.00: A C C E P T: Request="CREATE"
    0.00: Metadata: Fetch application definition and shortcuts
    0.00: NLS: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.00: alter session set nls_language="AMERICAN"
    0.00: alter session set nls_territory="AMERICA"
    0.00: NLS: CSV charset=WE8MSWIN1252
    0.00: ...NLS: Set Decimal separator="."
    0.00: ...NLS: Set NLS Group separator=","
    0.00: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -06:00
    0.01: Setting NLS_DATE_FORMAT to application date format: DD-MON-RR
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: Fetch session state from database
    0.01: ...Check session 2303701116904676 owner
    0.01: Setting NLS_DATE_FORMAT to application date format: DD-MON-RR
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Check for session expiration:
    0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.02: Session: Fetch session header information
    0.02: ...Metadata: Fetch page attributes for application 109, page 50
    0.02: ...Validate item page affinity.
    0.02: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: *...Session State: Save Item "P50_ORACLE_SR_ID" newValue="" "escape_on_input="N"*0.03: *...Session State: Save Item "P50_TIMESTAMP" newValue="26-MAY-09" "escape_on_input="N"*
    0.03: ...Session State: Save "P0_CURRENT_PERSONNEL_ID" - saving same value: "1"
    0.03: ...Session State: Save "P0_OFFSET" - saving same value: "0"
    0.03: ...Session State: Save "P0_ACTIVE_WEEK" - saving same value: "24-MAY-09"
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Tabs: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: ...Item Not Null Validation: P50_TIMESTAMP
    0.04: Branch point: BEFORE_PROCESSING
    0.04: Processing point: AFTER_SUBMIT
    0.04: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select ORACLE_SR_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P50_ORACLE_SR_ID := get_pk; end;
    0.04: ...*Session State: Saved Item "P50_ORACLE_SR_ID" New Value="6"*
    0.04: ...Process "Process Row of ORACLE_SR": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:ORACLE_SR:P50_ORACLE_SR_ID:ORACLE_SR_ID|IUD
    0.04: Show ERROR page...
    0.04: Performing rollback...
    ORA-01400: cannot insert NULL into ("CAPACITY"."ORACLE_SR"."TIMESTAMP")
    Unable to process row of table ORACLE_SR.
    Return to application.
    Any thoughts would be appreciated.
    Thank you,
    Justin.

    If you changed the Source Type of an item from Database Column to something else, then it cannot participate in the Automated Row Fetch/Automatic Row Processing (DML) choreography. You should leave the Source Type as it was and change the item's Default Value to populate it when the ARF process fetches a null for the column.
    Scott

  • ??? On Session State

    Background info:
    I have a field that could have two different types of input, one would be numeric (such as a PK) the other input to it would be text. To ensure the Automated Row Fetch always pulls the PK properly I am using a computation ON LOAD to turn the text into numeric so that when the Automatic Page Load runs it will always pull from the database based on the PK.
    This part is working properly the problem is that I have an item that is a select list and it unforunately has an dynamic LOV with a query of select a,b from table_xyz where value = :session_state_of_pk
    This is causing me a problem because it is referencing the "text value" and not the numeric value. Even though when I change my page view to "Events" the page rendering shows computations before Items. I even did a Pl/sql process ON LOAD to insert the :session_state value to a debug table.
    So my question is ... If the pl/sql on load process is holding the correct value then why is the LOV of a page item not using the correct value??
    This is the error I get on the page Item that is an LOV:Error: ORA-01722: invalid number performing List of Values query

    Vikas, I have done this and here are the results:
    .01: S H O W: application="110" page="103" workspace="" request="" session="6865688852817169"
    0.01: Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: NLS: CSV charset=WE8MSWIN1252
    0.02: ...NLS: Set Decimal separator="."
    0.02: ...NLS: Set NLS Group separator=","
    0.02: ...NLS: Set date format="DD-MON-RR"
    0.02: ...Setting session time_zone to dbtimezone
    0.02: NLS: Language=en-us
    0.02: Application 110, Authentication: CUSTOM2, Page Template: 724212235889446
    0.02: ...Supplied session ID can be used
    0.02: ...Application session: 6865688852817169, user=JRP22
    0.02: ...Determine if user "JRP22" workspace "1786101047996118" can develop application "110" in workspace "1786101047996118"
    0.03: Session: Fetch session header information
    <b>0.03: Saving g_arg_names=P103_IP_ID and g_arg_values=077.243
    0.03: ...Session State: Save Item "P103_IP_ID" newValue="077.243" </b<"escape_on_input="N"
    0.03: ...Metadata: Fetch page attributes for application 110, page 103
    0.03: Fetch session state from database
    0.04: Branch point: BEFORE_HEADER
    0.04: Fetch application meta data
    0.04: Authorization Check: "6961000503551770" User: "JRP22" Component: "PAGE"
    0.06: Computation point: BEFORE_HEADER
    <b>0.06: ...Perform computation of item: P103_IP_ID, type=QUERY
    0.06: ...P103_IP_ID=select ip_id from IP where IP = :P103_IP_ID;
    0.06: ...Session State: Saved Item "P103_IP_ID" New Value="32"
    0.06: Processing point: BEFORE_HEADER
    0.06: ...Process "TEST DB INSERT SESSION STATE P103_IP_ID": PLSQL (BEFORE_HEADER) insert into t (col1,col2,tstamp) values ('p395',:p103_ip_id,systimestamp);</b>
    0.08: Show page template header
    0.09: Computation point: AFTER_HEADER
    0.09: Processing point: AFTER_HEADER
    <b>0.09: ...Process "Fetch Row for IP": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:IP:P103_IP_ID:IP_ID
    </b>0.10: ...Process "Fetch DNS_NAME To Buffer": PLSQL (AFTER_HEADER) :P103_DNS_NAME_BUFFER := :P103_DNS_NAME;
    0.11: ...Session State: Save Item "P103_DNS_NAME_BUFFER" newValue="3657" "escape_on_input="N"
    0.11: ...Process "Get Next or Previous Primary Key Value": GET_NEXT_OR_PREV_PK (AFTER_HEADER) #OWNER#:IP:IP_ID::IP::P103_IP_ID:P103_IP_ID_NEXT:P103_IP_ID_PREV::::P103_IP_ID_COUNT:
    0.13: ...Session State: Save Item "P103_IP_ID_NEXT" newValue="33" "escape_on_input="N"
    0.13: ...Session State: Save Item "P103_IP_ID_PREV" newValue="31" "escape_on_input="N"
    0.14: ...Session State: Save Item "P103_IP_ID_COUNT" newValue="32 of 3434" "escape_on_input="N"
    0.14: ...Process "Fetch MAC_ADDRESS": PLSQL (AFTER_HEADER) select mac_address into :P103_MAC_ADDRESS from mac_address where IP_ID = :P103_IP_ID;
    0.15: ...Session State: Save Item "P103_MAC_ADDRESS" newValue="00-16-3G-33-25-33" "escape_on_input="Y"
    0.15: ...Process "Fetch Container_Type": PLSQL (AFTER_HEADER) select container_type into :P103_CONTAINER_TYPE from container_type where container_type_id = :P103_CONTAINER_TYPE_ID;
    0.16: ...Session State: Save Item "P103_CONTAINER_TYPE" newValue="BASE_UNIT" "escape_on_input="Y"
    0.16: ...Process "Populate Hidden Assign value": PLSQL (AFTER_HEADER) :P103_ASSIGNED_BUFFER := :P103_ASSIGNED;
    0.16: ...Session State: Save Item "P103_ASSIGNED_BUFFER" newValue="Y" "escape_on_input="N"
    0.16: Authorization Check: "4769021032313739" User: "JRP22" Component: "tab"
    From Session State after the page has loaded:
    Application Page Item Name Display Item Value Status
    110 103 P103_IP_ID Hidden 32 U
    Vikas: From the debug info you can the value comes in with the the IP ( I have removed the first two octets from the debug information) "Saving g_arg_names=P103_IP_ID and g_arg_values=077.243"
    A few steps later a computation is performed and the IP is chagned to an IP_ID which the value is 32, this is correct at this point.. Following that there is a pl/sql insert of :P103_IP_ID and that value is 32 inside the db table.
    Here is what it looks like on the screen:
    <b>Any ideas why the Select List LOV does not like this value?</b>
    Here is the actual LOV query:
    select dns_name,dns_name_id from dns_name where ip_id = :p103_ip_id
    Message was edited by:
    Justin P

  • Apex bug?  Items being cleared in session state - can't figure out why

    I have an item that is being submitted with a value but is then being overwritten and set to null. I can't see any reason why the submitted value is being overwritten with null.
    I have been debugging this problem for most of the day and can't figure out what is happening and was hoping someone in the forum might be able to shed some light.
    Some details:
    The item is on Page 0, has source type of "PL/SQL Expression or Function", a source expression of "V('REQUEST')", and Source Used = "Always".
    I viewed the HTML source of the rendered page and can see the following HTML, so I know the item has a value when the page is rendered:
    <input type="hidden" id="RENDER_REQUEST" name="p_t08" value="EDIT" />
    I have used Firebug to view the HTTP POST body and can see that p_t08 is being correctly submitted with a value of "EDIT" in the post body.
    When I run the page in debug mode and then view the debug log, I see that Apex is indeed setting this item to null:
         0.01500     0.01600     A C C E P T: Request="WIZ_NEXT"
         0.23400     0.00000     Session State: Save form items and p_arg_values
         0.24900     0.01600     ...Session State: Save "BRANCH_TO_PAGE_ID" - saving same value: ""
         0.24900     0.00000     ...Session State: Save "ROWS_PER_PAGE" - saving same value: ""
         0.26500     0.01500     ...Session State: Save "P0_CLEAR_WS" - saving same value: ""
         0.26500     0.00000     ...Session State: Saved Item "RENDER_REQUEST" New Value=""
    I can't figure out why the item is being set to null.
    This problem also does not occur on every page. The pages in question are a multi-step "wizard" that allows the user to navigate between steps with "Next" and "Previous" buttons. Since this is a page 0 item, it appears on every page in the wizard so I'd expect it to behave the same. When you open the wizard at step 1 and press next to go to step 2, the item (RENDER_REQUEST) is set correctly on step 2 of the wizard, BUT when you then click Next to go to step 3, RENDER_REQUEST is null on step 3. If you open the wizard at step 2 and press Next, RENDER_REQUEST is null on step 3.
    I did find a work around, but it doesn't make any sense why it would work: if I move the RENDER_REQUEST item from the "Footer Items" region to a page level item (by using Edit All and setting its region to blank), then the problem goes away. If I move it back to the "Footer Items" region the problem reoccurs.
    I am working on Application Express 4.0.2.00.07 on Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
    Any help would be greatly appreciated!
    Thank you.

    Hi Patrick,
    Thanks for the quick response. Unfortunately, I can't reproduce this on apex.oracle.com due because the app requires PL/SQL packages to be installed in several schemas, including some that require system grants (I gave a presentation at Oracle Open World a couple of years ago on some of the techniques I used in building this application that you attended; I think the session was called "Building Large Commercial Applications with Oracle Database 11g and Oracle Application Express").
    Is there another way we can work together to debug this without reproducing it apex.oracle.com? For example, if you could send me an instrumented version of the APEX_040000.F procedure (or whatever procedure is clearing the session state) that has some additional APEX_APPLICATION.DEBUG calls, I could install it on my server, reproduce the error and send you the output.
    Thank you,
    Eric

  • Item session state during rendering

    Hi,
    Application Express 4.1.0.00.32
    Page process (before heading) sets session state for several items (Text, Always replacing ..., Static Assignment...) but the values are not persistent.
    Debug shows:
    0.32451     0.00116     ...Session State: Saved Item "P1013_REC_PP" New Value="15"          
    0.32567     0.00104     ...Session State: Saved Item "P1013_TOT_AANT" New Value="1"
    0.32671     0.00111     ...Session State: Saved Item "P1013_CURR_SET" New Value="1"
    0.32783     0.00094     ...Session State: Saved Item "P1013_REC_PP" New Value=""
    0.32877     0.00087     ...Session State: Saved Item "P1013_TOT_AANT" New Value=""
    0.32963     0.00060     ...Session State: Saved Item "P1013_CURR_SET" New Value=""
    Where is the 'second round' (immediately following the actual setting in page process) on setting session state coming from?
    Thanks, Jos

    Resolved,
    Dropped the items and recreated some new ones (with different names) and now its OK.
    The original items were copied from each other and renamed. Maybe this is (still) a bug...
    Jos

  • Saving composition/session state to a server for reloading later

    We are creating an interactive quiz for children of up to 20 questions and loading each question into a quiz controller window but the memory is maxing out on tablets causing the browser to crash after 10 questions.
    Is there a way we can save a browser's session state on the server side (or client-side) so that a user can come back to a question later and continue from where they had previously left? Perhaps cloning part of the sym object and saving it as a json array?
    Thanks

    We are creating an interactive quiz for children of up to 20 questions and loading each question into a quiz controller window but the memory is maxing out on tablets causing the browser to crash after 10 questions.
    Is there a way we can save a browser's session state on the server side (or client-side) so that a user can come back to a question later and continue from where they had previously left? Perhaps cloning part of the sym object and saving it as a json array?
    Thanks

  • ADF client-side state saving

    <p>Hi, I'm developing JSF with ADF and MyFaces. I want to minimise the load on my Server, e.g. by minimising use of session beans and other types of session storage. So I use the <t:saveState> from MyFaces instead. In web.xml I set the parameter:</p>
    <p>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    </p>
    <p>This makes all the MyFaces components store state on the client. However, this still doesn't force the ADF components to use client-side state saving(!). As described here, the default behaviour in ADF is to use a session token to store page state in HttpSession. In my project I've seen all sorts of strange behaviour when the session token exceeds the number of CLIENT_STATE_MAX_TOKENS. Of course I can try to increase this value, but this will lead to even more sesison usage. </p>
    <p>So, I tried setting another parameter in web.xml:</p>
    <p>
    <context-param>
    <param-name>oracle.adf.view.faces.CLIENT_STATE_METHOD</param-name>
    <param-value>all</param-value>
    </context-param>
    <p>
    <p>This should force all state to be moved to the client in a hidden form field. But when I do this I get this type of error:</p>
    <p>
    2006-10-25 13:21:30,854 ERROR (taglib.core.ViewTag:181) - Error writing body content
    java.io.NotSerializableException: oracle.adf.view.faces.component.core.input.CoreSelectOneChoice
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
    at java.util.ArrayList.writeObject(ArrayList.java:569)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
    at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
    at oracle.adfinternal.view.faces.renderkit.core.CoreResponseStateManager.writeState(CoreResponseStateManager.java:82)
    at org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspStateManagerImpl.java:430)
    at oracle.adfinternal.view.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:241)
    at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:145)
    at org.apache.jsp.pages.innkurv.innkurvMain_jsp._jspx_meth_f_view_0(innkurvMain_jsp.java:152)
    at org.apache.jsp.pages.innkurv.innkurvMain_jsp._jspService(innkurvMain_jsp.java:91)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
    at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
    at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
    at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at no.justisdepartementet.etterlysning.web.util.ContextResourceFilter.doFilter(ContextResourceFilter.java:69)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at no.justisdepartementet.etterlysning.web.util.RedirectFilter.doFilter(RedirectFilter.java:59)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:595)
    </p>

    <p>Thanks guys. I did indeed try to use <t:saveState> to save the CoreSelectOneChoice. More specifically, I tried to use <t:saveState> on a backing bean where one of its properties were a CoreSelectOneChoice. The backing bean itself needs to be serializable as well as all of its properties, so the solution is to set the local variable transient.</p>
    <p>After overcoming this problem, however, I found that some of my managed beans still had serialization problems because they had references to "service managers" that were dependency injected via JSF's managed means facility. See this blog for a discussion about serialization and MyFaces.
    </p>

  • ADF Client State Saving

    I have a doubt about client state saving and ADF Faces Components/JSF.
    In my scenario, i have a hardware load balancer in front of two weblogic standard servers. The load balance is configured without affinity.
    The client token generated by the server hitted for the first roundtrip is not readable by the other server on a second roundtrip. I think because each server generates a different hash key. So when the load balancer forwards the client request to the other server in the webfarm, an error occurs because the server can not read the token.
    In .NET, we have a machineKey Attribute configurable in machine.config that let me configure the same hash key in both servers. In this way both servers can read the client token generated from each other.
    Is there something similar in ADF Faces/Weblogic scenario?
    Or ADF Faces Components can be fully stateless?

    John, in my scenario I am looking for scalability and high availability.
    Affinity does not provide high availability to users connected to a server in case of server's outage.
    Client state method setted to All does not fit in my scenario because the page is much complex and a large quantity of data would have to be stored in the client view state causing client slowdown and much network traffic overhead during roundtrips.
    So, or i use client state method setted to token and i be able to generate and read the same token by different servers in the webfarm (and store the session in JDBC persistent store) or i use ADF Faces in a complete stateless manner (nor state at client side neither at server side).
    My doubts are:
    - Is possible to generate and read the same client state token in different servers in a webfarm (http session stored in JDBC) like in ASP.NET through machineKey settings in machine.config?
    - Is possible to use ADF Faces Components in a complete stateless manner without having to store state at client side or server side to achive scalability?
    Best regards

  • Saving session state during pagination

    See
    http://htmldb.oracle.com/pls/otn/f?p=24317:152
    I hacked into the PPR function to save the checkbox value into session state during pagination.
    Is there a way to do something similar for checkboxes in the report itself rendered using htmldb_item.checkbox()?
    Or is this an ill-advised effort?
    [The UI requirement here is clear...I have a bunch of items over many pages and I want to select them using checkboxes and have the selections remembered as I paginate back and forth.
    If you use Yahoo Mail, Compose a new message, click on the Insert Addresses link and it pops up a window with all your contacts, you can select them using checkboxes and go to the Next/Previous page and it remembers the selections]
    Thanks

    See
    http://htmldb.oracle.com/pls/otn/f?p=24317:152
    Click on the Create/Reset collection button to initialize your own private collection to play with.
    The checkboxes are remembered as you paginate thru the resultset. Basically, the state of the checkboxes is saved into session state using htmldb_Get before calling the PPR function to get the next/previous rows.
    Carl, let me know what you think of the approach. Is it a viable approach? Any caveats?
    [Unfortunately, I had to to make a copy of the builtin html_PPR_Report_Page function to make the above modification in it, didnt see a way to avoid it]
    Thanks

  • JSF 1.0 - client side state saving fails

    Existing screen worked fine in Beta with client-side state saving. Fails in 1.0 Release with:
    java.lang.NullPointerException
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:997)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1022)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1008)
         at com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:273)
         at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:186)
         at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:239)
         at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    This exception is found in tomcat log. Nothing found in debug log. I switched state saving to server and screen works, however, I need the application to work with client state saving.
    Some screens in application work with client state saving. Some don't. All those that fail have the same exception as above.
    Any ideas?

    Hello
    I have the same problem but i am not using any verbatim tag in my case the problem only appears when i am using two custom validators for a inputtexd in the same page .
    the problem is solved using the server saving method but i want to use client saving method.
    If you have any ideas please help .
    this is the exeption :
    java.lang.NullPointerException     at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1004)     at com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:352)     at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:240)     at com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:228)     at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     at java.lang.Thread.run(Thread.java:534)
    thanks
    yinbr
    Message was edited by:
    yinbr

  • Bug with h:messages and client state saving?

    I have an application that uses <h:messages ...> to display validation/conversion errors on the page. I find that when I use "client" for my javax.faces.STATE_SAVING_METHOD, the messages completely destroy the display of the web page - HTML seems to be randomly cut off. Using the "server" state saving method solves the problem. Has anyone else seen this behavior? I can duplicate it easily.
    Thanks,
    Don

    Can you provide us with the jsp page you are using? I do not immediately
    see the probem you are encountering.
    Thanks,
    --roger (jsf co-spec lead)                                                                                                                                                                                                                                                                                                   

  • JSF client side state saving

    I know the following thing
    **When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
    so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
    <f:view>
            <h1>Hello World!</h1>
            <h:form>
               <h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
            </h:inputText>
           <h:outputText value="rakeshggh" />
           <h:commandButton action="test" value="submit" />
           </h:form>
            </f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />
    but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
    client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
    be great if someone throws light on this I would appreciate it !!!

    rocky_nirvana wrote:
    **When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
    so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
    <f:view>
    <h1>Hello World!</h1>
    <h:form>
    <h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
    </h:inputText>
    <h:outputText value="rakeshggh" />
    <h:commandButton action="test" value="submit" />
    </h:form>
    </f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
    <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />This is by the way only applicable if you have set view state saving to the Client Side.
    but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
    client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
    be great if someone throws light on this I would appreciate it !!!As GET requests are idempotent, JSF can just reproduce the same view at the server side.

Maybe you are looking for

  • Problem ipod shuffle 4 gen. 2 Gb

    HI a few months ago my device ipod shuffle 2GB gives me problems on January 4,after about twenty minutes of sound crashes and not start again, to rehabilitate Iconnect it to iTunes. Another problem is that the green light sometimes it works sometimes

  • Runtime Error: "Time out" for RFC.

    Hi,   During RFC, I am getting a runtime error stating "Timeout error".  Even while the job is run in background I am getting this error. Seems like the time for RFC task is set to 600 secs. How to resolve this and is there any way we can see time li

  • Coloring a column in APEX

    Hi, How do we set the background color of a column in a report? I have four columns in the table and I want to display the data of each column with different color. Can you help? regards VJ

  • Query or Loop

    Hi, I need help or suggestions in writing a pl/sql loop query against the data in Table A in order to get the output of Table B. Table A                id     type     valu      1     a     x      1     a     y      1     a     x      1     b     3  

  • Difference between 4.6 and 4.7 vesion in MM point of view

    Hai, can any body tell me the difference between 4.6 and 4.7 version. Please treat it as Urgent