This is the second tutorial about Gatein. In the first one we showed how to create a basic Portlet and deploy it. In this tutorial we will show how to create a basic new portal using GateIn Portal.
Creating the Portal using the Gatein Wizard
The first thing you need to do in order to get started is logging into the GateIn Console http://localhost:8080/portal/ and Log In as "Administrator" (click on the lower Icon on the left labeled as "Administrator"). Now reach the "Site" Option on the upper Menu and click on it. You will see a list of available Portals. Click on "Add new Portal".
A little wizard will assist you in the creation of the new Portal. In the upper tab of this wizard you will need to define at first some basic Portal settings such as the Portal Name, the Locale and the Skin:
In the Properties tab you can specify how the session timeout is handled for the web portal. You can leave the default option ("On Demand"). If you don’t want the session to ever expire, you can select "Never" from the drop-down list.
In the Permission Setting you need to specify the user groups and roles who can access the portal and make modifications to it.
Check the option Make it public to everyone which means that the portal will be accessible to anyone, even anonymous users. Next you need to specify Permission Settings which define which users and groups are able to modify this portal.
Since we don't want to grant this option to anyone, we will choose to leave this job to the Administrator. The Administrator user has managermembership in the Administrators group, so to assign edit permission to the Administrator user you need to select in the left tree Platform->Administrator and in the right panel manager as the membership.
When you select the membership, the selected permission is displayed in the Edit Permission Setting tab, as shown here:
Fine we are ready to go so choose Save. Now if you move to the Upper Site Menu, you will see it now contains another option for your newly created Portal.
Adding Pages to your Portal
If you click on it you will see your DemoPortal in action which however, being based on the default template will now look much different from the Classic Portal. So let's customize our demo portal by removing at first the default Home page of our site. Select Site and then the "Edit Navigation" option.
There you can remove the default Home page node by right-clicking on it and Choosing "Delete Node".
Now let's add a new Home page node by clicking on the Add Node button. In the Page Node Setting enter as Node Name "Home". Next move to the Page Selector.
There we will associate our node with a Page. Since we don't have any other Page available just enter a name for the page as well and click on "Create Page" .
Note you can further refine the page navigation by selecting "Move up" option right-clicking on the Home page and moving it as first option. Click Save when you are done with it.
Editing the Portal Layout
The last step will be editing the Site layout which can be carried out through the "Edit Layout". Click on the Edit layout link. From there you can see a layout skeleton of your Portal. Try adding one portlet (we have described in this tutorial how to develop and deploy a simple portlet) and a Widget, like the Calendar Widget.
Once done click on the Save button into the "Edit Inline Composer" Window.
Here's your first Portlet, containing a Gadget Calendar Portlet and an HelloWorld Portlet which displays the current date/time!