Foren

Liferay Portlet Button

kiesa viciius, geändert vor 12 Jahren.

Liferay Portlet Button

Junior Member Beiträge: 28 Beitrittsdatum: 22.08.11 Neueste Beiträge
hey ,

How can i add a normal button using Liferay?

I was using VaadinPortlet , in Vaadin you need only few rows :


	Button Config;

                HorizontalLayout fittingLayout = new HorizontalLayout(); 
                Config = new Button("Config");
                Config.addListener(this);
                fittingLayout.addComponent(Config);


I'd like to add 3-4 buttons in HorizontalLayout in liferayportlet any suggestions?

package com.test;

import java.io.IOException;

import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import com.liferay.util.bridges.mvc.MVCPortlet;

/**
 * Portlet implementation class NewPortlet
 */
public class KiviatPortlet extends MVCPortlet  {
	

 
	  public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
	  {
	  }
}


however it does not seem to work in liferay portlet



Any help is greatly Appreciated
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: Liferay Portlet Button

Liferay Legend Beiträge: 14915 Beitrittsdatum: 02.09.06 Neueste Beiträge
Vaadin is a different beast than the standard MVC portlet...

Using MVC, you'll create a JSP page that has a number of <input type="button" /> tags (with appropriate IDs and other attributes) to trigger things in your portlet code.

Vaadin, of course, is much easier because you're doing all of your button additions and event handling right in the java code.