Set Session State with Shuttle items

Is it possible to have session state set with each item selected in a shuttle? You have a shuttle with 4 possible options, you select item 2 from the left portion of shuttle and it is moved to the right.. Can you set the session state at that point?
What I am trying to do is take the session state after change in the control and use it to populate a text field below. The returned values are used in a sql select to populate the text box with a looked up value...
Thank you,
Tony Miller
Ruckersville, VA

TexasApexDeveloper wrote:
Won't this just push the last items value in, as apposed to appending the value?
Tony,
No. Because for shuttle items the return value is stored as colon delimited string.
Means after each change you will have a colon delimited string in the session state with selected values(moved to right).
See this http://apex.oracle.com/pls/apex/f?p=46417:47

Similar Messages

  • NEWBIE: Submit Page to set session state

    I have a form that displays various items to include Popup LOVs (dynamic; based on session variables). If the user displays a page, the session state is not yet set so the Popup LOVs don't function correctly (until the user presses the Apply Changes button to submit the page). Can I automatically submit the page or set session state for those items used in the LOVs on page load? Note that I'm not too familiar with the use of javascript. I'm using Application Express version 2.0

    Yes, I discovered that! Thanks for responding, though. I basically run a process (PL/SQL) under page rendering section that looks like:
    begin
    htmldb_util.set_session_state('P10_MACHINE_TYPE','&P10_MACHINE_TYPE.');
    end;
    Thanks!

  • Session state of page item different from one region to another region

    hi,
    on one particular page I have two regions. A page item (LOV pop-up) is set in the first region. I leave this region with a button and jump back with a branch to the same page. The page item has now the selected value (as is shown by session state window). So far so good.
    The second region (SQL query type) uses this page item. However, for some reason the page item is NULL in that second region.
    Can anyone explain this behavior ?
    ron

    thanks Joel,
    I did already what you suggested. The title in region 2 is evaluated to the same value as in region 1.
    The SQL query (that actually runned with identical syntax before) is:
    select bla from blatable where bla = :P920_RU
    this generates:
    report error:
    ORA-12801: error signaled in parallel query server P000
    ORA-01741: illegal zero-length identifier
    So apperently the bind variable is evaluted to (or cached as) NULL.
    I noticed something strange in the session window. There are several page items in the application. All of them are listed in the 'Session State' region. The page item that makes problems is the only one that is also listed in the 'Page Items' region. It is even listed when I start the session window from another page. Weird.
    any other ideas ?
    Actually, how could you possibly clear session state between rendering two regions ?
    Ron

  • Setting session state post-authentication

    Hi all,
    This application uses DATABASE ACCOUNT authentication, and has a post-authentication process that sets a few application items using code such as
    apex_util.set_session_state('F_MY_ITEM', v_my_value);These items are used to secure certain tab options within the application.
    The post-authentication PL/SQL works fine, I can't see anything wrong the the logic. I've debugged it and I know the values are being set. I'm checking the value of session state straight after using v('F_MY_ITEM'), along with checking my session ID matches up - everything seems ok there.
    The issue is that when I log in, the session state is not set for those items - even though the post-auth process is called with no errors raised. Apex debug states
    ... Session State: Save "MY_ITEM" - saving same value "Y"If I log out, then log in (without closing browser tab), the values are now set as expected (visual confirmation using conditionally displayed tabs, and of course checking session state from developer toolbar)
    Notably, Debug states something slightly different
    ... Session State: Save item "MY_ITEM" newValue="Y" escape_on_input="Y"There are a few other differences with the debug output, this this seems the most pertinent.
    The only difference I've been able to track down is if I'm logged into the application builder in the same browser.
    If I attempt to log in with a freshly opened browser, navigate directly to application URL, the behaviour works as expected. Tabs appear as if items are set.
    Could the fact I'm authenticated in the application builder be messing with session state behaviour?
    This is with Apex 4.0.2.00.07; agnostic to browser (IE/FF/Chrome); 11gr2
    Cheers,
    Scott

    I did consider this because I experienced the same thing with page processes.
    However, in this case my post-auth function is within a package and I don't use bind variables.
    I was essentially doing this in my package:
    apex_util.set_session_state('F_MY_ITEM', 'Y');
    my_log_proc(v('F_MY_ITEM'));And seeing Y in the debug log, yet once on my home page, viewing session state I see F_MY_ITEM as empty - unless in the scenario I described.
    It's not a showstopper since the users won't be logged in to the application builder, but it would be nice to know the cause.

  • Can't Set Session State from the Login Page

    I have a dilema. On the standard login page I enter values in 2 fields namely, CAMPUS (Select List) and USERNAME (text field).
    After clicking on the login button I want to navigate to PAGE 1 and use the values of CAMPUS and USERNAME to filter data. I have created two APPLICATION Level items (A_USERNAME,A_CAMPUS) to which I assign the values of USERNAME and CAMPUS in two AFTER SUBMIT computations on the login page.
    When I arrive on PAGE 1 the session state values of A_USERNAME,A_CAMPUS are still both null therefore the query returns null. It seems that the login process does not issue a SUBMIT for session state to be saved. How do I save the values in session state on login?
    In the Login PROCESS, can I specify the Page 1 items to be set and the values to set them in a URL somewhere? Is it here?
    wwv_flow_custom_auth_std.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_FLOW_PAGE => :APP_ID||':1' <<========here?
    If so what is the correct syntax?
    If I revisit the login page a second time, a submit is issued and the values are set in session state.
    Anyone got any ideas??
    I tried creating a standard position button which issues a submit but this didn't work either.
    regards
    Paul J Platt

    Unfortunately your solution is causing problems with retrieving cookies that I try to get for the campus and username during a "Before Header Process" as well. The cookies are normally set on an "After Submit" process. When I return to the login page I get
    Error ERR-1029 Unable to store session info. session=10760914996048113736 item=8561939526127479
    ORA-02291: integrity constraint (FLOWS_010600.WWV_FLOW_DATA_FK) violated - parent key not found
    But if I turn the cookies off, it seems to work OK.
    regards
    Paul JP

  • Application Express - setting session state.

    I'm a relative newbie to APEX and am trying to set up and populate an application item into session state so that I can then have the value handy throughout the entire session and over all pages of the application. I've defined the item as FPC_Number in page Zero and have also set up a region in Page Zero where the FPC Number will be displayed across all pages of the application. It will not have a value until the user explicitly selects one from a drop down menu, so initially the value will be null. I'm having issues assigning the value. The value will not be assigned during the page rendering phase but at the page processing phase, correct? I have a computation set up as 'begin
    APEX_UTIL.SET_SESSION_STATE('F101_PROJECT_NUMBER',V('P14_PROJECT_NUMBER')); end; '. Does this look right? I get the error: PLS-00103 when I try to execute this. Any ideas?
    Update: I have deleted the calculation and am using a process only. I no longer get the PLS-00103 error message but still no value is displayed in Session_state.
    Edited by: V Rickert on Feb 26, 2013 7:38 AM

    V Rickert wrote:
    I'm a relative newbie to APEX and am trying to set up and populate an application item into session state so that I can then have the value handy throughout the entire session and over all pages of the application. I've defined the item as FPC_Number in page Zero and have also set up a region in Page Zero where the FPC Number will be displayed across all pages of the application. It will not have a value until the user explicitly selects one from a drop down menu, so initially the value will be null. I'm having issues assigning the value. The value will not be assigned during the page rendering phase but at the page processing phase, correct? I have a computation set up as 'begin
    APEX_UTIL.SET_SESSION_STATE('F101_PROJECT_NUMBER',V('P14_PROJECT_NUMBER')); end; '. Does this look right? I get the error: PLS-00103 when I try to execute this. Any ideas?
    Update: I have deleted the calculation and am using a process only. I no longer get the PLS-00103 error message but still no value is displayed in Session_state.APEX version?
    What type of item is "FPC_Number in page Zero"?
    Where is this process and when does it run?
    You said "I've defined the item as FPC_Number in page Zero", but the process is setting the value of F101_PROJECT_NUMBER&mdash;which looks like an application item&mdash;rather than "FPC_Number in page Zero".

  • Session state updated but items aren't

    Hi guys,
    I have some user contact form where you enter the idea then on focusout it calls a process to see if that user already exists.
    If the user exists the session state items are set to the relevent values (email, name). If doesn't exist they're set to null.
    The session states are changing as desired but the items (text fields) remain empty. Anyone know how to change this from the JS?
    JS:
    $("#P15_USER").focusout(function() {
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=PULL_DATA',15);
        get.add('P15_USER', $("#P15_USER").val());
        var results = get.get();
    $('#P15_EMAIL').val($v('P15_EMAIL'));   
    PULL_DATA process:
    SELECT COUNT(*) INTO :P_COUNTER FROM password_users
    WHERE USERNAME = :P15_USER;
    IF :P_COUNTER > 0 THEN
    SELECT EMAIL, FIRST_NAME, LAST_NAME
    INTO :P15_EMAIL, :P15_FIRST_NAME, :P15_LAST_NAME
    FROM password_users
    WHERE USERNAME = :P15_USER;
    ELSE
    SELECT NULL, NULL, NULL
    INTO :P15_EMAIL, :P15_FIRST_NAME, :P15_LAST_NAME
    FROM DUAL;
    END IF;

    Hi,
    Your on demand need "print" return value.
    Use e.g. htp.prn. Then you get respond in JavaScript to your "results" variable.
    var results = get.get();
    $s('P15_EMAIL,result);
    BTW, If you are on APEX 4.x your should convert your code to dynamic action.
    Regards,
    Jari

  • Tags Plugin Incompatible With Shuttle Item

    I installed the Learning Library (http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r41/inst_pkgapp/inst_pkgapp.htm) and found that the Tag plugin is incompatible with the Shuttle Item. Page 17 contains both and the shuttle item does not function. It will not shuttle any items. If I remove disable the Tags item (which is of Tags Plugin type) the shuttle works as expected. I looked around for information on this plugin but did not locate it on http://www.apex-plugin.com/search-plugin-directory. I'd like to keep if but I definitely need the shuttle item working so I may just go with a text item for the Tags field.
    Any ideas?
    Thanks,
    Jason

    This error should only appear when you use a list-item with the list-type set to combobox. A combobox in forms is a listitem where you can also enter your own text. If you nly need a dropdown list, set the liststyle to poplist. This works also without patching. if you really need the combobox, patch.

  • 4.2 select list on mobile page not setting session state

    Hi,
    Like I've done dozens of times in the past, I created a Select list that submits on change, and I expected session state to be updated accordingly.
    I tried this on a mobile page but session state is not updated for the item.
    Has anyone else experienced this?
    Scott

    Hi Scott,
    is it possible that you are hitting bug# 14680379 - PAGE SUBMIT ACTIONS DO NOT WORK FOR LONGER MOBILE SELECT LISTS, WHEN DEFINED TO FIRE WHEN THE SELECT LIST VALUE CHANGES
    on our Known Issues List http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-42-known-issues-1863578.html ?
    Is your select list selection displayed as native control or as popup? Can you create a test case on apex.oracle.com?
    Thanks
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Compare Old Value (Session State) with New Value on Submit.

    Hi all,
    Is there an easy way to do comparison of Old Value (Session State Value) with the New Value?
    is there an API for that? like what we have in PLSQL Trigger :NEW & :OLD
    Thanks before
    -Joel

    There is only one version of session state available for examination at any point during page rendering or processing, the current version. Can you explain more about what you need?
    Scott

  • Replicated session state with WLS 5.1 sp 6 in cluster

              Hello, i've seen in BEA documentation this:
              Applications Using Frames Must Coordinate Session Access
              If you are designing a web application that utilizes multiple frames, keep in mind
              that there is no synchronization of requests made by frames in a given frameset.
              For example, it is possible for multiple frames in a frameset to create multiple
              sessions on behalf of the client application, even though the client should logically
              create only a single session.
              In a clustered environment, poor coordination of frame requests can cause unexpected
              application behavior. For example, multiple frame requests can "reset" the application's
              association with a clustered instance, because the proxy plug-in treats each request
              independently. It is also possible for an application to corrupt session data by
              modifying the same session attribute via multiple frames in a frameset.
              To avoid unexpected application behavior, always use careful planning when accessing
              session data with frames. You can apply one of the following general rules to avoid
              common problems:
              ·     In a given frameset, ensure that only one frame creates and modifies session data.
              ·     Always create the session in a frame of the first frameset your application uses
              (for example, create the session in the first HTML page that is visited). After the
              session has been created, access the session data only in framesets other than the
              first frameset.
              My environment is clustered(multi-tier) and jsp and servlets use frameset, could
              you explane this?
              I don't understand very well
              Thanks and regards
              Fabio
              

              Thanks for you suggest!
              Fabio
              "Mike Reiche" <[email protected]> wrote:
              >
              >It means that all the jsps executed from the same browser use the same
              >httpsession
              >- so be aware of it.
              >
              >If the jsp in the first frame does ---
              >
              > httpSession.put("MYNAME", "GOODVALUE");
              >
              >and the jsp the second frame does ....
              >
              > httpSession.put("MYNAME", "BADVALUE");
              >
              >then the jsp in the first frame does ...
              >
              > value = httpSession.get("MYNAME");
              >
              >You might get "GOODVALUE" or you might get "BADVALUE" since both
              >JSPs execute concurrently without synchronization and they both store
              >something under
              >the same key in the same httpSession.
              >
              >Mike
              >
              >"Fabio Rossi" <[email protected]> wrote:
              >>
              >>Hello, i've seen in BEA documentation this:
              >>
              >>Applications Using Frames Must Coordinate Session Access
              >>
              >>If you are designing a web application that utilizes multiple frames,
              >keep
              >>in mind
              >>that there is no synchronization of requests made by frames in a given
              >frameset.
              >>For example, it is possible for multiple frames in a frameset to create
              >>multiple
              >>sessions on behalf of the client application, even though the client
              >should
              >>logically
              >>create only a single session.
              >>In a clustered environment, poor coordination of frame requests can
              >cause
              >>unexpected
              >>application behavior. For example, multiple frame requests can "reset"
              >the
              >>application's
              >>association with a clustered instance, because the proxy plug-in treats
              >>each request
              >>independently. It is also possible for an application to corrupt session
              >>data by
              >>modifying the same session attribute via multiple frames in a frameset.
              >>To avoid unexpected application behavior, always use careful planning
              >when
              >>accessing
              >>session data with frames. You can apply one of the following general
              >rules
              >>to avoid
              >>common problems:
              >>·     In a given frameset, ensure that only one frame creates and modifies
              >session
              >>data.
              >>
              >>·     Always create the session in a frame of the first frameset your application
              >>uses
              >>(for example, create the session in the first HTML page that is visited).
              >>After the
              >>session has been created, access the session data only in framesets
              >other
              >>than the
              >>first frameset.
              >>
              >>My environment is clustered(multi-tier) and jsp and servlets use frameset,
              >>could
              >>you explane this?
              >>I don't understand very well
              >>
              >>Thanks and regards
              >>Fabio
              >>
              >
              

  • Can I use my javascript to change the session state of an item?

    All,
    I currently have a page that has two regions: a report and a checkbox region. The checkbox region is full of checkboxes that are tied to each column in the report. I have javascript in the page HTML header that hides/displays the report column when they click the corresponding checkbox. The hiding and displaying columns works just fine.
    Here is my problem: my users need to export the report (with some columns hidden) as a CSV file. Unfortunately, the javascript function I use to hide/show the columns does not change the session value of the checkbox region and thus, APEX does not 'know' that some columns have been hidden. Because of this, APEX exports ALL columns.
    Can I add an onChange to my javascript that each time the user checks/unchecks a box, it adds/removes that item from the checkbox region's session value?
    Thanks!
    BoilerUP
    P.S. I do not want to submit the page - I would like for this to be done on the fly, just like the columns hiding/appearing with the javascript. Thanks!
    Message was edited by:
    BoilerUP

    Ok, I still cannot get this to work. I keep getting a javascript page error (yellow exclamation icon in I.E.) I have the following code in the HTML header:
    <script language="JavaScript" type="text/javascript">
    function va_GetCheckboxes(pName)
    var d=document;
    var l_return = "";
    var inputs=d.body.getElementsByTagName('INPUT');
    var l_el;
    for (var j=0;j<inputs.length;j++) {
         l_el = inputs[j];
         if (l_el.type=="checkbox" && l_el.name && l_el.name==pName
             && l_el.checked) {
                l_return += ":" + l_el.value;
    return l_return.substring(1);
    </script>I also have the following code in the HTML Form Element Attributes section for the checkbox item:
    onclick="html_HideBasedOnCheckBox(this,this.value);set_Some_Item('P2_COLUMN_HIDE_CHECKBOXES',that_string)"Do I need to replace "that_string" with something or is there something else that I'm doing wrong?

  • Unable set session attribute with certain types.

    Hello I was surprise that when I execute HttpSession.setAttribute("somekey", new HashMap()), "somekey" will not be stored in the Session. I can replace HashMap with HashSet and it's okay.
              Out of curiosity, I create a Java class like below :
              public class abc implements Serializable {
              public String def = "def";
              And I have the same issue with HashMap and it will not get stored in the Session attribute. Does anyone know what kind of valid object and what makes the object storable into the Session's attribute? Any inputs are appreciated. Thanks.
              yien

    Actually never mind. It have something to do with BEA's Portal Ad services. I will post this into the appropriate forum.

  • Mouse state with menu items overlapping control

    Hi,
    I have an issue with retrieving the mouse location using GetGraphCoordsFromPoint...
    I am using the return status of GetGraphCoordsFromPoint to determine if the mouse cursor is above the plot area of my graph control (1) or not (0) in order to switch between the mouse styles (VAL_DEFAULT_CURSOR versus VAL_CROSS_HAIR_CURSOR).
    It works in most cases...
    On top of the panel there is a menu bar, located below is the xy graph. Now, if the mouse opens a menu and is over the menu (and also over the graph) the mouse style depends on mouse history:
    If the mouse has always been located over the menu, it is not recognized by GetGraphCoordsFromPoint to be loacted over the graph - which is what I would like to see, in this case the cursor style still is the default style.
    Now, if the mouse leaves the menu for a short distance, the menu does not disappear (only if the mouse is at a larger distance) and acccordingly GetGraphCoordsFromPoint realizes that the mouse is over the graph. This is correct and as expected, too.(the mouse style is changed to a cross hair then)
    Now, if I move the mouse back over the menu, this is not recognized by GetGraphCoordsFromPoint, unfortunately, and the mouse style is not switched back to default.
    Am I missing something, or is there a way to correct this behavior? Having different mouse styles over a menu is confusing for the user and I'd like to avoid that, of course
    Thanks....
    Solved!
    Go to Solution.

    Hi Wolfgang,
    There isn't a very good way to get around this problem. As you've found, panel move events are sent to the panel's callback even while a menu is being tracked, and when you change the mouse cursor this this also impacts any menu that might be active at the time.
    If you don't mind the cursor not changing at all while the menu is active, even if the user moves over the graph, then there is a possible strategy you can pursue to remedy the situation. It consists of trying to detect when a menu is active so that you don't try to change the cursor while the menu is active. Unfortunately, this is easier said than done. Although it's straightforward to be notified whenever a new menu becomes active (via a menu dimmer callback) there is no good way to be notified when the menu goes away. And there are multiple ways in which it can go away. So it it not possible for you to set an internal flag that tracks when the menu is active.
    However, it is possible to find out whether the menu is active at the time that you receive the panel move event (or in the timer tick event, although I'm not completely sure why you are also using a timer). You can't do it with the CVI UI library, but you can, using the Windows SDK, in a somewhat round-about way.
    The idea is to find out which window is the topmost window. And if it is not the panel window, then you should be able to assume that a menu is active and thus refrain from changing the cursor. Note that you also have to make sure that the active window belongs to your process, since there could be any number of other windows that could be the "topmost" window at any one time. But if it belongs to your process and it is not your panel, then we can assume that it's the menu.
    I did a quick test with the following code and it seems to work, although you might want to test it more thoroughly than I did:
    topHwnd = GetTopWindow (NULL);
    GetWindowModuleFileName (topHwnd, topHwndModule, MAX_PATHNAME_LEN);
    GetPanelAttribute (panel, ATTR_SYSTEM_WINDOW_HANDLE, (intptr_t *)&panelHwnd);
    GetWindowModuleFileName (panelHwnd, panelHwndModule, MAX_PATHNAME_LEN);
    if (!strcmp (topHwndModule, panelHwndModule) && panelHwnd != topHwnd)
        return 0; // don't change the cursor unless the panel really is on top
    Good luck,
    Luis

  • 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

Maybe you are looking for