From jbosstools-commits at lists.jboss.org Thu Jan 29 12:36:49 2009 Content-Type: multipart/mixed; boundary="===============7915034767556730099==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r13346 - branches/jbosstools-3.0.0.CR2/portlet/docs/reference/en. Date: Thu, 29 Jan 2009 12:36:49 -0500 Message-ID: --===============7915034767556730099== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ochikvina Date: 2009-01-29 12:36:49 -0500 (Thu, 29 Jan 2009) New Revision: 13346 Added: branches/jbosstools-3.0.0.CR2/portlet/docs/reference/en/master_output.xml Log: https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml; Added: branches/jbosstools-3.0.0.CR2/portlet/docs/reference/en/master_outpu= t.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/jbosstools-3.0.0.CR2/portlet/docs/reference/en/master_output.x= ml (rev 0) +++ branches/jbosstools-3.0.0.CR2/portlet/docs/reference/en/master_output.x= ml 2009-01-29 17:36:49 UTC (rev 13346) @@ -0,0 +1,874 @@ + + + + + + + + + + + + + + + + + + + = +]> + = + + JBoss Portal Tools Reference Guide + = + OlgaChikvina= + SnjezanaPeco= snjezana.peco(a)redhat.com + SvetlanaMukhinasmukhina(a)exadel.com + ThomasHeute= theute(a)jboss.org = + = + September 2008 + + 2008 + JBoss, a division of Red Hat Inc. + + + Version: 1.0.0.CR1 + + = + + + + + + Introduction + + Starting from 3.0.0.Alpha1 version, JBoss set of plugins extends= JBoss Portal + features. Thus, this guide is intended to explain you how to manag= e the functionality + JBoss Tools provide to = ease the development with JBoss + Portal. + +
+ Preface + JBoss Portal provides= an open source platform for hosting and + serving a portal's Web interface, publishing and managing its = content, and customizing + its experience. It supports a wide range of features, includin= g standard portlets, + single sign-on, clustering, and internationalization. +
+ +
+ Key Features + The next table lists key features supplied by JBoss Portal Tools. + + + Key Functionality of JBoss Portal Tools + + + + + + + + + Feature + Benefit + Chapter + + + + + + + + Wizards for creating Projects with Portl= et Facets + + + New Dynamic Web Project wizard allows yo= u to select a proper + Configuration to enable Portlet Facet in i= t. + + + Creating a Dynamic + Web Project + + + + + + + Create Java Portlet wizard + + + + The wizard enables creating a JSR-186/JS= R-286 compliant + portlet. + + + Adding J= ava Portlet to a + project + + + + + + Create JSF/Seam Portlet wizard + + + This wizard allows to create JSF/Seam po= rtlets + + + Creating JSF Por= tlet + Creating Seam P= ortlet + + + + + +
+
+ +
+ Other relevant resources on the topic + + + + + JBoss= Portal Home Page + + + + + + = JBoss Portal Wiki + + + + + + JBoss Tools= Home Page + + + + + + JBoss Tools Forum + + + + + + The latest + JBossTools/JBDS documentation builds + + + + + + Stable JBossTools/JBDS + documentation (supplied with the latest JB= DS release, 1.1.0 GA + currently) + + + +
+ + + = + + + Installation issues + + This section provides you with the steps on how to start with JBoss + Portal and integrated features using JBoss Tools. + + + + First, you need to have Eclipse Ganymede with JBoss Tool= s 3.0.0.Alpha1 and higher installed. + + + Tip: + Read JBoss Tools + Installation section in our Getting Started do= cumentation to find out + how to install JBoss Tools= onto Eclipse. + + + + + Next, download the JBoss Portal + JBoss AS bundle from <= ulink url=3D"http://www.jboss.org/jbossportal/download/index.html">JBoss Po= rtal Download + page
+ + + Note: + You need JBoss Portal 2.7 if you want to work with a= Portlet 2.0 + + + + + + Extract the bundle wherever you want on your hard drive<= /para> + + + + Now, when you have it installed, we are going to demonstrate som= e powerful features of + JBoss Portal tooling for Ec= lipse. + + + = + + + Starting the Project with JBoss Portal + + To get started with JBoss Portal and JBoss + Tools, you should first have a Web Project pointed to t= he JBoss Portal Runtime. + Thus, in this chapter we are going to show you how to create a Dyn= amic Web Project, add Java + Portlet to it and deploy it to the JBo= ss Portal. + +
+ Creating a Dynamic Web Project + + To create a Dynamic Web Project, go to + File > New > Dynamic Web= Project + if you are in the Web = Perspective or File > + New > Other > Web > Dynamic Web Project in any other Perspective. The + first page of the New Dynamic Web Project wizard looks as foll= ows. + +
+ New Dynamic Web Project + + + + + +
+ + Fill out the name of your project. Next, click the + New + button in the + Target Runtime + section to specify a new Target Runtime. Click + JBoss 4.2 Runtime + and press + Next. + +
+ New Server Runtime + + + + + +
+ + On the next page you should give a name to the runtime. Let'= s call it + JBoss Portal 2.7 Runtime + , and then point it to the location of your JBoss A= S + Portal + installation. + + + Note: + + The JBoss Tools Portlet feature has been tested using 2.= 6.5 and 2.7.0.ALPHA + versions of JBoss Portal. Remember, if you want to use Portlet + version 2.0 (JSR-268), you have to choose JBoss Portal 2.7= . + + +
+ Target Runtime + + + + + +
+ + Click + Finish.<= /para> + + On the next step you should click the + Modify + button next to the Con= figuration section to enable + Portlet Facets for the project. + + + +
+ Setting the Project Configuration + + + + + +
+ + On this page you should check the + JBoss Core Portlet + and press + OK + . + +
+ Enabling the Portlet Facet + + + + + +
+ + The last wizard page is for configuring web modules. Here al= l values are set, so you + can leave everything as it is. + +
+ The Project Web Modules + + + + + +
+ + Press + Finish. + + + That's it! Our base project is done. + +
+ +
+ The Project Structure Overview + + Now, let's look at the structure of the just created project= . + +
+ The Project Structure Overview + + + + + +
+ + Here JBoos Tools adde= d JBoss Portlet facet to the project, + created an empty + portlet.xml + file and added the Portlet library to the project = classpath. +
+ +
+ Adding a Java Portlet to the Project + + At this point we'll show what the steps you need to proceed = to add a new Java + Portlet to the project. + + Call the Create Portlet wizard by selecting + New > Other > JBoss Tool= s Web > Portlet > Java + Portlet. + +
+ New Java Portlet + + + + + +
+ + The wizard fills in the Web Project and Source Folder fields= for you. Then you need to + specify the Java package and the Class name and click + Next + . + +
+ Specifying Class File Destination + + + + + +
+ + On the other page you will be able to set the display name o= f the Portlet, a title, a + description, the supported modes and init parameters. + +
+ Specifying Class File Destination + + + + + +
+ + On the next screen you can define which methods from + GenericPortlet you want to override.<= /para> + +
+ Specifying Class File Destination + + + + + +
+ + The last screen lets you build J= Boss Portal specific descriptors + to create an instance during the deployment and place it direc= tly on the Portal. + +
+ Specifying Class File Destination + + + + + +
+ + + Tip: + + If you uncheck the Create Portlet Instance checkbox, + JBoss Tools won= 't create the deployment elements + in the default-object.xml and + portlet-instances.xml files. + + + Once Java Portlet is created, new resources have been added = to the project structure. + As you can see on the figure below, it adds a Java Portlet cla= ss ( + TestPortlet.java + in our case), + default-object.xml + and + portlet-instances.xml + files and updates + portlet.xml + as well. + +
+ The structure of Web Project with Java Portlet created<= /title> + <mediaobject> + <imageobject> + <imagedata fileref=3D"images/starting_project/starting= _project_12.png"></imagedata> + </imageobject> + </mediaobject> + </figure> + + <para>Thus, now the Project is ready to be built and deployed.</pa= ra> + </section> + + <section id=3D"deploying_to_portal"> + <title>Deploying a Portlet to JBoss Portal + + You can deploy the created project in the way you deploy any= other Web Application. + Right click on the project and do + Run As > Run On Server + and accept the defaults. On the + Add and Remove Projects + page move the created Project to the right and cli= ck + Finish.<= /para> + +
+ Deploying the Portlet Application + + + + + +
+ + It will deploy the Portlet Web Application and start JBoss + AS. + + + Tip: + + You should use http://localhost:8080/portal URL to see your + Portlet in the Browser. + + + In the Browser the Portlet looks as follows: + +
+ Java Portlet in the Browser Window + + + + + +
+ + Consequently, here you learnt how to create a Dynamic Web Pr= oject, add Java Portlet to + it and deploy the project to JBoss= Portal. +
+ +
+ + = + + + Creating JSF Portlet + + This chapter will explain how you can configure JSF Portlet with= in Dynamic Web + Project and JSF Project by using the wizards JBoss Tools provides. + +
+ Adding JSF Portlet to Dynamic Web Project + = + To add JSF Portlet to a Dynamic Web Project, you should set = the Configuration to + JavaServer Faces v1.1 Project + or + JavaServer Faces v1.2 Project + and configure the JSF Portlet Facets in the New Dynamic Web + Project wizard by clicking the + Modify + button. + = +
+ Setting the JSF Configuration + + + + + +
+ = + On the Project Facets dialog you should select JBoss Core Portlet + and JBoss JSF Portlet c= heck boxes. + = +
+ Enabling the Portlet Facets + + + + + +
+ = + Next wizard page is for configuring JSF Capabilities. You ca= n leave everything as it + is here. + = +
+ JSF Capabilities + + + + + +
+ = + To support Portlets in JSF/Seam applications JBoss Tools works + with JBoss Portlet Bridge. Thus on the next page you should add JSF Portlet + capabilities by pointing to the Portletbridge Runtime location= . + = +
+ JSF Capabilities + + + + + +
+ = + + Tip: + = + You can download JBoss Portlet Bridge 1.0.0.B4 from here. + + = + Next click + Finish + to organize the Project. + To add JSF Portlet to generated proje= ct you should call the + Create Portlet wizard b= y navigating to + New > Other > JBoss Tool= s Web > Portlet > JSF/Seam + Portlet. + = +
+ Calling New Portlet Wizard + + + + + +
+ = + As you see, the Seam and JSF Portlet wizards are merged into= one. We set JSF + Configuration for the project, so default values in this wizar= d will be set as for a JSF + portlet. + = +
+ Creating JSF Portlet + + + + + +
+ = + Click + Finish + to complete JSF Portlet creation. Now you can deploy t= he project the same + way as it was described = above. + = + In the Browser JSF Portlet looks as follows. + = +
+ JSF Portlet in the Browser + + + + + +
+
+ +
+ Adding JSF Portlet to JSF Project + = + How to organize a JSF Project you can find out in our J= SF Tools Reference Guide. Just + remember to point Target Runtime to JBoss Portal directory loc= ation. + = +
+ Creating New JSF Project + + + + + +
+ = + Before adding a Portlet to the project you should enable nec= essary facets for it. + Right-click the created project and click + Preferences + to open the Project Pr= eferences screen. + On the Project Facets= page select the + JBoss Core Portlet + and + JBoss JSF Portlet + checkboxes. And then the screen will ask you to enable= + JavaServer Faces + facet as well. + = +
+ Project Facets + + + + + +
+ = + Notice, + "Further configuration required...= " + warning appears at the bottom of the screen. It means = that you should click + it to configure JSF and JSF Portlet Capabilities in the projec= t. + = +
+ JSF Capabilities + + + + + +
+ = +
+ Project Facets + + + + + +
+ = + After setting the path to Portletbridge Runtime location, cl= ick + OK + and then + OK + again. + = + Now you can add JSF Portlet to the generated JSF Project. Ho= w to do it we showed in + the previous section.= +
+
+ + = + + + Creating Seam Portlet + + This chapter covers the steps on how to configure Seam Portlet w= ithin Dynamic Web + Project and Seam Project by using the wizards JBoss Tools provides. + = +
+ Adding Seam Portlet to Dynamic Web Project + + To add Seam Portlet to a Dynamic Web Project first you shoul= d organize New Dynamic Web + Project with the Configuration setting to + JBoss Seam Portlet Project v2.= 0. + +
+ Calling New Portlet Wizard + + + + + +
+ + It will add all needed facets to your project. By clicking t= he + Modify + button you can observe the chosen configuration of= facets as well as modify + it. As you can see, all JBoss Portlets are checked. + +
+ Project Facets + + + + + +
+ + Next wizard pages are for adjusting the Project Web Modules = and JSF Configuration. + They include default values, so you can skip them by pressing = + Next. + + On the Seam Facet pag= e set + Connection Profile and hit + Next. + +
+ Seam Facet Settings + + + + + +
+ + Last wizard page will prompt you to set the path to Portletb= ridge Runtime + location. + +
+ Setting the Portletbridge Runtime + + + + + +
+ + + Tip: + + Thus you should have JBoss Portlet Bridge downloaded and= extracted somewhere on + your hard drive. You can download JBoss Portlet Bridge 1.0= .0.B4 from here= . + + + Now, to add Seam Portlet to the project you should follow to= + New > Other > JBoss Tool= s Web > Portlet > JSF/Seam + Portlet. This will call the wizard f= or creating JSF/Seam + Portlets. + +
+ Calling the Create Portlet Wizard + + + + + +
+ + As we set Seam Configuration for the Dynamic Web Project, th= e wizard puts the values + as for Seam Portlet. + +
+ Creating Seam Portlet + + + + + +
+ + After creating the Seam Portlet, you should deploy + the project to JBoss Portal and start the Server. I= n a Browser + you'll see the following: + +
+ Seam Portlet in the Browser + + + + + +
+
+ = +
+ Adding Seam Portlet to Seam Project + = + First start a Seam Project by following to + New > Other > Seam > Seam= Web Project. On the first + wizard page specify JBoss Portal directory location as Target + Runtime and + JBoss Seam Portlet Project= v2.0 + as Configuration. + = +
+ Project Facets + + + + + +
+ = + Next steps will be the same as we did for the Dynamic Web Pr= oject in the Adding Seam Portlet to Dynamic= Web Project + section. +
+
+ + = + + + Adding Portlets to non-WTP Projects + + Starting from JBoss Tools 3.0.0.Beta= 1 version the JBoss Portlet + wizards no longer require a WTP project to be able to create Portl= ets. + + + Note: + Please note, if the project does not have the proper portlet= API jar's, the generated + classes will have compile errors. + + + In conclusion, with this document you've learnt how to get start= ed with JBoss + Portal using JBoss Tools suite of Eclipse plugins. + The above chapters walked you through the steps on how to organize= a web project with + portlets which includes a sample staff and deploy it onto the JBoss + Portal. + = + If you still have questions or suggestions you are always welcom= e on our Forum. Your feedback will be very much ap= preciated. + = + + + = +
--===============7915034767556730099==--