School dropout
becomes MILLIONAIRE!
Read his NLP methods.

Monday, March 5, 2007

Task 3

Task:
  • SSL
  • Test cases for session timeout implemented in Task 2
  • Change to a company-oriented GUI
  • Fix task 2 bugs
Notes:
  • Task 2 bug fixed.
  • Found thread on SSL implementation here.
  • Notes on startup interface - Login to Liferay as administrator and switch to Guest Community (in the upper right corner of the page). The application startup page is shown, and modifications can be made on the layout just like a logged in home page.

Task 2 bug fix

Bug
  • My developed portlets refresh and somehow loses their sense of identity, rendering content of another portlet's.
Here's an example of what my portlet class is like:

public class BBPortlet extends StrutsPortlet {

public static final String DEFAULT_VIEW_ACTION = "/ext/bb/view";

public void init(PortletConfig config) throws PortletException {
super.init(config);

if (Validator.isNull(viewAction)) {
viewAction = DEFAULT_VIEW_ACTION;
}
}

}

I did read through the JSR-168 specs and was about to do a total revamp of my portlet classes when I realized this viewAction variable is nowhere declared. This if (Validator.isNull(viewAction)) line is actually quite standard across the struts portlets in Liferay and I had taken it for granted. What the heck, I tried commenting it out and did re-deployed. Voila! Everything works fine now and all the portlets are rendering the right content. Lesson learnt.