</init-param>
<init-param>
<name>style</name>
- <value>style=height:400px</value>
+ <value>height:400px</value>
</init-param>
<init-param>
<name>widgetset</name>
</init-param>
<init-param>
<name>style</name>
- <value>style=height:650px</value>
+ <value>height:650px</value>
</init-param>
<init-param>
<name>widgetset</name>
</init-param>
<init-param>
<name>style</name>
- <value>style=height:650px</value>
+ <value>height:650px</value>
</init-param>
<init-param>
<name>widgetset</name>
public abstract class AbstractApplicationPortlet extends GenericPortlet
implements Constants {
+ /**
+ * This portlet parameter is used to add styles to the main element. E.g
+ * "height:500px" generates a style="height:500px" to the main element.
+ */
+ public static final String PORTLET_PARAMETER_STYLE = "style";
+
private static final String PORTAL_PARAMETER_VAADIN_THEME = "vaadin.theme";
// TODO some parts could be shared with AbstractApplicationServlet
String classNames = "v-app v-app-loading " + themeClass + " "
+ appClass;
+ String style = getApplicationProperty(PORTLET_PARAMETER_STYLE);
+ String divStyle = "";
+ if (style != null) {
+ divStyle = "style=\"" + style + "\"";
+ }
page.write("<div id=\"" + request.getWindowID() + "\" class=\""
- + classNames + "\"></div>\n");
+ + classNames + "\" " + divStyle + "></div>\n");
page.close();
}
import com.vaadin.Application;\r
\r
/**\r
- * @deprecated Use Portlet 2.0 class {@link ApplicationPortlet2} instead.\r
+ * Portlet main class for Portlet 1.0 (JSR-168) portlets which consist of a\r
+ * portlet and a servlet. For Portlet 2.0 (JSR-286, no servlet required), use\r
+ * {@link ApplicationPortlet2} instead.\r
*/\r
-@Deprecated\r
@SuppressWarnings("serial")\r
public class ApplicationPortlet implements Portlet, Serializable {\r
// portlet configuration parameters\r