Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    smartclient modal window hangs

    Hi,
    We are using Smartclient within Liferay portal server to show up a modal window. We have done by calling a javascript function on body onload of the Portal page. Following is the code -
    Code:
    function openModalWindow(){
    
    				
    				isc.RestDataSource.create({
    				ID:"showAlertDS",
    				fields:[
    				{name:"AlertList", primaryKey:true, canEdit:false}		        
    				],
    					fetchDataURL:"/services/2/AlertAction_execute.action",				
    					operationBindings : [
    						{ operationType:"fetch", dataProtocol:"postParams"}
    						
    					]
    				
    				});
    				isc.ListGrid.create({
    				    ID: "showAlertList",
    				    width:500, height:250, alternateRecordStyles:true,
    				    dataSource: showAlertDS,
    				    fields:[
    					{name:"AlertList"}
    				    ],
    				    dataPageSize: 100,
    				    selectionType:"none",
    				    showRollOver:false,
    				    autoFetchData:true,
    				    showHeader:false,
    				   showHover:false,
    				   canEdit:false,
    				   canSort:false,
    					wrapCells: true,
    					fixedRecordHeights: false
    				});
    				
    				isc.DynamicForm.create({
    					ID:"checkBoxItems",
    					cellPadding:5,
    					 numCols:4,
    					 height:20,
    					 align:"center",
    					autoDraw:false,
    					fields:[
    					{defaultValue:true,name:"$wl_checkBox",visible:false,ID:"checkBoxValue",type:"CheckboxItem",width:150},				{name:"$wl_okButton",type:"button",click:"clickEventMethod();modalWindowAlert.closeClick();"}
    					]
    				});
    				isc.VLayout.create({
    					ID:"checkBoxStack",
    					layoutTopMargin:20,
    					members:[checkBoxItems]
    				});
    				isc.Window.create({
    				    ID: "modalWindowAlert",
    				    title: "$wl_modalAlertTitle",
    				    autoSize:true,
    				    showMinimizeButton:false,
    				    showCloseButton:false,
    				    showShadow:false,
    				    showHeader:false,
    				    overflow:"auto",
    				    autoCenter: true,
    				    isModal: true,
    				    showModalMask: true,
    				    autoDraw: true 
    				});
    				modalWindowAlert.addItem(showAlertList);
    				modalWindowAlert.addItem(checkBoxStack);
    
    
    }
    The isc components are loaded in the head section of the vm.
    Code:
    <head>
    <title>ABC</title>
    $theme.include($top_head_include)
    #css ($css_main_file)
    #js ($js_main_file)
    <script>window.isomorphicDir='/services/2/isomorphic/';</script>
    <script src='/services/2/isomorphic/system/modules/ISC_Core.js'></script>
    
    <script src='/services/2/isomorphic/system/modules/ISC_Foundation.js'></script>
    <script src='/services/2/isomorphic/system/modules/ISC_Containers.js'></script>
    <script src='/services/2/isomorphic/system/modules/ISC_Grids.js'></script>
    <script src='/services/2/isomorphic/system/modules/ISC_Forms.js'></script>
    <script src='/services/2/isomorphic/system/modules/ISC_DataBinding.js'></script>
    <script src='/services/2/isomorphic/skins/wl/load_skin.js'></script>
    </head>
    The load_skin.js is present under the location /services/2/isomorphic/skins/wl/

    This set up works fine in development environment which is Liferay deployed on weblogic in Windows PC.

    The same set up behaves in an inconsistent manner in our integration environment. Most of the time, when the pop up window comes up, there's a javascript error and the window hangs with the message contacting server. The OK button on the popup window also is non-clickable; basically the focus remains within the popup listgrid component.
    The integration environment has a cluster of weblogic app servers + iPlanet web servers + apache reverse proxy.

    The portal page has portlets using smartclient; meaning multiple isc definitions. Since this works locally, I believe this might not be an issue.

    Any pointers would be of great help.

    Thanks,
    Dwipin.

    #2
    js error

    Found this error using Firebug -

    Code:
    POST https://hostname/portalservices/2/AlertAction_execute.action
    https://hostname/portalservices/2/AlertAction_execute.action
    	
    500 Server Error
    		2.2s	ISC_Core.js (line 1022)
    POST https://hostname/portalservices/2/AlertAction_execute.action
    https://hostname/portalservices/2/AlertAction_execute.action
    	
    200 OK
    		2.92s	ISC_Core.js (line 1022)
    _3.selectString is not a function
    transformResponse()(Object status=-1 httpResponseCode=500 transactionNum=0, Object operationType=fetch dataSource=showAlertDS, "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">\n<HTML>\n<HEAD>\n<TITLE>Error 500--Internal Server Error</TITLE>\n<META NAME="GENERATOR" CONTENT="WebLogic Server">\n</HEAD>\n<BODY bgcolor="white">\n<FONT FACE=Helvetica><BR CLEAR=all>\n<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>\n<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal Server Error</H2>\n</FONT></TD></TR>\n</TABLE>\n<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>\n</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server Error</H4>\n</FONT><P><FONT FACE="Courier New">The server encountered an unexpected condition which prevented it from fulfilling the request.</FONT></P>\n</FONT></TD></TR>\n</TABLE>\n\n</BODY>\n</HTML>\n")ISC_Data...inding.js (line 1229)
    38b()("<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">\n<HTML>\n<HEAD>\n<TITLE>Error 500--Internal Server Error</TITLE>\n<META NAME="GENERATOR" CONTENT="WebLogic Server">\n</HEAD>\n<BODY bgcolor="white">\n<FONT FACE=Helvetica><BR CLEAR=all>\n<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>\n<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal Server Error</H2>\n</FONT></TD></TR>\n</TABLE>\n<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>\n</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server Error</H4>\n</FONT><P><FONT FACE="Courier New">The server encountered an unexpected condition which prevented it from fulfilling the request.</FONT></P>\n</FONT></TD></TR>\n</TABLE>\n\n</BODY>\n</HTML>\n", Object status=-1 httpResponseCode=500 transactionNum=0, Object operationType=fetch dataSource=showAlertDS, Object operationId=showAlertDS_fetch clientContext=Object, Object operationType=fetch dataSource=showAlertDS)ISC_Data...inding.js (line 439)
    378()(null, "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">\n<HTML>\n<HEAD>\n<TITLE>Error 500--Internal Server Error</TITLE>\n<META NAME="GENERATOR" CONTENT="WebLogic Server">\n</HEAD>\n<BODY bgcolor="white">\n<FONT FACE=Helvetica><BR CLEAR=all>\n<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>\n<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal Server Error</H2>\n</FONT></TD></TR>\n</TABLE>\n<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>\n</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server Error</H4>\n</FONT><P><FONT FACE="Courier New">The server encountered an unexpected condition which prevented it from fulfilling the request.</FONT></P>\n</FONT></TD></TR>\n</TABLE>\n\n</BODY>\n</HTML>\n", Object operationId=showAlertDS_fetch clientContext=Object, Object operationType=fetch dataSource=showAlertDS)ISC_Data...inding.js (line 413)
    fireCallback()(Object target=[RestDataSource ID:showAlertDS], "xmlDoc,xmlText,rpcResponse,rpcRequest", [null, "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">\n<HTML>\n<HEAD>\n<TITLE>Error 500--Internal Server Error</TITLE>\n<META NAME="GENERATOR" CONTENT="WebLogic Server">\n</HEAD>\n<BODY bgcolor="white">\n<FONT FACE=Helvetica><BR CLEAR=all>\n<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>\n<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal Server Error</H2>\n</FONT></TD></TR>\n</TABLE>\n<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>\n</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server Error</H4>\n</FONT><P><FONT FACE="Courier New">The server encountered an unexpected condition which prevented it from fulfilling the request.</FONT></P>\n</FONT></TD></TR>\n</TABLE>\n\n</BODY>\n</HTML>\n", Object operationId=showAlertDS_fetch clientContext=Object, 1 more...], [RestDataSource ID:showAlertDS] ns=Object ID=showAlertDS fields=Object, undefined)ISC_Core.js (line 266)
    37c()(Object operationId=showAlertDS_fetch clientContext=Object, "Transport error - HTTP code: 500 for URL: /portalservices/2/AlertAction_execute.action", Object operationType=fetch dataSource=showAlertDS)ISC_Data...inding.js (line 80)
    fireCallback()(Object target=[Class XMLTools] methodName=$37c, "rpcResponse,data,rpcRequest", [Object operationId=showAlertDS_fetch clientContext=Object, "Transport error - HTTP code: 500 for URL: /portalservices/2/AlertAction_execute.action", Object operationType=fetch dataSource=showAlertDS 0=Object], [Class XMLTools] Class=XMLTools $bp=true $a5=false $b8=[Class Class], undefined)ISC_Core.js (line 266)
    delayCall()(Object target=[Class XMLTools] methodName=$37c, "rpcResponse,data,rpcRequest", [Object operationId=showAlertDS_fetch clientContext=Object, "Transport error - HTTP code: 500 for URL: /portalservices/2/AlertAction_execute.action", Object operationType=fetch dataSource=showAlertDS 0=Object], undefined)ISC_Core.js (line 358)
    evalResult()(Object target=[Class XMLTools] methodName=$37c, Object operationType=fetch dataSource=showAlertDS, Object operationId=showAlertDS_fetch clientContext=Object, "Transport error - HTTP code: 500 for URL: /portalservices/2/AlertAction_execute.action")ISC_Data...inding.js (line 778)
    fireReplyCallbacks()(Object operationType=fetch dataSource=showAlertDS, Object operationId=showAlertDS_fetch clientContext=Object)ISC_Data...inding.js (line 782)
    performOperationReply()(Object operationType=fetch dataSource=showAlertDS, Object operationId=showAlertDS_fetch clientContext=Object)ISC_Data...inding.js (line 777)
    39d()(0)ISC_Data...inding.js (line 771)
    performTransactionReply()(0, [Object 0=Object Class=Array], undefined)ISC_Data...inding.js (line 753)
    finalEval()()ISC_Core.js (line 59)
    fireCallback()("isc.RPCManager.performTransactionReply(transactionNum,results,wd)", "transactionNum,results,wd", [0, XMLHttpRequest 0=0 1=XMLHttpRequest Class=Array], Window home;jsessionid=tTnbJj4VjDpLvJ96nlJDmPPL6kgX1S3vwpGMS9hLTHQ2HFrbLJh0!1900979972!1076250061!1235482805689, undefined)ISC_Core.js (line 266)
    performXmlTransactionReply()(0, XMLHttpRequest)ISC_Core.js (line 1029)
    finalEval()()ISC_Core.js (line 59)
    fireCallback()("isc.Comm.performXmlTransactionReply(0, xmlHttpRequest)", "xmlHttpRequest", [XMLHttpRequest 0=XMLHttpRequest Class=Array], Window home;jsessionid=tTnbJj4VjDpLvJ96nlJDmPPL6kgX1S3vwpGMS9hLTHQ2HFrbLJh0!1900979972!1076250061!1235482805689, true)ISC_Core.js (line 266)
    h3()(XMLHttpRequest, "isc.Comm.performXmlTransactionReply(0, xmlHttpRequest)")ISC_Core.js (line 1002)
    _12()()ISC_Core.js (line 1015)
    [Break on this error] if(_4.totalRows!=null)_1.totalRows=_4.to...rors - ignoring all but the first one")}
    ISC_Data...inding.js (line 1229)



    Any help here is appreciated.

    Thanks
    Last edited by dwipin; 24 Feb 2009, 07:04.

    Comment


      #3
      firebug header data

      Firebug showed 2 hits to the server. Here's the data from firebug -

      First Hit -

      Code:
      Response Headers
      Date	Tue, 24 Feb 2009 13:43:58 GMT
      Server	Sun-ONE-Web-Server/6.1
      P3P	CP=STA
      Content-Type	text/plain;
      Cache-Control	no-cache="set-cookie"
      Set-Cookie	LRPTLJSESSIONID=FdY2Jj5H0TF1gZyJ5MdBYmgvG4vvyJnBYVRWnZhSFh2Km0PBfhF8!1900979972!1076250061; path=/
      X-Powered-By	Servlet/2.5 JSP/2.1
      X-Cache	MISS from hostname
      Keep-Alive	timeout=45, max=9997
      Connection	Keep-Alive
      Transfer-Encoding	chunked
      
      Request Headers
      Host	hostname
      User-Agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
      Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language	en-us,en;q=0.5
      Accept-Encoding	gzip,deflate
      Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive	300
      Connection	keep-alive
      Content-Type	application/x-www-form-urlencoded; charset=UTF-8
      Referer	https://hostname/portal/2/user/puser13/home;jsessionid=tTnbJj4VjDpLvJ96nlJDmPPL6kgX1S3vwpGMS9hLTHQ2HFrbLJh0
      !1900979972!1076250061!1235482805689
      Content-Length	67
      Cookie	ssoLang=en; GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true; CTSESSION=AAAAAQABAICllFqTC0cexsCRA3gl6d7gcy9XA2Loxncs
      %2B2dEZje86d7JMmEa0wH7qC6NgjWeT7fo0fcgNCgNSyx3Xg7JKp7prk%2B32AFQAA91wy%2BD42VQIxYtabpqc1PVLkzQ%2F0bmmgdlpcGOFw8qDjwl53AzRiJa2WJWGBM6CVLKWNRhYduytA
      %3D%3D; LRPTLJSESSIONID=FdY2Jj5H0TF1gZyJ5MdBYmgvG4vvyJnBYVRWnZhSFh2Km0PBfhF8!1076250061!1900979972; GTB_ALERTS_CONTROL
      =alertsExist#true&alertsShown#false
      
      Post data - 
      _dataSource	showAlertDS
      _endRow	18
      _operationType	fetch
      _startRow	0
      
      Response - 
      actual data got.
      
      
      Second Hit - 
      
      Response Headers
      Date	Tue, 24 Feb 2009 13:43:58 GMT
      Server	Sun-ONE-Web-Server/6.1
      P3P	CP=STA
      Content-Length	883
      Content-Type	text/html; charset=ISO-8859-1
      X-Powered-By	Servlet/2.5 JSP/2.1
      X-Cache	MISS from hostname
      Connection	close
      
      Request Headers
      Host	hostname
      User-Agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
      Accept	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language	en-us,en;q=0.5
      Accept-Encoding	gzip,deflate
      Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive	300
      Connection	keep-alive
      Content-Type	application/x-www-form-urlencoded; charset=UTF-8
      Referer	https://hostname/portal/2/user/puser13/home;jsessionid=tTnbJj4VjDpLvJ96nlJDmPPL6kgX1S3vwpGMS9hLTHQ2HFrbLJh0
      !1900979972!1076250061!1235482805689
      Content-Length	67
      Cookie	ssoLang=en; GUEST_LANGUAGE_ID=en_US; COOKIE_SUPPORT=true; CTSESSION=AAAAAQABAICllFqTC0cexsCRA3gl6d7gcy9XA2Loxncs
      %2B2dEZje86d7JMmEa0wH7qC6NgjWeT7fo0fcgNCgNSyx3Xg7JKp7prk%2B32AFQAA91wy%2BD42VQIxYtabpqc1PVLkzQ%2F0bmmgdlpcGOFw8qDjwl53AzRiJa2WJWGBM6CVLKWNRhYduytA
      %3D%3D; LRPTLJSESSIONID=FdY2Jj5H0TF1gZyJ5MdBYmgvG4vvyJnBYVRWnZhSFh2Km0PBfhF8!1076250061!1900979972; GTB_ALERTS_CONTROL
      =alertsExist#true&alertsShown#false
      
      Post Data
      _dataSource	showAlertDS
      _endRow	10
      _operationType	fetch
      _startRow	0
      
      Response - 
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
      <HTML>
      <HEAD>
      <TITLE>Error 500--Internal Server Error</TITLE>
      <META NAME="GENERATOR" CONTENT="WebLogic Server">
      </HEAD>
      <BODY bgcolor="white">
      <FONT FACE=Helvetica><BR CLEAR=all>
      <TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
      <FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 500--Internal Server Error</H2>
      </FONT></TD></TR>
      </TABLE>
      <TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% BGCOLOR=white><FONT FACE="Courier
       New"><FONT FACE="Helvetica" SIZE="3"><H3>From RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i
      >:</H3>
      </FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.5.1 500 Internal Server Error</H4>
      </FONT><P><FONT FACE="Courier New">The server encountered an unexpected condition which prevented it
       from fulfilling the request.</FONT></P>
      </FONT></TD></TR>
      </TABLE>
      
      </BODY>
      </HTML>

      Comment


        #4
        So, your not using the SmartClient server, and your server code is crashing on the second request - time to look at your server logs and debug why your code is crashing.

        If there aren't supposed to be two requests (eg there is only one request in the dev environment) you may have a global isc.setAutoDraw(false) in dev which is not present in the integration environment.

        Comment


          #5
          One of our clients is having issues with the browser 'hanging' in iPlanet. Do you know of any issues regarding the browser not sending full details to iplanet to post data? I've been told there are httpwatch files which can be sent over for investigation if needed. The issue mostly happens in slower computers.

          Comment


            #6
            No, we've never seen a report of this kind. Best to look through the available logs first, then let us know if it appears to be somehow related to SmartClient (or even to the browser at all).

            Comment

            Working...
            X