Wednesday, October 16, 2013

Customizing UI elements of the Authoring Template


Wow, its quite useful feature!!!. Now we have a ability to change the UI of the authoring field using custom JSP.


Benefits:-

1. Change the UI look and feel as per customer input
2. Restriction on the input value
3. Opportunity to write business logic on fly


Steps to do:-

1. Edit authoring template
2. Go to Default Content Properties
3. Click on "page icon"(properties) next to the field for which you need to customize the UI
4. Give the JSP path in the Custom JSP field. For ex: "/jsp/html/customUIField.jsp"
5. Place the custom jsp at "/wcm/wp_profile/installedApps/node/PA_WCM_Authoring_UI.ear/ilwwcm-authoring.war/jsp/html"

Ref: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/index.jsp?topic=/com.ibm.wp.zos.doc/wcm/wcm_dev_custom_jsp.html

Tuesday, October 15, 2013

WCM API online reference


WCM API online reference

http://public.dhe.ibm.com/software/dw/lotus/portal_javadoc/80/wcm/api-javadoc/index.html

Saturday, October 12, 2013

workspace.getById() throws AuthorisationException

Recently came across a requirement to migrate JSP component scripts from 6.1 to 8. In the process of migration found that workspace.getById() WCM API call is not functioning. 

Looking at the logs one could see following kind of error

com.aptrix.pluto.security.AuthorisationException: IWKPY1015X: 
Unauthorised access by {{employeenumber=11111111,ou=people,ou=b2e,ou=ebusiness, 8ef21840-54a0-102c-96c8-950414f94614, fi, Type: User}, 4, {false, {userAccess={}}, {editorAccess={}}, {managerAccess={}}, [all_auth_portal_users%all_auth_portal_users_group_id, anonymous_user%anonymous_user_id, all_users%all_users_group_id


The surprising thing is this happens in-spite of giving "Anonymous user access" 
When looked at the details found following 

In Websphere Portal 8, WCM API calls from custom JSPs by default relies on "Contributor" access to the target content. 

If one wants to override this rule could place following call just before the getById() call.

workspace.useUserAccess(true)


Ref: https://www-304.ibm.com/support/docview.wss?uid=swg21399507