Loading page animation while JSF page is being loaded

JSF 2.1
Mojarra 2.1.7
JBoss 7.1.1
The backing bean on my JSF page(s) are view-scoped, and during the initial request, the backing bean's @PostConstructor method may take some time to return as it is calling external systems that are outside of my control. Thus, during the RENDER_RESPONSE phase of the initial request to the JSF page, it may take, on average, 3 to 5 seconds to return ( sometimes longer than that .... which again, is outside of my control ). While this is happening, the page rendered is of course blank as the response has not been written yet.
Naturally, I am thinking of a way to show an animated loading image.
1) I have seen suggestions of using a4j:status and a4j:region, but these are only valid for Ajax requests, while what I need is something that I can use during the initial request ( not a post back ), of a JSF lifecycle.
2) Suggestions of using two HTML divs... one DIV shows the animated image while the other DIV wraps the real content, but is initially hidden. Then use window.onload() to swap the style of the two DIVs so that the DIV wrapping the real content becomes visible while the DIV wrapping the animated image becomes hidden.
But then again ... these DIVs will NOT be written to the response yet as I am still in RENDER_RESPONSE phase.
The only thing that I can think of is to:
3) Create another page whose sole purpose is to show the animated image, then somehow immediately forward the request to the real page. The animated image on the first page will hopefully continue animating until the final page is rendered.
What have you guys done ?

jmsjr wrote:
gimbal2 wrote:
3(alt)) show a view which displays the animation and then triggers the long-loading page to be requested (no forward). The long-loading page does not generate any response until there really is something to show, to keep the animation view visible.
This was the simplest solution by far .. although there are some quirks to be deal with when using IE.As usual :/ It remains a questionable product no matter how many times they reinvent the wheel.

Similar Messages

  • How do I pass input values from a html page to a jsf page

    hi,
    In my project,for front view we have used html pages.how can I get input values from that html page into my jsf page.for back end purpose we have used EJB3.0
    how can I write jsf managed bean for accessing these entities.we have used session facade design pattern and the IDE is netbeans5.5.
    pls,help me,very urgent
    thanx in advance

    Simplest way is to rewrite html page into jsf page.
    You can use session bean in your managed bean like this:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class ManagedBean {
    private Context  ctx;
    private Object res;
    // session bean interface
    private Service service;
              public ManagedBean() {
                try{
                     ctx = new InitialContext();
                     res = ctx.lookup("Service");
                     service = (Service) res;
               catch(Exeption e){
    }Message was edited by:
    m00dy

  • Including a JSP page into a JSF page

    Hi !!
    I have read some posts here about <f:subwview>. There says to use:
    <f:subview>
       <jsp:include page="somepage.jsp"/>
    </f:subview>But it does not work.
    How can i include a jsp page into a JSF page?
    Thanks !!!

    Hi,
    Replace <jsp:include page="somepage.jsp">
    with <%@ include file="datasetView.jspf" %>
    See thread: http://forum.java.sun.com/thread.jspa?messageID=3413354&#3413354

  • ERROR - 1270027 - Cannot proceed while the cube is being loaded.

    Helloo,
    I am getting the following error messages from loading to ASO from MaxL
    ERROR - 1270027 - Cannot proceed while the cube is being loaded.
    ERROR - 1241101 - Unexpected Essbase error 1270027.
    Any Help would be appriciated.
    Thanks
    SJ

    If you initialized a load buffer and your process did not complete or you did not load the buffer or destroy it, then you would get the error. Try destroying the load buffer and try again

  • Loading another jsf page from current jsf page

    Hello,
    I would like to add a button and then write logic to load another jsf page when the button is pressed
    Any sample code can be referenced?
    Thanks

    This is well documented in http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_navigate.htm
    Timo

  • "Errors on page" with simple JSF page

    Hi
    I wrote a very simple JSF page as shown below. It works as is with MyFaces. Now I tried to make it work with Sun RI as well.
    Here's the problem: The page appears perfectly fine (it shows two columns of links). Only one single link works, though: the first one in the left column.
    When I click on that first link, the action handler method ("userClick") is called and executed fine.
    But when I click on any other link, the method is not called at all. All I get is an "error on page" message in the browser status bar. No log message on the command line or log file.
    Am I doing something wrong? With MyFaces it works fine.
    ===============================
    Here's the page:
    ===============================
    <%@ page language="java" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
         <f:loadBundle basename="ca.gc.nrc.iit.eConservatoire.frontend.bundles.MessageBundle" var="bundle" />
         <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
         <html>
              <head>
                   <title><h:outputText value="#{bundle.menu_frame}" /></title>
                   <link rel="stylesheet" href="style.css">
              </head>     
              <body>
                   <h:panelGrid border="1" columns="2" columnClasses="td">
                        <h:dataTable value="#{MenuBackingBean.menuTabItems}" border="0" var="menuTabItem" >
                             <h:column>
                                  <h:form>
                                       <h:commandLink action="#{MenuBackingBean.userClick}" >
                                            <h:outputText value="#{menuTabItem.itemName}" />
                                            <f:param name="itemID" value="#{menuTabItem.itemID}" />
                                       </h:commandLink>
                                  </h:form>
                             </h:column>
                        </h:dataTable>
                        <h:dataTable value="#{MenuBackingBean.menuItems}" border="0" var="menuItem" >
                             <h:column>
                                  <h:form>
                                       <h:commandLink action="#{MenuBackingBean.userClick}" >
                                            <h:outputText value="#{menuItem.itemName}" />
                                            <f:param name="itemID" value="#{menuItem.itemID}" />
                                       </h:commandLink>
                                  </h:form>
                             </h:column>
                        </h:dataTable>
                   </h:panelGrid>
              </body>
         </html>
    </f:view>
    ==================================
    Here's the faces-config
    ==================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config >
         <application>
              <locale-config>
                   <default-locale>en</default-locale>
                   <supported-locale>en</supported-locale>
                   <supported-locale>de</supported-locale>
              </locale-config>
              <message-bundle>ca.gc.nrc.iit.eConservatoire.frontend.bundles.MessageBundle</message-bundle>
         </application>
         <managed-bean>
              <managed-bean-name>DetailsBackingBean</managed-bean-name>
              <managed-bean-class>ca.gc.nrc.iit.eConservatoire.frontend.DetailsBackingBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>MenuBackingBean</managed-bean-name>
              <managed-bean-class>ca.gc.nrc.iit.eConservatoire.frontend.MenuBackingBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>ContentBackingBean</managed-bean-name>
              <managed-bean-class>ca.gc.nrc.iit.eConservatoire.frontend.ContentBackingBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <navigation-rule>
              <from-view-id>/menu.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>showDetails</from-outcome>
                   <to-view-id>/details.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>menu</from-outcome>
                   <to-view-id>/menu.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/details.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>showMenu</from-outcome>
                   <to-view-id>/menu.jsp</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>showContent</from-outcome>
                   <to-view-id>/content.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <navigation-rule>
              <from-view-id>/content.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>showMenu</from-outcome>
                   <to-view-id>/menu.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
    </faces-config>
    =======================================
    I don't think I need to show the backing bean with the userClick() method since the error is that this method is not even called (I added a system.out.println() to this method - which is never executed)
    So the problem must be before
    BTW I am using Sun RI 1.1.01 as shipped with the MyEclipseIDE extensions.
    Thanks a lot for your very much appreciated help
    scrut

    The problem is that you have two forms. Put a single form.

  • Pages quit while using pages plug in

    I can't open anything from Pages.  And get the following :
    Pages quit unexpectedly while using the pages plug in.

    What "pages plug in"? I've never heard of any plug-ins for any version of Pages.

  • Issues when running queries while the cube is being loaded

    What kind of issues can we face if we run queries on a cube when the cube is in the middle of being loaded? Will it show inaccurate date? Will it cause the query to be slow?

    Hi,
    -Until the load is finished and with status OK, you won't be able to see the loaded data (that's the standard behaviour, it can be modified).
    -You can have performance issues, but it will depend on the data volume, the HW of the servers, etc.
    That's why it´s recomended to load data when nobody is using the system, also you should notice that the performance issue is not only in BW, R/3 will also notice a performance decrease because you are making the extraction from there.
    Hope this helps.
    Regards,
    Diego

  • Showing "loading in proress" while a jsp is getting loaded

    dear sir
    i want to show "loading in progress" when i perform an operation like pressing a submit button.while the new jsp page which is taking data from database,is getting loaded i have to show to the user that "loading in progress".iam using jsp,servlrts and mvc architecture.please help me in this case.thanks in advance
    sreenath

    Well my friend always make of habit of construting things by what people normally advice.
    If you could have really throught/understood what balus have adviced you.I believe you could done something like down below.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
              <title>Sample Progress Bar</title>
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
              <meta http-equiv="Pragma" content="no-cache"/>
              <meta http-equiv="Expires" content="-1"/>
        </head>
        <!-- onLoad event would hide the progress bar when the page is rendered completely-->
        <body onLoad="this.document.getElementById('progressBar').style.display = 'none';">
                 <!-- This would intially display the progress bar kind of image until the page is loaded-->
                 <div id="progressBar" style="display:block;text-align:center;"><img src="images/progressBar.gif" align="center"/></div>
        </body>
    </html> Hope this might help you :)
    And a small advice next time make sure you take a step of trying things,searching for relevant content & still no go try posting things get advice and try building things yourself...
    REGARDS,
    RaHuL

  • Animation while page loading

    I just created an animation using fireworks that according to
    the tutorial can be used as animation while the page is loading.
    What format does this file need to be in and where should i upload
    it on the server ...(anyone have a tutorial)...the one i used went
    step by step how to make it but didn't talk about getting it to
    work on the site....thanks

    "whatisgood" <[email protected]> wrote in
    message
    news:go3jlv$29$[email protected]..
    >I just created an animation using fireworks that
    according to the tutorial
    >can
    > be used as animation while the page is loading. What
    format does this
    > file
    > need to be in and where should i upload it on the server
    ...(anyone have a
    > tutorial)...the one i used went step by step how to make
    it but didn't
    > talk
    > about getting it to work on the site....thanks
    >
    Im not that savvy with animation in FW, but Im assuming that
    it would be an
    animated gif format.
    Where you put the image, the actual folder or path isnt so
    much the
    important thing, as making sure you have correctly linked to
    the image
    destination on the page.
    When you upload to the server, make sure that you maintain
    the file
    structure of your local files. If you are using dreamweaver
    for ftp and you
    have correctly defined your site in dreamweaver, then
    uploading the image
    from you local site files should maintain that structure.
    Hope this is of some help
    Regards
    Fiona

  • On JSF Page load UI components loading sequence

    Hi All,
    I have some questions about the UI components loading sequence on the JSF page load.
    When a JSF page loads it loads its UI components which have a sequence of getters and setters declared in the backing bean of that jspx page.
    Qustion 1: How these getters and setters in backing bean work in loading the jspx page?
    Question 2: How this backing bean is related to the Page Definition file for the page loading?
    Question 3 (main query): What is the sequence of the getters and setters. Means, if i drop 3 UI components, 1 input text, then a command button and then an output text, then they are accordingly declared in backing bean. On page load first i/p texts getter gets called, then setter, then command button's and theno/p texts, in these sequence.
    But can i manipulate their sequence of loading. If yes then how it can be possible?

    Answer 1: Getters and Setters in bean normally will be bounded to ui component's properties in jspx page, when jspx page loads these getters get called through introspection and setters gets called when a request is submitted.
    Answer 2: Backing bean and page definition are two different entities and they are no way related unless you have a data control for the backing bean and have bindings for those methods in page definition file
    Answer 3: The sequence of getters and setters depends on the order of the components they bounded to in jspx page. components in jsf page gets loaded from top to bottom so the getter bound to the top component gets called first and the getter bound to bottom component gets called last.
    The only way to change the sequence of getter methods getting called is to just change the order of the components they bound to in jspx page.
    Usually, it is not suggested to put business logic inside getters and setters, where you have action and actionlisteners for the same. If you follow that, you don't need to worry of the sequence of getters and setters execution
    Sireesha

  • Blank index.jsp and some jsf pages within WebContent folder

    Hi dear all,
    I have a problem with a blank index.jsp forwarding to a jsf file i.e. <jsp:forward page="/pages/xxx.jsf" />
    I have tested with index.html (is showing with right contents), index.jsp (page loaded but blank), index.jsf (page loaded but blank).
    Web Server details : Tomcat 6.0.18 running on Linux.
    Folder structure is
    Webapps
    |-----<application>
    |---------WebContent
    |---------pages (same level as WEB-INF)
    |---------WEB-INF (same level as WEB-INF)
    within WEB-INF, web.xml is as follows:
    ============================
    <?xml version="1.0"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
    </listener>
    <!-- Faces Servlet -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup> 1 </load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
         <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    </web-app>
    But direct access to jsf files within pages directory is showing, which is not desirable.
    Can someone advise me why?
    Many thanks and have a good day,
    May

    Mei_Liew wrote:
    I have a problem with a blank index.jsp forwarding to a jsf file i.e. <jsp:forward page="/pages/xxx.jsf" />You forgot to tell more about the problem. What happens? What happens not?

  • How to custom a conversion error in JSF page in JDeveloper

    According to the book "Core JavaServer Faces" p213 (fifth edition), if I add the following line to messages.properties file, and specifiy it in the faces-config.xml and .jsp file, then the displayed conversion error message should be my tailored one instead of the default. However, I still get the default error message. Besides, I didn't find "CONVERSION" variable in UIInput class. Is the book wrong? And what's the correct way?
    javax.faces.component.UIInput.CONVERSION=Please correct your input

    I didn't choose any special in JDeveloper IDE. I just selected "new" to create a file called "message.properties" and put the line there. I didn't specify converters excepts declaring the type in the Jave Beans. I guess the converting is done by the JSF framework automatically. It must be a JSF converter since I created the page as a JSF page.

  • Gernerate JSF page through program

    Hi all of you,
    my name is Salomon i am a beginer in JSF programming with Oracle Jdeveloper 10g release 3.
    My difficulty is how to acivate and desactivate UI components on JSF page (or rather JSP page) through program (maybe a method integrated in class associated with JSP page)
    ,and also add or remove UI components on the JSP programmaticaly.
    I am looking forward in hearing from you soon.
    Thank you

    Hi,
    thank for your response but i got another problem:
    How to reach a component which is in jsf page whithin another jsf page
    programmaticaly so that i can modify its properties (mainly hide or show a commandbutton menu item ...) before displaying this page (page containing the component to modify) through the " return outcomename " statement.
    Thank you
    Salomon
    Message was edited by:
    user554608

  • Controlling page setup properties from JSF page

    Hi there :)
    How to control print properties like size,margins on left,right,top,bottom,header,footer etc in page setup through jsf page?
    Thanks in advance.
    Cheers.

    Not.

Maybe you are looking for

  • How to upload data to a "CLOB" datatype field in a database table

    Using sqlldr what is the correct way to upload character data (far greater than the 4000 Bytes allowed in varchar2)? setting the table field name datatype to clob and then using the field name against a large dataset in the control file I get the err

  • Illustrator download not working on my PC

    Hello, I have just signed up for a Creative Cloud membership, downloaded PSD and IDD but can t install Illustrator - I can t see what the problem is, but it just doesn t work, could you please help me ? thankx !

  • Photo gallery limited to 5 pages?

    I have over 200 photos for some of my galleries. I would prefer to keep around 20 or so photos per page, but it seems iWeb limits the number of pages to 5, and it wont display the remaining photos. Is there a setting somewhere that tells it to limit

  • SCORM 1.2 and Saba - Reporting a 0 Score for Track Slide views

    Good morning, We have just transitioned over to our new LMS, Saba.  To say the transition has been rocky would be an understatement.   So, here is what I am dealing with: I have a very basic reader course where I want to grant someone credit once the

  • Error message: $host does not have a method 'resetDataPermsCheck'

    LiveCycle Designer 8.05. I am trying to reset the data in a subform. It is working great in certain subforms in my form. However, some of the code is as follows: if (form1.P1.docSF.new_revision.rawValue == "0") { // do something } else { xfa.host.res