A theoretical question Primefaces, Spring Flow and Portal

UI Components for JSF
Post Reply
Mehmet Salgar
Posts: 26
Joined: 05 Aug 2010, 10:11

29 Sep 2010, 15:47

Hi everybody,

I have a theoretical question about how the partial request functions in Primefaces 1.1 and the behavior in Portal and Spring Web Flow is correct or not.....

After some modification I managed JBoss Portal, Primefaces 1.1 and Spring Web Flow to work together under the portal...Now I like to ask (while I didn't see Primefaces working under any Portal so I don't know the behavior)...

If I understand correctly, Primefaces with an Ajax request, is only sending the part of the html that is update and jQuery somehow replaces the html in XML tree....

Now what I am observing over the Spring Webflow, Primefaces and naturally from the Portal that all Portal Page content is rendered and partial response is embedded inside of the html....

Is this behavior correct?

I guess you would understand what I mean with examples....

Original response that come from the normal web request:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>JBoss Portal 2.6.4-GA</title>
    <meta http-equiv="Content-Type" content="text/html;"/>
    <!-- to correct the unsightly Flash of Unstyled Content. -->
    <script type="text/javascript"></script>
    <!-- use the renaissance theme if nothing else was defined for the portal or the page -->

    <link rel="stylesheet" id="dyna_css" href="/portal-ajax/dyna/style.css" type="text/css"/>
<link rel="stylesheet" type="text/css" id="main_css" href="/portal-core/themes/renaissance/portal_style.css" />
<link rel="shortcut icon" href="/portal-core/themes/renaissance/images/favicon.ico" />
<link rel="icon" type="image/gif" href="/portal-core/themes/renaissance/images/animated_favicon1.gif" />

    <!-- inject header content that was generated by the portlets on the requested page -->
    
</head>

<body id="body">
<script type='text/javascript' src='/portal-ajax/dyna/prototype.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/scriptaculous.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/effects.js'></script>

<script type='text/javascript' src='/portal-ajax/dyna/dragdrop.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/dyna.js'></script>
<script type='text/javascript'>
server_base_url="/portal/";
view_state = "0";
</script>

<script src="/portal-core/js/modal.js" type="text/javascript"></script>
<link rel="stylesheet" href="/portal-core/css/modal.css" type="text/css" />
   <div id="login-modal" style="display:none">
      <div id="login-modal-msg" style="display:none;width:257px;height:157px">
      <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>

      </div>
   </div>
<div id="portal-container">
    <div id="sizer">
        <div id="expander">
            <div id="logoName"></div>
            <table border="0" cellpadding="0" cellspacing="0" id="header-container">
                <tr>
                    <td align="center" valign="top" id="header">

                        <div id='dashboardnav'>







<script type="text/javascript">
    if (typeof isModalLoaded != 'undefined'){
        document.write('<a href=\"#\" onclick=\"alertModal(\'login-modal\',\'login-modal-msg\');return false;\">Login</a>');
    }else{
        document.write('<a href=\"http://localhost:8080/portal/auth/portal/default/GlassboxPortlet\">Login</a>');
    }
   //set the iframe src for login modal to requested URL
   var iframeSrc = 'http://localhost:8080/portal/auth/portal/default/GlassboxPortlet' + '?loginheight=0';
   document.getElementById('loginIframe').src = iframeSrc;
</script>

<noscript>
      <a href="http://localhost:8080/portal/auth/portal/default/GlassboxPortlet">Login</a>
</noscript>



</div>

                        <div id='navigation'>







<ul id="tabsHeader">
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/default">Home</a>
      
   </li>

   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/News">News</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/Weather">Weather</a>
      
   </li>
   
   <li  id="current"
 onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/GlassboxPortlet">GlassboxPortlet</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/TextDemoPortlet">TextDemoPortlet</a>

      
   </li>
   
</ul>
</div>
                        <div id="spacer"></div>
                    </td>
                </tr>
            </table>
            <div id="content-container">
                <!-- Note: this construct assumes that the 'maximizedRegion' layout strategy was chosen for the layout, page or portal -->

                <!-- the 'maximizedRegion' strategy assigns the maximized portlet to the 'maximized' region -->
                <div id='regionMaximized'><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>Glassbox</title>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><link type="text/css" rel="stylesheet" href="/webclient-swf/resources/css/style.css" />
<link rel="stylesheet" type="text/css" href="/webclient-swf/primefaces_resource/1.1/skins/sam/skin.css" /><link rel="stylesheet" type="text/css" href="/webclient-swf/primefaces_resource/1.1/primefaces/paginator/paginator.css" />
<link rel="stylesheet" type="text/css" href="/webclient-swf/primefaces_resource/1.1/primefaces/datatable/datatable.css" />
<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/jquery/jquery.js"></script>
<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/yui/utilities/utilities.js"></script>

<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/yui/datasource/datasource-min.js"></script>
<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/primefaces/paginator/paginator.js"></script>
<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/yui/datatable/datatable-min.js"></script>
<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/primefaces/core/core.js"></script>
<script type="text/javascript" src="/webclient-swf/primefaces_resource/1.1/primefaces/datatable/datatable.js"></script>


	</head>
	<body>
<form id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm" name="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm" method="post" action="/portal/portal/default/GlassboxPortlet/GlassboxWindow?org.glassbox.portlet.NAMESPACE=jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj&action=1" enctype="application/x-www-form-urlencoded">

<input type="hidden" name="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm" value="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm" />

		<!-- p:poll id="operationPoll" action="poll" interval="5"
			update="operationsTable" /--><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationPanel" class="troubleshooterPanel">
<tbody>
<tr>
<td><div id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable"><div id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable_container"><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable_table" style="display:none"><tbody><tr><td>
				org.glassbox.webclient.swf.portlet.GlassboxDispatcherPortlet.render</td><td>
				117,73 sec.</td><td>
				4</td><td>
				FAILING</td><td>

				[CPU Hog, Failing Dispatch/Helper Code]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:0:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:0:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:0:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>0</td></tr><tr><td>
				org.glassbox.webclient.swf.portlet.GlassboxDispatcherPortlet.process</td><td>
				24,08 sec.</td><td>
				4</td><td>
				SLOW</td><td>

				[Slow Java Method]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:1:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:1:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:1:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>1</td></tr><tr><td>
				/login.jsp</td><td>
				5,7 ms</td><td>
				6</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:2:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:2:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:2:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>2</td></tr><tr><td>
				org.primefaces.resource.ResourceServlet</td><td>
				1,7 ms</td><td>
				26</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:3:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:3:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:3:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>3</td></tr><tr><td>
				org.springframework.js.resource.ResourceServlet</td><td>
				1,4 ms</td><td>
				2</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:4:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:4:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:4:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>4</td></tr><tr><td>
				org.apache.catalina.servlets.DefaultServlet</td><td>
				1,2 ms</td><td>
				41</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:5:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:5:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:5:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>5</td></tr><tr><td>
				org.apache.catalina.servlets.DefaultServlet</td><td>
				0,50 ms</td><td>
				2</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:6:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:6:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:6:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>6</td></tr><tr><td>
				org.apache.catalina.servlets.DefaultServlet</td><td>
				0,46 ms</td><td>
				2</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:7:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:7:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:7:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>7</td></tr><tr><td>
				org.apache.catalina.servlets.DefaultServlet</td><td>
				0,31 ms</td><td>
				45</td><td>
				OK</td><td>

				[Acceptable Performance]</td><td><a id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:8:next" href="javascript:void(0);" onclick="PrimeFaces.ajax.AjaxRequest('/portal/portal/default/GlassboxPortlet/GlassboxWindow?action=1&execution=e1s1',{formId:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm',global:true},{'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:8:next':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:8:next','primefacesPartialUpdate':'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel'});return false;">Click</a></td><td>8</td></tr></tbody></table></div></div><script type="text/javascript">var widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable_columnDef = [{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:operationNameColums',label:'Name'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:averageExecutionTimeColumn',label:'Average Execution Time'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:countColumn',label:'Count'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:statusColumn',label:'Status'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:analysisColumn',label:'Analysis'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:j_id17',label:''},{key:'rowIndex', hidden:true}];
var widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable_datasource = new YAHOO.util.DataSource(YAHOO.util.Dom.get('_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable_table'));
widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable_datasource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE;
widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable_datasource.responseSchema = {fields:[{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:operationNameColums'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:averageExecutionTimeColumn'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:countColumn'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:statusColumn'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:analysisColumn'},{key:'_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable:j_id17'},{key:'rowIndex'}]};
widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable = new PrimeFaces.widget.DataTable('_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationsTable',widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable_columnDef,widget_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj__viewRoot_operationForm_operationsTable_datasource, {dynamicData:false});</script></td>
</tr>
</tbody>
</table>
<input id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:next" type="submit" name="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:next" value="Next" /><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel">
<tbody>
<tr>
<td><table class="headertitle" style="align: center">
<tbody>
<tr>
<td>
				<font color="#000000">

				OPERATION: </font></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="40%" /></td>
</tr>
<tr>
<td><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationdata_analyses_panel">
<tbody>
<tr>

<td></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="%80" /></td>
</tr>
<tr>
<td><table style="align: center">
<tbody>
<tr>
<td>Operation ran  time(s) since </td>

</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<table id="operation_status_table" class="header" align="center">
				<tbody>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap"></td>
						<td class="header" width="1000"></td>

						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time Overall:</td>
						<td class="headerdata" align="left" nowrap="nowrap"></td>
					</tr>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">Exceeded
						
						goal  time(s)
						(%)</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time While Slow:</td>

						<td class="headerdata" align="left" nowrap="nowrap"></td>
					</tr>
				</tbody>
			</table></td>
</tr>
</tbody>
</table>

		<!-- a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"/-->
</form>
	</body>

</html></div>
                <hr class="cleaner"/>

                <div id="footer-container" class="portal-copyright">Powered by
                    <a class="portal-copyright" href="http://www.jboss.com/products/jbossportal">JBoss Portal</a><br>
                    <span id="ThemeBy"></span>
                </div>
            </div>

        </div>

    </div>
</div>
<script type='text/javascript'>footer()</script>

</body>
</html>
The actual partial update response:

Code: Select all

<partialResponse><components><component><id>_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel</id><output><![CDATA[<table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel">
<tbody>
<tr>
<td><table class="headertitle" style="align: center">
<tbody>
<tr>
<td>
				<font color="#000000">OK
				OPERATION: ResourceServlet</font></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="40%" /></td>
</tr>
<tr>
<td><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationdata_analyses_panel">
<tbody>
<tr>
<td>
					<div class="headersubtitle2" align="center">Cause: Acceptable Performance</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="%80" /></td>
</tr>
<tr>
<td><table style="align: center">
<tbody>
<tr>
<td>Operation ran 26 time(s) since 29.09.10 13:44</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<table id="operation_status_table" class="header" align="center">
				<tbody>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">All successful executions within 1 second goal</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time Overall:</td>
						<td class="headerdata" align="left" nowrap="nowrap">1,7 ms</td>
					</tr>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">Exceeded
						1,0 sec.
						goal 0 time(s)
						(0%)</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time While Slow:</td>
						<td class="headerdata" align="left" nowrap="nowrap">N/A</td>
					</tr>
				</tbody>
			</table></td>
</tr>
</tbody>
</table>
]]></output></component></components><state><![CDATA[]]></state><callbackParams><callbackParam>{"validationFailed":false}</callbackParam></callbackParams></partialResponse>
And this is the response to the Ajax call and that is the way partial update is embedded inside of the portal page

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>JBoss Portal 2.6.4-GA</title>
    <meta http-equiv="Content-Type" content="text/html;"/>
    <!-- to correct the unsightly Flash of Unstyled Content. -->
    <script type="text/javascript"></script>
    <!-- use the renaissance theme if nothing else was defined for the portal or the page -->
    <link rel="stylesheet" id="dyna_css" href="/portal-ajax/dyna/style.css" type="text/css"/>
<link rel="stylesheet" type="text/css" id="main_css" href="/portal-core/themes/renaissance/portal_style.css" />
<link rel="shortcut icon" href="/portal-core/themes/renaissance/images/favicon.ico" />
<link rel="icon" type="image/gif" href="/portal-core/themes/renaissance/images/animated_favicon1.gif" />

    <!-- inject header content that was generated by the portlets on the requested page -->
    
</head>

<body id="body">
<script type='text/javascript' src='/portal-ajax/dyna/prototype.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/scriptaculous.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/effects.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/dragdrop.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/dyna.js'></script>
<script type='text/javascript'>
server_base_url="/portal/";
view_state = "2";
</script>

<script src="/portal-core/js/modal.js" type="text/javascript"></script>
<link rel="stylesheet" href="/portal-core/css/modal.css" type="text/css" />
   <div id="login-modal" style="display:none">
      <div id="login-modal-msg" style="display:none;width:257px;height:157px">
      <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
      </div>
   </div>
<div id="portal-container">
    <div id="sizer">
        <div id="expander">
            <div id="logoName"></div>
            <table border="0" cellpadding="0" cellspacing="0" id="header-container">
                <tr>
                    <td align="center" valign="top" id="header">
                        <div id='dashboardnav'>







<script type="text/javascript">
    if (typeof isModalLoaded != 'undefined'){
        document.write('<a href=\"#\" onclick=\"alertModal(\'login-modal\',\'login-modal-msg\');return false;\">Login</a>');
    }else{
        document.write('<a href=\"http://localhost:8080/portal/auth/portal/default/GlassboxPortlet\">Login</a>');
    }
   //set the iframe src for login modal to requested URL
   var iframeSrc = 'http://localhost:8080/portal/auth/portal/default/GlassboxPortlet' + '?loginheight=0';
   document.getElementById('loginIframe').src = iframeSrc;
</script>

<noscript>
      <a href="http://localhost:8080/portal/auth/portal/default/GlassboxPortlet">Login</a>
</noscript>




</div>

                        <div id='navigation'>







<ul id="tabsHeader">
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/default">Home</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/News">News</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/Weather">Weather</a>
      
   </li>
   
   <li  id="current"
 onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/GlassboxPortlet">GlassboxPortlet</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                           

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>JBoss Portal 2.6.4-GA</title>
    <meta http-equiv="Content-Type" content="text/html;"/>
    <!-- to correct the unsightly Flash of Unstyled Content. -->
    <script type="text/javascript"></script>
    <!-- use the renaissance theme if nothing else was defined for the portal or the page -->
    <link rel="stylesheet" id="dyna_css" href="/portal-ajax/dyna/style.css" type="text/css"/>
<link rel="stylesheet" type="text/css" id="main_css" href="/portal-core/themes/renaissance/portal_style.css" />
<link rel="shortcut icon" href="/portal-core/themes/renaissance/images/favicon.ico" />
<link rel="icon" type="image/gif" href="/portal-core/themes/renaissance/images/animated_favicon1.gif" />

    <!-- inject header content that was generated by the portlets on the requested page -->
    
</head>

<body id="body">
<script type='text/javascript' src='/portal-ajax/dyna/prototype.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/scriptaculous.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/effects.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/dragdrop.js'></script>
<script type='text/javascript' src='/portal-ajax/dyna/dyna.js'></script>
<script type='text/javascript'>
server_base_url="/portal/";
view_state = "2";
</script>

<script src="/portal-core/js/modal.js" type="text/javascript"></script>
<link rel="stylesheet" href="/portal-core/css/modal.css" type="text/css" />
   <div id="login-modal" style="display:none">
      <div id="login-modal-msg" style="display:none;width:257px;height:157px">
      <iframe src="" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content" id="loginIframe"></iframe>
      </div>
   </div>
<div id="portal-container">
    <div id="sizer">
        <div id="expander">
            <div id="logoName"></div>
            <table border="0" cellpadding="0" cellspacing="0" id="header-container">
                <tr>
                    <td align="center" valign="top" id="header">
                        <div id='dashboardnav'>







<script type="text/javascript">
    if (typeof isModalLoaded != 'undefined'){
        document.write('<a href=\"#\" onclick=\"alertModal(\'login-modal\',\'login-modal-msg\');return false;\">Login</a>');
    }else{
        document.write('<a href=\"http://localhost:8080/portal/auth/portal/default/GlassboxPortlet\">Login</a>');
    }
   //set the iframe src for login modal to requested URL
   var iframeSrc = 'http://localhost:8080/portal/auth/portal/default/GlassboxPortlet' + '?loginheight=0';
   document.getElementById('loginIframe').src = iframeSrc;
</script>

<noscript>
      <a href="http://localhost:8080/portal/auth/portal/default/GlassboxPortlet">Login</a>
</noscript>




</div>

                        <div id='navigation'>







<ul id="tabsHeader">
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/default">Home</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/News">News</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/Weather">Weather</a>
      
   </li>
   
   <li  id="current"
 onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/GlassboxPortlet">GlassboxPortlet</a>
      
   </li>
   
   <li  onmouseover="this.className='hoverOn'"
                                                                    onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/TextDemoPortlet">TextDemoPortlet</a>
      
   </li>
   
</ul>
</div>
                        <div id="spacer"></div>
                    </td>
                </tr>
            </table>
            <div id="content-container">
                <!-- Note: this construct assumes that the 'maximizedRegion' layout strategy was chosen for the layout, page or portal -->
                <!-- the 'maximizedRegion' strategy assigns the maximized portlet to the 'maximized' region -->
                <div id='regionMaximized'><?xml version="1.0" encoding="UTF-8"?><partialResponse><components><component><id>_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel</id><output><![CDATA[<table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel">
<tbody>
<tr>
<td><table class="headertitle" style="align: center">
<tbody>
<tr>
<td>
				<font color="#000000">OK
				OPERATION: ResourceServlet</font></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="40%" /></td>
</tr>
<tr>
<td><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationdata_analyses_panel">
<tbody>
<tr>
<td>
					<div class="headersubtitle2" align="center">Cause: Acceptable Performance</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="%80" /></td>
</tr>
<tr>
<td><table style="align: center">
<tbody>
<tr>
<td>Operation ran 26 time(s) since 29.09.10 13:44</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<table id="operation_status_table" class="header" align="center">
				<tbody>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">All successful executions within 1 second goal</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time Overall:</td>
						<td class="headerdata" align="left" nowrap="nowrap">1,7 ms</td>
					</tr>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">Exceeded
						1,0 sec.
						goal 0 time(s)
						(0%)</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time While Slow:</td>
						<td class="headerdata" align="left" nowrap="nowrap">N/A</td>
					</tr>
				</tbody>
			</table></td>
</tr>
</tbody>
</table>
]]></output></component></components><state><![CDATA[]]></state><callbackParams><callbackParam>{"validationFailed":false}</callbackParam></callbackParams></partialResponse></div>
                <hr class="cleaner"/>

                <div id="footer-container" class="portal-copyright">Powered by
                    <a class="portal-copyright" href="http://www.jboss.com/products/jbossportal">JBoss Portal</a><br>
                    <span id="ThemeBy"></span>
                </div>
            </div>

        </div>
    </div>
</div>
<script type='text/javascript'>footer()</script>
                                         onmouseout="this.className='hoverOff'"><a
      href="/portal/portal/default/TextDemoPortlet">TextDemoPortlet</a>
      
   </li>
   
</ul>
</div>
                        <div id="spacer"></div>
                    </td>
                </tr>
            </table>
            <div id="content-container">
                <!-- Note: this construct assumes that the 'maximizedRegion' layout strategy was chosen for the layout, page or portal -->
                <!-- the 'maximizedRegion' strategy assigns the maximized portlet to the 'maximized' region -->
                <div id='regionMaximized'><?xml version="1.0" encoding="UTF-8"?><partialResponse><components><component><id>_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel</id><output><![CDATA[<table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:detailPanel">
<tbody>
<tr>
<td><table class="headertitle" style="align: center">
<tbody>
<tr>
<td>
				<font color="#000000">OK
				OPERATION: ResourceServlet</font></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="40%" /></td>
</tr>
<tr>
<td><table id="_jbpns_2fdefault_2fGlassboxPortlet_2fGlassboxWindowsnpbj:_viewRoot:operationForm:operationdata_analyses_panel">
<tbody>
<tr>
<td>
					<div class="headersubtitle2" align="center">Cause: Acceptable Performance</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<hr size="1" width="%80" /></td>
</tr>
<tr>
<td><table style="align: center">
<tbody>
<tr>
<td>Operation ran 26 time(s) since 29.09.10 13:44</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
			<table id="operation_status_table" class="header" align="center">
				<tbody>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">All successful executions within 1 second goal</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time Overall:</td>
						<td class="headerdata" align="left" nowrap="nowrap">1,7 ms</td>
					</tr>
					<tr class="header">
						<td class="headerdata" colspan="2" align="left" nowrap="nowrap">Exceeded
						1,0 sec.
						goal 0 time(s)
						(0%)</td>
						<td class="header" width="1000"></td>
						<td class="headerdata" align="right" nowrap="nowrap">Avg.Execution
						Time While Slow:</td>
						<td class="headerdata" align="left" nowrap="nowrap">N/A</td>
					</tr>
				</tbody>
			</table></td>
</tr>
</tbody>
</table>
]]></output></component></components><state><![CDATA[]]></state><callbackParams><callbackParam>{"validationFailed":false}</callbackParam></callbackParams></partialResponse></div>
                <hr class="cleaner"/>

                <div id="footer-container" class="portal-copyright">Powered by
                    <a class="portal-copyright" href="http://www.jboss.com/products/jbossportal">JBoss Portal</a><br>
                    <span id="ThemeBy"></span>
                </div>
            </div>

        </div>
    </div>
</div>
<script type='text/javascript'>footer()</script>

</body>
</html>

</body>
</html>
So the correct way is that in the answer only the partial update should be there or not?????

Thx for the answers....

Mehmet Salgar
Posts: 26
Joined: 05 Aug 2010, 10:11

30 Sep 2010, 10:56

Hi everybody,

I made some more research and I have some interesting findings but I need tips how to go further....

As I said in the previous mail, instead of getting only the partialReponse, Portal and Spring Webflow is sending whole page back and partial update embedded inside. The function 'PrimeFaces.ajax.AjaxResponse' in core.js can not handle the response and explode in PrimeFaces.escapeClientId method with a parse error....

Now I have a lot of experience with JBoss Portal and Richfaces, the way they are handling this problem there instead of submitting the Ajax request to the Portal, they are sending the Ajax request to the web application that is configured as Portlet, so instead of Portal gets the request and generates the whole response, the web application get the request (bypass whole Portlet structure) and generate xhtml that should be updated in the XML tree...

So my question is, if I change the PrimeFaces.ajax.AjaxRequest functions (in core.js) actionURL instead of Portal URL to the web application URL this approach can work or not.....

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Sep 2010, 11:35

We were doing the same, bypassing the portal and sending request to the webapp but it is just faking the whole portlet stuff and against the idea. Now PrimeFaces 2.0 Ajax is powered by standard JSF 2.0 ajax, PrimeFaces does not know about the external context, it can be servlet or portlet, it is portlet bridge and JSF implementation's responsibility.

Mehmet Salgar
Posts: 26
Joined: 05 Aug 2010, 10:11

30 Sep 2010, 12:58

Ok,

I understand your point but what do you think about such a solution....

Instead of trying of parsing the response with XMLHttpResponse, I get the stream, search for the part inside of the "<partialResponse>....</partialResponse>" elements and send that to the browser back....

I know it would not be efficient because lots of things outside of the necessary areas are going to be rendered but at least it would stay true to the portal framework....

And may be if I can't manage that with jQuery may be I can place a filter in front of the Portal and modify the response there....

Thx for the answers...

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests