When developing in Portlet Factory, I do the testing on my local server because it is faster than deploying onto the development websphere portal server. But somethings we have to develop and test directly in a portal server. What you have to do is to deploy the project onto the portal server. As you know the deployment will take some time. So a faster way is to copy the model directly from your Portlet Factory Eclipse workspace into the Portal deployment path.
From
<workspace path>\<project>\WebContent\WEB-INF\models\helloworld.model
To
<portal wp_profile path>\installedApps\<cell>\<app.ear>\<app.war>\WEB-INF\models\helloworld.model
Once you copy from your workspace to the server. Log out of the portal and log back in. Presto, the model update is there. This is only recommended for development and testing purposes only. For production environment it is better to package the project and update the application deployment.
Friday, February 27, 2009
Wednesday, February 18, 2009
Portlet Personalization, visibility rules using only lower case
In Websphere Portal, we want to hide some portlets in certain pages according to the user's group. Personalization function in the portal can be used for this.
I want to show the portlet if the user is in the group MYUsers. The fullname of the group is CN=MYUsers. Thus I've created a new Rule type Visibility.
By applying the rule to the portlet, it should hide the portlet if the login user is not in the MYUsers group. But there are some issue for the above rule. Using an LDAP browser, the group name is CN=MYUsers. But when applying it to the rule, it doesn't seem to be working.
The group name have to be set to lowercase to get it working.
The documentation does not state that the group name have to be in lowercase. Thanks to my colleague, after much trying around, he found that lowercase group name is working.
I want to show the portlet if the user is in the group MYUsers. The fullname of the group is CN=MYUsers. Thus I've created a new Rule type Visibility.
Show page or portlet when
current Portal Users.Groups includes CN=MYUsers
Otherwise hide
By applying the rule to the portlet, it should hide the portlet if the login user is not in the MYUsers group. But there are some issue for the above rule. Using an LDAP browser, the group name is CN=MYUsers. But when applying it to the rule, it doesn't seem to be working.
The group name have to be set to lowercase to get it working.
Show page or portlet when
current Portal Users.Groups includes cn=myusers
Otherwise hide
The documentation does not state that the group name have to be in lowercase. Thanks to my colleague, after much trying around, he found that lowercase group name is working.
Thursday, February 12, 2009
Apple's Design Process
There's an interesting article here from Michael Lopp, senior engineering manager at Apple, who tried to assess how Apple can ‘get’ design when so many other companies try and fail.
10 to 3 to 1
Apple designers come up with 10 entirely different mock ups of any new feature. Not, Lopp said, "seven in order to make three look good", which seems to be a fairly standard practice elsewhere. They'll take ten, and give themselves room to design without restriction. Later they whittle that number to three, spend more months on those three and then finally end up with one strong decision.
10 to 3 to 1
Apple designers come up with 10 entirely different mock ups of any new feature. Not, Lopp said, "seven in order to make three look good", which seems to be a fairly standard practice elsewhere. They'll take ten, and give themselves room to design without restriction. Later they whittle that number to three, spend more months on those three and then finally end up with one strong decision.
Tuesday, February 03, 2009
IBM Lotus Web Content Management Rendering Portlet
IBM have release an update to the Web Content Viewer portlet. You can download it from the portlet catalog.
The IBM® Lotus® Web Content Management Rendering Portlet provided with this package is a solution which updates and improves how the rendering of Web content is performed in IBM WebSphere® Portal. While the existing Web Content Viewer portlet (referred to in the WebSphere Portal documentation as a "rendering portlet") has evolved throughout several versions to implement sophisticated Web content rendering functions, it is still based on the deprecated IBM Portlet API. By contrast, the new JSR 286 Web Content Viewer has been entirely redeveloped based on the Java™ Portlet Specification 2.0 (JSR 286). In addition to the benefits afforded by JSR 286, the JSR 286 Web Content Viewer in this package also enables other features for Web content management, such as a new Web content portal page type and support for the standard search seedlist 1.0 format.
The IBM® Lotus® Web Content Management Rendering Portlet provided with this package is a solution which updates and improves how the rendering of Web content is performed in IBM WebSphere® Portal. While the existing Web Content Viewer portlet (referred to in the WebSphere Portal documentation as a "rendering portlet") has evolved throughout several versions to implement sophisticated Web content rendering functions, it is still based on the deprecated IBM Portlet API. By contrast, the new JSR 286 Web Content Viewer has been entirely redeveloped based on the Java™ Portlet Specification 2.0 (JSR 286). In addition to the benefits afforded by JSR 286, the JSR 286 Web Content Viewer in this package also enables other features for Web content management, such as a new Web content portal page type and support for the standard search seedlist 1.0 format.
Wednesday, January 14, 2009
Hiding navigation on web page when printing
When printing a web page, we want to maximise the content area for printing. To do this, I want to hide the navigation area when user is printing the page.
For example in a page, there are 3 area, header, left navigation and content.
When user click on print, only the content area is printed. This can be control using a seperate CSS to hide certain area when printing.
The sample is below.
Add the css link in the page. The media type = "print".
In print.css
This would hide the header and the nav div tag when printing.
For example in a page, there are 3 area, header, left navigation and content.
<div id="header">header</div>
<div id="nav">Left navigation</div>
<div id="content">Content area</div>
When user click on print, only the content area is printed. This can be control using a seperate CSS to hide certain area when printing.
The sample is below.
Add the css link in the page. The media type = "print".
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
In print.css
#header{display:none}
#nav{display:none}
This would hide the header and the nav div tag when printing.
Portlet Factory 6.1.2
Portlet Factory 6.1.2 is out. You can get the 60 days trial version here.
It looks like 6.1.2 is a new version and not an upgrade or fixpack for PF 6.1.
It looks like 6.1.2 is a new version and not an upgrade or fixpack for PF 6.1.
Friday, January 09, 2009
Highlighted Selected Content in Menu - WebSphere Content Management System
In a WebSphere Portal page, I inserted a few Web Content Viewer portlets. The top portlets shows a menu list the content. The bottom portlet will display the selected content from the list. The issue I had was highlighting the selected content in the menu.
From the forum, there were some suggestions but it didn't work for my case.
I manage to solve it by using the Content ID. The idea is, when the content is loaded, it can find which link in the menu is selected by the Content ID. Thus you can add in code to change the attributes.
In the menu component, I add in a class which is the content ID into the links.
Then in the presentation template I added dojo code to put in another class into the selected content.
Thus when the content is loaded, it will search the page for the class <Idnum> and add in the class selectedContent. For the Idnum here, I use a class instead of id because in certain pages, there are more than 1 links to the same content.
From the forum, there were some suggestions but it didn't work for my case.
I manage to solve it by using the Content ID. The idea is, when the content is loaded, it can find which link in the menu is selected by the Content ID. Thus you can add in code to change the attributes.
In the menu component, I add in a class which is the content ID into the links.
<A HREF="<Placeholder tag="href"/>" class="<Placeholder tag="Idnum"/>"><Element context="autoFill" type="content" key="headline"/></A>
Then in the presentation template I added dojo code to put in another class into the selected content.
<script>
dojo.addOnLoad(function(){
dojo.query(".<IDCmpnt context="current" type="content" field="id"/>")
.addClass("selectedContent")
});
</script>
<style>
.selectedContent{color:black;font-weight:bold;}
</style>
Thus when the content is loaded, it will search the page for the class <Idnum> and add in the class selectedContent. For the Idnum here, I use a class instead of id because in certain pages, there are more than 1 links to the same content.
Subscribe to:
Posts (Atom)