{"id":90,"date":"2016-04-10T12:02:04","date_gmt":"2016-04-10T06:32:04","guid":{"rendered":"http:\/\/www.middlewareprimer.com\/blog\/?p=90"},"modified":"2016-04-10T12:02:04","modified_gmt":"2016-04-10T06:32:04","slug":"script-portlet-in-websphere-portal-server-v8-5-2","status":"publish","type":"post","link":"http:\/\/www.middlewareprimer.com\/blog\/2016\/04\/10\/script-portlet-in-websphere-portal-server-v8-5-2\/","title":{"rendered":"Script Portlet in Websphere Portal Server v8.5 &#8211; #2"},"content":{"rendered":"<p>Script Portlet in Websphere Portal Server v8.5 &#8211; #2<\/p>\n<p>In #2, we will create a page in Portal and then create a sample code that runs on script portlet.<\/p>\n<p>Navigate to Websphere Portal Admin console and create a new page.<\/p>\n<p>Page name: <strong>scriptportletpage<\/strong><\/p>\n<p>Make sure that Edit mode is ON. Click on Toolbar and then click on <strong>Create<\/strong> for the <strong>scriptportletpage<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-583\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp3.png\" alt=\"Script Portlet in Websphere Portal Server v8.5 - #2\" width=\"1578\" height=\"198\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp3.png 1578w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp3-300x38.png 300w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp3-768x96.png 768w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp3-1024x128.png 1024w\" sizes=\"auto, (max-width: 1578px) 100vw, 1578px\" \/><\/p>\n<p>Select Applications <strong>&#8211;&gt;<\/strong> Select Web Content <strong>&#8211;&gt;<\/strong> Click on Script Portlet<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-584 size-full\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp4.png\" alt=\"Script Portlet in Websphere Portal Server v8.5 - #2\" width=\"1600\" height=\"373\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp4.png 1600w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp4-300x70.png 300w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp4-768x179.png 768w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp4-1024x239.png 1024w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p>Click on <strong>Add To Page<\/strong>. Below screenshot shows Script Portlet being added to the page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-585\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp5.png\" alt=\"Script Portlet in Websphere Portal Server v8.5 - #2\" width=\"1600\" height=\"327\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp5.png 1600w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp5-300x61.png 300w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp5-768x157.png 768w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp5-1024x209.png 1024w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p>Click on Edit to edit the Script Portlet in order to start writing new code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-586\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp6.png\" alt=\"sp6\" width=\"1600\" height=\"692\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp6.png 1600w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp6-300x130.png 300w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp6-768x332.png 768w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp6-1024x443.png 1024w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p>A simple Javascript Query written using Script Portlet. HTML to display the button and Text and Javascript Code to trigger the alert.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-587\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp7.png\" alt=\"Script Portlet in Websphere Portal Server v8.5 - #2\" width=\"1600\" height=\"638\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp7.png 1600w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp7-300x120.png 300w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp7-768x306.png 768w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp7-1024x408.png 1024w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-588\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp8.png\" alt=\"Script Portlet in Websphere Portal Server v8.5 - #2\" width=\"388\" height=\"154\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp8.png 388w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp8-300x119.png 300w\" sizes=\"auto, (max-width: 388px) 100vw, 388px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-589\" src=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp9.png\" alt=\"Script Portlet in Websphere Portal Server v8.5 - #2\" width=\"645\" height=\"286\" srcset=\"http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp9.png 645w, http:\/\/www.middlewareprimer.com\/blog\/wp-content\/uploads\/2016\/04\/sp9-300x133.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Part <span style=\"text-decoration: underline;\"><a href=\"http:\/\/www.middlewareprimer.com\/blog\/2016\/04\/10\/scriptportlet-in-websphere-portal-server-v8-5-1\/\" target=\"_blank\">#1<\/a><\/span> explains on how to install and deploy script portlet.<\/p>\n<p>IBM Knowledge Center <a href=\"http:\/\/www-01.ibm.com\/support\/knowledgecenter\/SSHRKX_8.5.0\/welcome\/script_welcome.html?lang=en\" target=\"_blank\"><span style=\"text-decoration: underline;\">link<\/span><\/a> for reference explaining about Script Portlet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Script Portlet in Websphere Portal Server v8.5 &#8211; #2 In #2, we will create a page in Portal and then create a sample code that runs on script portlet. Navigate to Websphere Portal Admin console and create a new page. Page name: scriptportletpage Make sure that Edit mode is ON. Click on Toolbar and then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[131,158,159],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-websphere-portal-server","tag-portal-v8-5","tag-script-portlet","tag-scriptportlet"],"_links":{"self":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":3,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":590,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/90\/revisions\/590"}],"wp:attachment":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}