Struts2+Liferay Service Builder +JqGrid Liferay portlet


Struts2+Liferay Service Builder +JqGrid   Liferay portlet

Objective:
Create liferay portlet using Struts2, struts jqGrid   and Liferay Service builder.
Before read this article we need to have good understanding in spring frame work struts framework and hibernate and have knowledge on annotation.

The following are the reference links to get knowledge.


Here Struts is used as controllers and liferay service layer  for persistence logic.
Steps to run port let.
1.     Take the portlet from following location.

2.     Place portlet into your plugins/portletsdirectory
3.     If you are use Eclipse ide create portle as existing source.
5.     Run ant build-service and ant deploy commands
6.     See in samples category
7.     Drag and drop into page and add the user using UI.
8.     And Users View users screens.
Screen shots: 
Screen:1

Screen:2
Screen:3

Screen:4

Note: This portlet done in liferay 6.0.6 version.
IF you want run this in liferay 6.1 version first create one mvc port let thorough the Liferay IDE and copy manually all files to newly created one.
Please make sure dtd version of liferay xml files.
For liferay xml  xml files copy content to respective xml files then there no effect in dtd files of liferay.
Share on Google Plus

About Meera Prince

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

7 comments:

  1. i create another package with your portlet, i call it myportlet, i allready named the nameSpace and else . so far so good. done with strut.xml action

    but i confuse why my return string wont show ( )
    the result went to the jsp i set ( i made a condition success and error .

    her my class package com.lkpp.pusdatin.action;

    import org.apache.struts2.dispatcher.DefaultActionSupport;


    public class helloword extends DefaultActionSupport {

    /**
    *
    */
    private static final long serialVersionUID = 2352134545L;

    private String message;

    private String name;

    public String execute() {
    if (this.name.equals("admin")) {
    setMessage("Hello" + getName() );
    return "SUCCESS";
    } else {
    return "ERROR";
    }

    }

    public String getMessage() {
    return message;
    }

    public void setMessage(String message) {
    this.message = message;
    }



    public String getName() {
    return name;
    }

    public void setName(String name) {
    this.name = name;
    }
    }


    i need your help

    regads

    Arif Rahman

    ReplyDelete
  2. Hi please Configure you struts.xml file properly and that should point to your action class.

    ReplyDelete
  3. Hi, why message errors does'nt show up!!!

    ReplyDelete
  4. Hi,good job.
    but i do need your help for struts2 validations. it's not working for me ! can u help me

    ReplyDelete