1 2 Previous Next 16 Replies Latest reply on Jan 17, 2008 3:05 AM by Sergey Smirnov Go to original post
      • 15. Re: DYnamically Load JSF Pages into DIV
        Ravi Nallakukkala Newbie

         

        "JuCobb2" wrote:
        I tried doing what you are talking about but was having trouble with some of the richfaces components rendering correctly. So I just went a different way. Here is the updater call I was using

        new Ajax.Updater(pane, src, {asynchronous:1, evalScripts:true, onLoading:function(request){
        pane.innerHTML='<img alt="" src="../images/ajax-loader.gif" style="vertical-align:-3px" /> Loading...'}})


        I have a similar requirement and I tried with the above options but no luck
        I don't see the CSS styles.

        Some thing i noticed interesting is that the Ajax.updater response, response has a html & head tags.

        My Ajax.updater code
         new Ajax.Updater('displayArea', urlToLoad,
         {asynchronous:1,
         evalScripts:true,
         onLoading:function(request){pane.innerHTML='Loading...'},
         //onFailure:function(){ new Ajax.Updater('displayArea','insertion: Insertion.Bottom')},
         onComplete:function(request){alert(document.getElementById('displayArea').innerHTML)},
         parameters: parametersValues
         });
        


        Response received....
        <html xmlns="http://www.w3.org/1999/xhtml"><head><link rel='stylesheet' type='text/css' href='/admin
        
        /a4j_3_1_2.GAcss/panel.xcss/DATB/eAF7x27TCwAE1gG.' /><link rel='stylesheet' type='text/css' href='/admin
        
        /a4j_3_1_2.GAcss/spacer.xcss/DATB/eAF7x27TCwAE1gG.' /><link rel='stylesheet' type='text/css' href='
        
        /admin/a4j_3_1_2.GAcss/table.xcss/DATB/eAF7x27TCwAE1gG.' /><script type='text/javascript' src='/admin
        
        /a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript'></script></head>
        <<<<<My Actual code>>>>>
        </html>
        


        the page i'm trying to render is

        <ui:component xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
         xmlns:s="http://jboss.com/products/seam/taglib"
         xmlns:rich="http://richfaces.org/rich">
        
        <link rel="stylesheet" type="text/css" href="#{contextTheme.standard_styles}" />
        
        <h:form styleClass="data-edit">
         <ui:decorate template="#{contextTheme.gridPanelForSearch_decorator}">
        
         <ui:param name="listParam" value="#{salesChannelList.resultList}" />
         <ui:param name="rowsParam" value="30" />
         <ui:define name="header">Sales Channel Grid</ui:define>
        
         <ui:decorate template="#{contextTheme.gridColumn_decorator}">
         <ui:define name="header"></ui:define>
         <s:link view="/index.xhtml" onclick="refreshContent('channels-edit',{ salesChannelCode: '#{row.code}'});return false;" propagation="begin">
         <f:param name="salesChannelCode" value="#{row.code}" />
         <img src="#{contextTheme.salesChannel_icon32}" title="Edit Sales Channel" />
         </s:link>
        .....
        
        


        I have a4j filter installed.

        One know why am I getting the and header tags in my ajax.updater responses? appreciate any pointers.

        Thanks,
        Ravi

        • 16. Re: DYnamically Load JSF Pages into DIV
          Sergey Smirnov Master

          Sorry, guys, but it is time to close the discussion about hacker's approaches. It might confuse people who use RichFaces properly.

          1 2 Previous Next