In the previous example, the portlet doesn't have a view, so if you install it, you will see nothing in the page of the portal. In this recipe, you will see the complete configuration and creation of the views for the portlet.
Add a new view for the portlet using Groovy, WebUI's preferred scripting tool. With Groovy, it is very simple to handle the WebUI components. Therefore, we need to add a new component to handle it in the view.
Carry out the following steps:
MyPortlet.gtmplinside the path
<% def rcontext = _ctx.getRequestContext() ; %> <div id="$uicomponent.id" class="MyPortlet"> Started!!! </div>