Topic: Page Load - is this doable?

I searched for this in the forum but couldn't find anything...except others facing the same issue (in other forums)...
Here is the problem:
My website will get users directed from a gateway which already authenticated them (two factor etc..). Their authenticated ID will be in the HTTP header I get for each request...so far so good...
The first thing I want to do is instantiate a user object that stores their userID in the HTTP header. So, (in 'kinda' psuedo code), here is what I want to do:
if (!user.isauthenticated()) {
- extract the authenticated ID from the http header.
- store the ID in the user object.
- user.setAuthenticated(true)
- Display - "Welcome User" Page
But, as a newbie to JSF, I can't figure out how to execute a type of "page load" which calls this type of function on a bean without any user interaction.
I have thought of:
- in a user constructor: but not sure how to link it.
- index.jsp page which display's the userID using a user.getUserID()
function and times out to another page?
They both look like hacks to me. I am sure many others must have come across this problem before - whats the trick please?
thanks!

I was puzzled in that you asked a SQL Server question in one post and then in another thread asked a Oracle related question... and then I noticed you had cross posted one of your questions at JavaRanch and I was more annoyed....
and then I found this....
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=10&t=002447
You sir -> Michael Byrd -> are scum sucking dirtbag.
To quickly explain. Mr. Byrd posts his messages (which he copies wholesale from other posters) so that he can get better google caching for the website listed in his profile.
This is such scummy behaviour I don't even know what to say. Other than basically everyone that has ever helped you had totally wasted their time.
You are scum. Your company is scum. I hope you rot in hell.

Similar Messages

  • All my content appears on page load - is this Spry related?

    I remember having this issue when using Spry in the past. I changed the padding settings I think, and all the Accordions were open on page load - for only a second - and then closed.
    I'm working with a new site, and the template seemed fine but when I populate, all tabbed-content and a scroller content appear on page load. Then snap shut. Is it related? or a similar issue... I'm pretty desperate to be posting here but I it looks like the same sort of problem I had with Spry... maybe the template has been built with some of the same technology (?)
    http://bit.ly/ptaBVN
    Please help!

    Try this:
    1. Set a class that sets visibiliity to hidden:
    .hideGroup{visibility:hidden;}
    2. Add this class to your content group:
    <div class="SlidingPanelsContentGroup hideGroup">
    3. Add a line to sp_unobtrusive.js to remove this new class
    after the widget made.
    Spry.$$(".SlidingPanelsContentGroup").removeClassName("hideGroup");
    Add that right under the addEventListener lines.
    That should do it.
    Don

  • Black screen appears before a page loads, but this does not happen in IE

    When a page of a website opens, it displays a black screen and then loads that page in Firefox 3.6.11. But the same does not happen in IE. I don't want that black screen to appear on my page.So please provide me with a solution as soon as possible.
    And my page layout also gets distorted when viewed my firefox but not in IE. Please do the needful.

    Thanks for your reply. I tried the same way but there is no option "Use hardware acceleration when available". Is there any other way out from my code or other Firefox settings as the page loads instantly on IE but on Firefox initially a black screen comes and then the whole page gets loaded. This page is built using java applet. Thanks in advance.

  • Now that the "Status Bar" is gone, is there a way to hide the "status notification" (bottom left corner) when a page loads? This is on Windows & FF5/6

    The so called "Status Bar" has apparently gone away since FF4, I'm now onto 6 I think, on my work machine. But one of the things I liked about the Status Bar was that it could be hidden entirely.
    With no Status Bar, now when a page is loaded in FF, you get a floating "Status Notification" in the bottom left corner for a second or two while the page is loading (this even happens in FullScreen F11, something I never had to deal with when the Status Bar existed).
    What I want to know is, is there a way to turn off this "Status Notification" entirely? A setting somewhere? Something in About:config? I haven't been able to find anything.

    1. Install the addon Status 4 evar, which puts the status text back in the status bar: https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
    2. Hide the status bar by right clicking the refresh button and unchecking "Addon bar"

  • Click TOC topic. Topic page loads in TOC frame.

    I've been testing a simple help application. When I select a topic from the table of contents (TOC), the corresponding topic loads in the TOC section. My observations follow:
    Created using Rh 10
    Problem occurs on client running XP Professional SP3, Chrome (latest version - 23.0.1271.97)
    Problem does not occur on same client when using IE8.
    I haven't been able to duplicate the problem elsewhere (i.e., on other systems)
    Any ideas?
    Thank you,
    -bruce.

    Sounds like you're running into the classic Chrome "Security Fix" issue - see grainge.org (google "chrome") to see workarounds

  • Very simple question: Call JavaBean method on page load?

    Someone clicks on a URL that contains parameters like: http://server/page.jsf?param=b
    How do I trigger a JavaBean method to run during page load? I see many JSF examples where JavaBean methods get called during form clicks and that works great but here I want to run code on page load.
    This must be really simple; sorry I'm new to this technology.
    Must I use <% ... %> syntax or can I use actual JSF tags or configuration to accomplish this?
    Thanks very much in advance!

    Putting a lot of logic in getter( ) function is not the best idea considering that getter( ) could be called all over the place. Using constructor for same purpose is also a bad idea especially with request scope beans. This could also happen many times at different stages. You are right, having a page load concept could be useful. Unfortunately JSF framework does not support. You could architect around it in case desperate. Or if using JSF implementation of certain vendors like IBM, you can take advantage of their implementation that was extended to support pageLoad and postBack events (similar to .NET).
    Many postings on this forum dealt with topic. Feel free to review like this one:
    http://forum.java.sun.com/thread.jspa?forumID=427&threadID=541382

  • How to call a action on page load in jsf

    Hi all,
    i am having a JSF page where i want to display the records from the datatable. I have a method in bean which call database and gets the list of records. If i call this method from a link (action on this link) present on this page i can display the records on this page.
    But i want to display these records at the time of page load only. How we can do this? How to call a action at the time of page load?
    Thanks in adv.

    If i am calling the database class and get the list in constructor only i am able to display list in the datatable on page load. This works fine. But the requirment is that if there are no records in the list display a error page with message-No records found! . But how i can navigate from the constructor to error page?
    Like-
    class MyBeam{
    MyBean{
    private List requestVOList = null;
    MyDao dao = new MyDao() //for fetching list from DB
    List records = dao.getList()  //get list from dao class
    if(records==null)
        //Navigate to error page. How to do this navigation here?
    else
        requestVOList  = records;
    //setter/getters for requestVOList 
    }

  • ADF/JSF page loads when any command button is clicked

    Hello All,
    I am lost in the ADF/JSF page flow (using Jdev 10.1.3). Following are the tags (in order) in my page;
    (WHEN THIS PAGE LOADS, IT GOES TO THE DATABASE TO GET VALUES (for the drop down lists that will appear on the page); THIS SHOULD HAPPEN JUST ONCE AND AT THIS POINT)
    <f:view>
    <afh:body>
    <afh:html>
    <af:form>
    <af:panelpage>
    <f:facet name="contextSwitcher">
    <af:panelHorizontal> has a af:commandLink </af:panelHorizontal>
    </f:facet>
    <f:facet name="messages">
    <af:messages/>
    </f:facet>
    <af:panelform>
    <h:panelGrid columns="2" cellspacing="14">
    has 2 panelgroups (one group has *2 SelectOneChoice lists (that need to be populated by fetching data from database* and the other group has 2 CommandButtons - 'Go' and 'Cancel") (GO BUTTON SETS THE SHOWPANEL() TO TRUE)
    (WHEN GO BUTTON IS CLICKED, THE PAGE GOES TO THE DATABASE (AS IT DID ON PAGE LOAD). *THIS SHOULD NOT BE HAPPENING*. ONLY THE METHOD (action="#{muBean.doWork}" )THAT IS ASSOCIATED WITH GO BUTTON ACTION SHOULD BE CALLED)
    </h:panelGrid>
    <h:panelGrid columns="2" cellspacing="14" rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has 3 inputText fields
    </h:panelGrid>
    <af:table var="someTable" rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has a bunch of af:columns
    </af:table>
    <af:panelHorizontal rendered="#{myBean.showPanel}"> (THIS ONE IS RENDERED WHEN SHOWPANEL() METHOD IS TRUE)
    has 3 af:commandButtons - submit, save, add row
    (WHEN submit or save or add row BUTTON IS CLICKED, THE PAGE KIND OF LOADS AND GOES TO THE DATABASE (AS IT DID ON PAGE LOAD). *THIS SHOULD NOT BE HAPPENING*. ONLY THE METHOD THAT IS ASSOCIATED WITH submit/save/add row BUTTON ACTION SHOULD BE CALLED)
    </af:panelHorizontal
    </af:panelForm>
    </af:panelPage>
    <!-- Footer -->
    <jsp:include page="/pages/includes/footer.jspx"/>
    </af:form>
    <f:verbatim>
    <script type="text/javascript" src="../script/tree.js"></script>
    </f:verbatim>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>
    _*why is it that when the command buttons are clicked, the whole page is loaded? Only the methods associated with the action (action="#{newMapRequestItem.addARow}" ) should be called.*_
    _*IS THERE A WAY TO AVOID THIS WITHOUT USING PARTIAL PAGE RENDERING ?*_
    _*DOES MY TAG NESTING LOOK OK?*_
    Edited by: user12054715 on Mar 24, 2010 12:00 PM

    Can somebody please address this?
    Thanks,

  • Double Page Load on call javascript method

    I have implemented a tree component(which I have the folders). When I clic on the tree I have to expand or close it, so I have implemented a javascript method on clic:
    <af:tree value="#{bindings.OpcionesPadreView1.treeModel}" var="node"
    rowSelection="single" id="t1"
    partialTriggers=":::cbNuevCpta :::dlCfr"
    selectionListener="#{pageFlowScope.GestionDocumentos.buscarDocumentos_SelectionListener}">
    <af:clientListener method="expandTree" type="click"/>
    <f:facet name="nodeStamp">
    <af:outputText value="#{node.Gesdopcach}" id="otOpc"/>
    </f:facet>
    </af:tree>
    <af:table value="#{bindings.ArchivosView.collectionModel}" var="row"
    rows="#{bindings.ArchivosView.rangeSize}"
    rowBandingInterval="0" id="tArch" shortDesc="Documentos"
    partialTriggers=":::dlCfr :::cbOk ::t1"
    disableColumnReordering="true"
    binding="#{pageFlowScope.GestionDocumentos.tarch}">
    </af:table
    I also need a selectionListener on Java, because When I clic on the tree( that are folders), I have to bring the documents according to the folder selected into the table, so I have implemented this:
    public void buscarDocumentos_SelectionListener(SelectionEvent selectionEvent) {
    String codigoOpcion = null;
    RichTree tree = (RichTree)selectionEvent.getSource();
    RowKeySet rowKeySet = selectionEvent.getAddedSet();
    Iterator rksIterator = rowKeySet.iterator();
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    CollectionModel collectionModel = (CollectionModel)tree.getValue();
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();
    JUCtrlHierNodeBinding nodeBinding = treeBinding.findNodeByKeyPath(key);
    Object[] atributeValues = nodeBinding.getRow().getAttributeValues();
    codigoOpcion = (String)atributeValues[0];
    Map params = new HashMap();
    params.put("PV_CODREF",codigoOpcion);
    params.put("PV_CODROL", LoginBean.getUser().getRolActual());
    Map permisos = new HashMap();
    permisos.put("PV_CODOPC",codigoOpcion);
    permisos.put("PV_CODROL",LoginBean.getUser().getRolActual());
    executeOperationBinding(EXECUTE_FILES, params);
    executeOperationBinding(EXECUTE_PERMISOS, permisos);
    The problem I have is that when I clic on the folder in the tree, the table is fetching the documents twice(like a doble page load). This doesn't happen when my clientListener is of type "selection", but with "selection" I have problems to close the tree.

    Here is an example, let me know if it needs explanation.
    Private Sub RSWVBAPage_afterPlay()
    Dim doc As HTMLDocument
    Set doc = RSWApp.om.GetTopDocument
    doc.parentWindow.execScript "MyJavascriptFunction();", "javascript"
    Set doc = Nothing
    End Sub

  • OCI bowser generates new session with each page load

    Here is a summary of my problem:
    I am trying to implement the SAP Open Catalog Interface (OCI) with our eCommerce software, but I am having issues with the Web browser that OCI uses.
    Our eCommerce software utilizes the browser session id to identify the user. Our issues is that the OCI browser supplies a new session id with each page load.
    The weird part is that if I open a standard instance of IE, access the site, and then access the site though OCI the same session is shared by both the OCI browser and the IE browser. The OCI browser is now able to maintain the session ID as the user browses the site.
    Thanks.

    Thank you for your quick response.
    I understand that session IDs are always unique, and should only last for as long as the instance of the browser is open.
    What I have seen happen is that the session ID will get recreated with each page load with in a single instance of the OCI browser.
    When the site is opened in OCI it logs the user in, and then redirects them to the homepage. The problem is that the load of the login page, and the load of the homepage have different session IDs. If the user then clicks on a link on the homepage that page load will again have a different page load. This causes the eCommerce system to see them as separate users.
    As I described when I open an instance of IE first it seems to work. This leads me to believe that the OCI browser can read the cookie information, but can't write or create. 
    I am trying to figure out why the OCI browser keeps generating new Session IDs.

  • Fired up my first Azure Website to host some virtual tours... ftp uploading and page loads super slow.

    I upgraded my plan to BASIC... any idea why FTP upload are so slow?  When I go to my pages, they are loading slowly too.

    Hi,
    First, please have a look at this article to see how to use FTP in azure:
    http://blogs.msdn.com/b/kaushal/archive/2014/08/02/microsoft-azure-web-site-connect-to-your-site-via-ftp-and-upload-download-files.aspx, based on your description, the pages loading slowly, this issue only occur in your first time to loading? If yes, I
    think it is normal, If you mean the initial request takes long and then any subsequent requests are fast, then that would be because you are hitting .NET apps cold start. Many .NET apps are slow to JIT and load all their .NET requirements, but once everything
    is loaded, they are fast. If I misunderstanding, please feel free to let me know.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Safari Page Loaded

    I've read others here and have tried the
    "do JavaScript "document.readyState" in document 1" loop.
    The problem is I get a complete return before the page is done. I seem to get it when the connection is made not when the page is completely loaded,
    I'm not up on Java or html but I think it uses a "Active Server Page". It has .aspx? followed by a long line of key numbers.
    Is there a way or different term other than "complete' for the line of java that will make it wait until the page is done. Delay in the script just won't work as the page may take a couple to many seconds to load.
    Any help is greatly appreciated.
    Marshall

    I use this arrangement:
    in the main script - to pause until the page is loaded:
    If my page_loaded(50) ...
    and then the subroutine:
    on pageloaded(timeoutvalue)
    delay 5
    tell application "Safari"
    repeat with i from 1 to the timeout_value
    If (do Javascript "document.readyState"in document 1) is "complete" then return true
    delay 1
    end repeat
    end tell
    return false
    end page_loaded
    This works most of the time, but I have observed problems when my PowerBook is overloaded - or there's heavy network activity - when it seems that the document readystate tests true halfway thru the actual page load. This is for no apparent reason other than these loads and almost seems as though Safari might be 'giving up' and changing the readystate precipitately! You could try testing for "loaded" as well to see if that helps.

  • Show Progress Bar while only on Page Load.

    Hi Experts,
    I want to show progress bar every time when page loads.
    Progress bar is coming on the page. but it is not going off after page is loaded.
    Below is the code which i added for the Progress bar.
    //written on Header Text of Page
    <script type="text/javascript">
    <!--
    function html_Submit_Progress(pThis){
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    //-->
    </script>
    //written on footer text of Page
    <style> #AjaxLoading{padding:5px;font-size:18px;width:200px;text-align:center;left:20%;top:20%;position:absolute;border:0px solid #666;}
    </style>
    <div id="AjaxLoading" style="display:none;"><br /><img src="#APP_IMAGES#progress_bar.gif" id="wait" /></div>
    //called the function Execute on Page Loads 
    html_Submit_Progress(this);Progress bar is continuously showing on the page after page is loaded.
    I want only to show only page loads.
    Please help me .
    Apex Version : Apex 4.1
    DB Version : 10g
    Regards,
    Jitendra

    Hide the loader element when the page has loaded. Put this in the javascript section
    $(document).ready(function(){ $x_Hide('AjaxLoading'); });Or put it in the page load section
    $x_Hide('AjaxLoading');Or create a dynamic action which fires on page load, select a hide action, and use a jQuery selector to target '#AjaxLoading' as an affected element.

  • Constant & erratic "Page Load Error" with Safari and Firefox

    A week or two ago, I started getting constant "Page Load Errors" ('this page cannot be found', etc) when browsing with either Safari or Firefox. These are not dead sites that time out, but are very live (and cannot be summoned no matter how many times refresh)!
    Something is wrong on my computer's end: I have strong wireless, have tried connecting with ethernet, and have used a different network. All of these produce the same result, where about half of the sites I try to connect to are instantly declared as dead by any browser I use.
    I am not using any firewall, and have emptied both browser's caches.
    Any ideas would be greatly appreciated.
    Thanks!
    Cliff

    I'm having the same problem. It only happens at home over my DSL connection. Here is what I have tried and the results.
    This really started bothering me since I upgraded to a recent Macbook Pro. I tried my original MBP with Leopard and found it doing the same thing. I ended up testing from my G4 and it works fine. The problem occurs over wireless and wired. I tried changing my MTU size with no change. I thought it was DNS but changed to other DNS and it didn't make a difference. Happens in Safari and Firefox. I am thinking it has an effect on iTune store also. The problem goes away when I VPN in to work, comes back when I close the VPN.
    Just tonight I installed an clean 10.5 Leopard on my original MBP. Safari works perfectly. Instead of updating to 10.5.6, I download the 10.5.5 update. After updating the problem reappeared.
    Again, my G4 with latest Tiger update work fine and both Macbook Pros with the latest Leopard have a problem over my DLS connection. They work perfectly fine at work and other locations.
    Ted

  • I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my do

    I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my documents

    I just uninstalled it and am waiting for it to reinstall. I sincerely hope that I have not lost everything that I worked on so hard. Now that mobile me is gone, I have not been able to go between devices to transfer things. I was merely trying to take a document I had worked on and open it in pages, but it said my version was too old. When I updated, it wouldn't load. Now I cannot do anything. I hope that the reinstall fixes it without losing everything. Please advise!!! Yes, I am in panic mode.

Maybe you are looking for