How to get current page id from within a portlet in WebSphere Portal
Posted by jacomac in Uncategorized on July 22nd, 2010
Here’s how to get current Page Id from within a portlet in WebSphere Portal 6.1:
NavigationSelectionModel navModel = // see http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/dev/dgn_modelxmp.html on how to get the NavigationSelectionModel
NavigationNode navNode = (NavigationNode) navModel.getSelectedNode();
if (navNode != null) {
ContentNode contentNode = navNode.getContentNode();
if (contentNode != null) {
pageId = contentNode.getObjectID();
}
}
The Servlet Request can be accessed via com.ibm.wsspi.portletcontainer.portlet.PortletUtils.getHttpServletRequest(javax.portlet.PortletRequest).
Facilitating WebDAV usage on Windows XP
Posted by jacomac in Uncategorized on March 20th, 2010
The default WebDAV client on Windows XP is not as usable as it could be. But luckily you can turn web folders into fully featured network drives by applying some more configuration. I just learned that from this blog and the Simple Groupware WebDAV Server web site. Really good to know when working with WebDAV on windows, I believe.
Here is a summary How-to: Read the rest of this entry »
Disable built-in ZIP Support on Windows XP
Posted by jacomac in Uncategorized on December 10th, 2009
Windows XP has built-in ZIP support to manage and explore ZIP archives, which can slow down folder browsing considerably. It is possible to disable the built-in ZIP support in Windows XP. Here is how to do it:
Read the rest of this entry »
Linux cheat sheet
Posted by jacomac in Uncategorized on November 3rd, 2009
Empty an existing file: (see also here):
tail -5 my.log > my.log
Trigger a process and let it run while you’re logging out again (see also here):
nohup <command> &
or, for being able to reattach later, start with
- type
screenand submit - trigger your longer-running process
- detach with the sequence
ctrl + aandctrl + d - logout
- later, when logging in again, you can reattach to that console session with:
screen -r
for the latter, see also this tip.
Symbolic links (see also here):
- Creation:
ln -s target link_name - Removal: simply delete it using e.g.
rm. It is a file of its own and deletion will not affect the target it is pointing at.
Recent Comments