Terry.Li-彬

          虛其心,可解天下之問;專其心,可治天下之學;靜其心,可悟天下之理;恒其心,可成天下之業。

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            143 隨筆 :: 344 文章 :: 130 評論 :: 0 Trackbacks
           

          通過分析知道基于Ajax的portlet的呈現過程,體現了Ajax技術的價值:異步處理局部數據。

          增加一個portlet

          請求:
          Hypertext Transfer Protocol
              POST /c/portal/update_layout HTTP/1.1\r\n
              Referer: http://10.108.10.205:8080/web/guest/home?p_p_id=EXT_1&p_p_action=0&p_p_state=normal&\r\n
              method: POST /c/portal/update_layout HTTP/1.1\r\n
              Content-Type: application/x-www-form-urlencoded\r\n
              Accept-Encoding: gzip, deflate\r\n
              Host: 10.108.10.205:8080\r\n
              Content-Length: 136
              Connection: Keep-Alive\r\n
              Cache-Control: no-cache\r\n
              Cookie: COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US; JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n
          Line-based text data: application/x-www-form-urlencoded
              p_l_id=10102&p_p_id=EXT_1&doAsUserId=&cmd=add&currentURL=%2Fweb%2Fguest%2Fhome%3Fp_p_id%3DEXT_1%26p_p_action%3D0%26p_p_state%3Dnormal%26

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:53:59 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Encoding: gzip\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 924
              Date: Wed, 05 Mar 2008 07:54:00 GMT\r\n
              \r\n
              Content-encoded entity body (gzip): 924 bytes -> 2534 bytes
          Line-based text data: text/html
              <div id="p_p_id_EXT_1_" class="portlet-boundary portlet-boundary_EXT_1_" >\r
              <a name="p_EXT_1"></a>\r
              <div class="portlet" id="portlet-wrapper-EXT_1">\n
              <div class="portlet-topper">\n
              <span class="portlet-title">\n
               Reports\n
              </span>\n
              <div class="portlet-icons" id="portlet-small-icon-bar_EXT_1">\n
                  \r
              <a href="javascript: Liferay.PortletCSS.init('EXT_1');" target="_self"><img align="absmiddle" border="0"

          src="/html/themes/genesis/images/common/../portlet/portlet_css.png" title="Look and Feel" /></a>\r
              <a href="javascript: self.location = 'http%3A%2F%2F10.108.10.205%3A8080%2Fweb%2Fguest%2Fhome%3Fp_p_id%3D86%26p_p_action%3D0%26p_p_state%3Dmaximized%

          26_86_struts_action%3D%252Fportlet_configuration%252Fedit_permissions%26_86_redirect%3D%252
              <span id="p_p_body_EXT_1_min_buttons">\r
              <a href="javascript: minimizePortlet('10102', 'EXT_1', false, '');"><img align="absmiddle" border="0"

          src="/html/themes/genesis/images/portlet/minimize.png" title="Minimize" /></a>\r
              </span>\r
              <a href="

          src="/html/themes/genesis/images/common/../portlet/maximize.png" title="Maximize" /></a>\r
              <a href="javascript: closePortlet('10102', 'EXT_1', '');" target="_self"><img align="absmiddle" border="0"

          src="/html/themes/genesis/images/common/../portlet/close.png" title="Remove" /></a>\r
              </div>\n
              </div>\n
              <div class="portlet-content">\n
              <div class="portlet-content-container" style="">\r
              <div>\r
              <a href="
          123</a>\r
              </div>\r
              </div>\r
              </div>\n
              </div>\r
              </div>\r
              <script type="text/javascript">\r
              document.getElementById("p_p_id_EXT_1_").portletId = "EXT_1";\r
              document.getElementById("p_p_id_EXT_1_").columnPos = 0;\r
              if (!Liferay.Portlet.isAjax("EXT_1")) {\r
              Liferay.Portlet.process("EXT_1");\r
              }\r
              jQuery(\r
              function() {\r
              Liferay.Util.portletTitleEdit(\r
              {\r
              obj: jQuery("#p_p_id_EXT_1_"),\r
              plid: "10102",\r
              doAsUserId: "",\r
              portletId: "EXT_1"\r
              }\r
              );\r
              }\r
              );\r
              </script>\r

           
          最小化一個portlet

          請求:
          Hypertext Transfer Protocol
              POST /c/portal/update_layout HTTP/1.1\r\n
              Referer:
          http://10.108.10.205:8080/web/guest/home\r\n
              method: POST /c/portal/update_layout HTTP/1.1\r\n
              Content-Type: application/x-www-form-urlencoded\r\n
              Accept-Encoding: gzip, deflate\r\n
              User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
              Host: 10.108.10.205:8080\r\n
              Content-Length: 68
              Connection: Keep-Alive\r\n
              Cache-Control: no-cache\r\n
              Cookie: COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US; JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n
          Line-based text data: application/x-www-form-urlencoded
              p_l_id=10102&p_p_id=EXT_1&p_p_restore=false&doAsUserId=&cmd=minimize

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:57:17 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 0
              Date: Wed, 05 Mar 2008 07:57:17 GMT\r\n
              \r\n

           

          恢復一個portlet(從最小化)

          請求:
          Hypertext Transfer Protocol
              POST /c/portal/update_layout HTTP/1.1\r\n
              Accept: */*\r\n
              Accept-Language: en-us\r\n
              Referer: http://10.108.10.205:8080/web/guest/home\r\n
              method: POST /c/portal/update_layout HTTP/1.1\r\n
              Content-Type: application/x-www-form-urlencoded\r\n
              Accept-Encoding: gzip, deflate\r\n
              User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
              Host: 10.108.10.205:8080\r\n
              Content-Length: 67
              Connection: Keep-Alive\r\n
              Cache-Control: no-cache\r\n
              Cookie: COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US; JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n
          Line-based text data: application/x-www-form-urlencoded
              p_l_id=10102&p_p_id=EXT_1&p_p_restore=true&doAsUserId=&cmd=minimize

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n       
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:57:17 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 0
              Date: Wed, 05 Mar 2008 07:57:17 GMT\r\n
              \r\n


          最大化一個portlet

          請求:
          Hypertext Transfer Protocol
              GET /web/guest/home?p_p_id=EXT_1&p_p_action=0&p_p_state=maximized& HTTP/1.1\r\n       
              Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-

          shockwave-flash, */*\r\n
              Referer: http://10.108.10.205:8080/web/guest/home\r\n
              Accept-Language: en-us\r\n
              Accept-Encoding: gzip, deflate\r\n
              User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
              Host: 10.108.10.205:8080\r\n
              Connection: Keep-Alive\r\n
              Cookie: LFR_SESSION_STATE_10111=1204702463265; COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US;

          JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:39:37 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Encoding: gzip\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 4473
              Date: Wed, 05 Mar 2008 07:39:47 GMT\r\n
              \r\n
              Content-encoded entity body (gzip): 4473 bytes -> 19199 bytes
          Line-based text data: text/html
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
              <html dir="ltr">\r
              <head>\r
              <title>liferay.com - Welcome</title>\r
              <meta content="text/html; charset=UTF-8" http-equiv="content-type" />\r
              <link rel="Shortcut Icon" href="/html/themes/genesis/images/liferay.ico" _fcksavedurl=""/html/themes/genesis/images/liferay.ico"" />\r
              <link href="/c/portal/css_cached?themeId=genesis&colorSchemeId=01&t=1204702034813" type="text/css" rel="stylesheet" />\r
              <style type="text/css">\r
              </style>\r
              <script type="text/javascript">\r
              var themeDisplay = {\r
              getCompanyId: function() {\r
              return "10094";\r
              },\r
              getDoAsUserIdEncoded: function() {\r
              return "";\r
              },\r
              ................................(省略了整個頁面的代碼)


          恢復一個portle(從全屏)

          請求:
          Hypertext Transfer Protocol
              GET /web/guest/home?p_p_id=EXT_1&p_p_action=0&p_p_state=normal& HTTP/1.1\r\n
              Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-

          shockwave-flash, */*\r\n
              Referer:
          http://10.108.10.205:8080/web/guest/home?p_p_id=EXT_1&p_p_action=0&p_p_state=maximized&\r\n
              Accept-Language: en-us\r\n
              Accept-Encoding: gzip, deflate\r\n
              User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
              Host: 10.108.10.205:8080\r\n
              Connection: Keep-Alive\r\n
              Cookie: LFR_SESSION_STATE_10111=1204702790765; COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US;

          JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:39:37 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Encoding: gzip\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 4473
              Date: Wed, 05 Mar 2008 07:39:47 GMT\r\n
              \r\n
              Content-encoded entity body (gzip): 4473 bytes -> 19199 bytes
          Line-based text data: text/html
              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
              <html dir="ltr">\r
              <head>\r
              <title>liferay.com - Welcome</title>\r
              <meta content="text/html; charset=UTF-8" http-equiv="content-type" />\r
              <link rel="Shortcut Icon" href="/html/themes/genesis/images/liferay.ico" _fcksavedurl=""/html/themes/genesis/images/liferay.ico"" />\r
              <link href="/c/portal/css_cached?themeId=genesis&colorSchemeId=01&t=1204702034813" type="text/css" rel="stylesheet" />\r
              <style type="text/css">\r
              </style>\r
              <script type="text/javascript">\r
              var themeDisplay = {\r
              getCompanyId: function() {\r
              return "10094";\r
              },\r
              getDoAsUserIdEncoded: function() {\r
              return "";\r
              },\r
              ................................(省略了整個頁面的代碼)


          拖動一個portlet

          請求:
          Hypertext Transfer Protocol
              POST /c/portal/update_layout HTTP/1.1\r\n
              Accept: */*\r\n
              Accept-Language: en-us\r\n
              Referer:
          http://10.108.10.205:8080/web/guest/home?p_p_id=EXT_1&p_p_action=0&p_p_state=normal&\r\n
              method: POST /c/portal/update_layout HTTP/1.1\r\n
              Content-Type: application/x-www-form-urlencoded\r\n
              Accept-Encoding: gzip, deflate\r\n
              User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
              Host: 10.108.10.205:8080\r\n
              Content-Length: 80
              Connection: Keep-Alive\r\n
              Cache-Control: no-cache\r\n
              Cookie: COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US; JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n
          Line-based text data: application/x-www-form-urlencoded
              p_l_id=10102&p_p_id=EXT_1&p_p_col_id=column-2&p_p_col_pos=0&doAsUserId=&cmd=move

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:49:39 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 0
              Date: Wed, 05 Mar 2008 07:49:39 GMT\r\n
              \r\n


          刪除一個portlet

          請求:
          Hypertext Transfer Protocol
              POST /c/portal/update_layout HTTP/1.1\r\n
              Accept: */*\r\n
              Accept-Language: en-us\r\n
              Referer: http://10.108.10.205:8080/web/guest/home?p_p_id=EXT_1&p_p_action=0&p_p_state=normal&\r\n
              method: POST /c/portal/update_layout HTTP/1.1\r\n
              Content-Type: application/x-www-form-urlencoded\r\n
              Accept-Encoding: gzip, deflate\r\n
              User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
              Host: 10.108.10.205:8080\r\n
              Content-Length: 48
              Connection: Keep-Alive\r\n
              Cache-Control: no-cache\r\n
              Cookie: COOKIE_SUPPORT=true; LOGIN=test@liferay.com; SCREEN_NAME=DkOc2AWkcEQ=; GUEST_LANGUAGE_ID=en_US; JSESSIONID=2DFE59B64996E95DE0C64BA609CF79D1\r\n
              \r\n
          Line-based text data: application/x-www-form-urlencoded
              p_l_id=10102&p_p_id=EXT_1&doAsUserId=&cmd=delete

          響應:
          Hypertext Transfer Protocol
              HTTP/1.1 200 OK\r\n
              Server: Apache-Coyote/1.1\r\n
              Set-Cookie: COOKIE_SUPPORT=true; Expires=Thu, 05-Mar-2009 07:52:25 GMT; Path=/\r\n
              Liferay-Portal: Liferay Enterprise Portal 4.3.3 (Owen / Build 4303 / October 9, 2007)\r\n
              Content-Type: text/html;charset=UTF-8\r\n
              Content-Length: 0
              Date: Wed, 05 Mar 2008 07:52:25 GMT\r\n
              \r\n

           

          Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=2177424

          posted on 2008-03-14 14:14 禮物 閱讀(1600) 評論(1)  編輯  收藏 所屬分類: Liferay

          評論

          # qcqehlof 2008-03-31 18:40 qcqehlof
          ajffmanj http://brpqfszr.com muldgtie bckbnuco  回復  更多評論
            

          主站蜘蛛池模板: 邢台县| 泰和县| 祁东县| 铁岭市| 和田县| 沅陵县| 高雄县| 隆林| 兰西县| 恩平市| 兴仁县| 顺义区| 五大连池市| 安平县| 开原市| 拜泉县| 新乡县| 潍坊市| 苍梧县| 翁源县| 日照市| 合肥市| 翼城县| 武清区| 彭州市| 凤山县| 东丰县| 阿瓦提县| 察哈| 田东县| 阜康市| 遂宁市| 竹山县| 治多县| 长宁区| 河南省| 宁南县| 霍城县| 石嘴山市| 浑源县| 五峰|