Alpha Video Training
Results 1 to 5 of 5

Thread: Problem with SESSION Show/Hide

  1. #1
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    313

    Default Problem with SESSION Show/Hide

    Hello,

    Looking for some help in a grid to show/hide a Tab Pane using a published session variable.
    As you see in the photo I'm testing my result from the Session variable and it works correctly, however when using it to show/Hide the tab it does not read true.
    Any help?

    Alpha1.JPG

  2. #2
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,121

    Default Re: Problem with SESSION Show/Hide

    when is the session variable being set? that may be a clue, timing is everything...
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  3. #3
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    313

    Default Re: Problem with SESSION Show/Hide

    Thanks Charles upon logging in the users are redirected to an A5 page then sent on to the Tabbed UI.

    What is strange I use SESSION Variables throughout my Tabbed UI without a problem, even in the Photo I shown it does recognize the Session user's name.

    Unless you mean something else?


    Code:
    dim session.ShortName as c 
    
    
    CN = filename_from_alias("C:\Users\Administrator\Documents\Old_Alpha\Shipment_Database\users.DBF")
    filter = "email = '"+ a5ws_getcurrentuser()+ "'"
    result = "firstname"
    session.CurrentUserName = lookup(cn,filter,result)
    
    session.UserID = a5ws_getcurrentuser()

  4. #4
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,121

    Default Re: Problem with SESSION Show/Hide

    Ok, so I think the embedded component in the tabbed ui may need to have the session variable "set" again in the on dialog init assuming it's being loaded onclick via a button. You may be able to define it at the component level OR the argument bindings (in the component definition) in the tabbedUI - I think as I said the timing of the drawing of the parts of the component may be happening prior to the session variable being set in the component. Even a millisecond may count.
    IF that doesn't work, you may want to write some javascript to hide it client side in the component.

    Now, if there is no component and this is a tab pane in the tabbedUI I am pretty sure that it is server-side which would mean you may want to put that same code in the onTabbedUIInitialize event to set the session var since they are already logged in. Similar solution though either way. Even though a lot of people follow that same method, I always set the session vars loading with every component, and send users to the login page if it doesn't exist with a value. Seems to work best that way and it is a single callback so it doesn't seem to be too much trouble to just do it.
    NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

  5. #5
    Member
    Real Name
    John Mucci
    Join Date
    Nov 2010
    Location
    New York
    Posts
    313

    Default Re: Problem with SESSION Show/Hide

    Got it I will give it a try thanks.
    John

Similar Threads

  1. Show/Hide linked grid using session variable
    By rjackson@arach.net.au in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 09-02-2017, 06:03 AM
  2. Publish Session Variable and hide/show buttons
    By gregincolumbus in forum Application Server Version 11 - Web/Browser Applications
    Replies: 23
    Last Post: 01-09-2013, 09:19 PM
  3. show/hide expression and a session variable - does it only get 'published' once?
    By workaholic06 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 11-28-2010, 05:33 PM
  4. Session variable and Show/Hide expression
    By kdankwah in forum Application Server Version 10 - Web/Browser Applications
    Replies: 25
    Last Post: 07-31-2010, 10:26 AM
  5. Show/Hide in Dialog based on session variable
    By Tommy Thompson in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 09-19-2008, 06:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •