From 0d944e6e8ea5963b94109401432814321add9068 Mon Sep 17 00:00:00 2001 From: Henri Muurimaa Date: Wed, 30 Aug 2017 15:35:53 +0300 Subject: Migrate first Wiki article (#9902) Created the folder "articles" under documentation, added img folder for article images and added one article. --- ...pingPortletsForTheWebsherePortalServer.asciidoc | 95 +++++++++++++++++++++ documentation/articles/contents.asciidoc | 13 +++ .../articles/img/Click_Me_2015-03-31_21-03-27.png | Bin 0 -> 12182 bytes 3 files changed, 108 insertions(+) create mode 100644 documentation/articles/DevelopingPortletsForTheWebsherePortalServer.asciidoc create mode 100644 documentation/articles/contents.asciidoc create mode 100644 documentation/articles/img/Click_Me_2015-03-31_21-03-27.png diff --git a/documentation/articles/DevelopingPortletsForTheWebsherePortalServer.asciidoc b/documentation/articles/DevelopingPortletsForTheWebsherePortalServer.asciidoc new file mode 100644 index 0000000000..1edcd0bb71 --- /dev/null +++ b/documentation/articles/DevelopingPortletsForTheWebsherePortalServer.asciidoc @@ -0,0 +1,95 @@ +[[developing-portlets-for-the-websphere-portal-server]] +Developing portlets for the Websphere Portal Server +--------------------------------------------------- + +When creating portlets for the Websphere Portal Server (aka WPS) you +have the choice between different frameworks + +* JSF (2.0) +* Spring Portlet MVC +* Vaadin 6 / 7 + +While using JSF seems to be a bit outdated, because WPS just supports an +old JSF Version (MyFaces 2.0.2) Spring Portlet MVC is a good and valid +options for developing portlets. + +On this page I will try to collect all information to +develop Vaadin portlets in a fast and easy to use way. I will also +handle topics like using CDI and the navigator in a portal environment +as well as some architectural ideas like using the MVP pattern for a +portlet project. As an example portlet I will use a simple master / +detail portlet just like the Vaadin address book application. I have +developed all code examples on this wiki pages with the current Vaadin +version (7.4.2 as I am writing this) and tested the portlets on WPS 8.0 +and 8.5. + +I use Maven for dependency management and SLF4J for logging. You can +download the small zipped project in the attachments section. Please, +feel free to leave comments and / or questions on the bottom of the +page. + +[[a-simple-portlet]] +A simple Portlet +~~~~~~~~~~~~~~~~ + +Lets start with a "Click Me" (aka "Hello World") Vaading portlet. + +The UI class is identical to servlet development (create a button with a +click listener and show a notification when clicking the button). The +interesting part is the configuration of the portlet.xml file. + +[[portlet.xml]] +Portlet.xml +^^^^^^^^^^^ + +[source] +.... + +      +          + Vaadin Click Me Portlet          + Vaadin Click Me Portlet          + Vaadin Click Me Portlet         + com.vaadin.server.VaadinPortlet + +            + UI            + com.gisag.vaadin.ClickMeUI          +          + +              + productionMode              + false          +      +      +            + Path of all static vaadin resources (configurable from context root)              + vaadin.resources.path              + PORTLET_CONTEXT        + + +          +              + text/html              + view          +      + + +.... + +In the `portlet` tag you have to set a value for the `portlet-class`. For +this simple we can use the default Vaadin portlet class +`com.vaadin.server.VaadinPortlet`; you also have to name you UI class as a +portlet init parameter. + +To let WPS find the Vaadin javascript and theme resources you have to +use the portlet init parameter `vaadin.resources.path`. The value +`PORTLET_CONTEXT` is a Vaadin constant value that makes the vaadin +resources available in the portlets resource path. + +Run the Maven build with `clean package` as goals and deploy the created +war file in the portal administration. Create a blank portal page and +add your portlet to the page. Your "Click me" portlet should look like +this: + +image:img/Click_Me_2015-03-31_21-03-27.png[Your first portlet] diff --git a/documentation/articles/contents.asciidoc b/documentation/articles/contents.asciidoc new file mode 100644 index 0000000000..a1c126f432 --- /dev/null +++ b/documentation/articles/contents.asciidoc @@ -0,0 +1,13 @@ += Community articles for Vaadin Framework + +Helpful articles about Vaadin Framework written by the users for the users. The +articles are presented as written by the author. Vaadin does not edit or maintain them. +Pull requests welcome! + +NOTE: All contributions are very welcome! Just write your article in link:asciidoctor.org/docs/asciidoc-writers-guide[AsciiDoc], +put it in this directory and send us a pull request. Updates to existing articles +are great, too. + +[discrete] +== Articles +- link:DevelopingPortletsForTheWebspherePortalServer.asciidoc[Developing Portlets for the Websphere Portal Server] diff --git a/documentation/articles/img/Click_Me_2015-03-31_21-03-27.png b/documentation/articles/img/Click_Me_2015-03-31_21-03-27.png new file mode 100644 index 0000000000..72f88a7d64 Binary files /dev/null and b/documentation/articles/img/Click_Me_2015-03-31_21-03-27.png differ -- cgit v1.2.3