IBM WebSphere Portlet Factory Tutorial

icon

23

pages

icon

English

icon

Documents

Le téléchargement nécessite un accès à la bibliothèque YouScribe Tout savoir sur nos offres

icon

23

pages

icon

English

icon

Ebook

Le téléchargement nécessite un accès à la bibliothèque YouScribe Tout savoir sur nos offres

IBM WebSphere Portlet Factory TutorialTutorial - Using Domino Collaboration Builders OverviewWebSphere Portlet Factory contains specialized builders in the Lotus Collaboration Extension feature set that are used to work with data stored in Domino databases. Domino View and Domino View and Form are the two builders that can access Domino databases. These builders can be used in applications and portlets directly or via Service Oriented Architecture (SOA). In this tutorial, you will use both techniques. Portlet Factory Page Automation will then be used to display, create, and modify the Domino data.View categorization is common in Domino applications. Portlet Factory supports displaying tabular data using categories via the Category View builder. This builder can rely on Domino to categorize the view or it can use a flat Domino view and compute the categories itself. You will used both techniques to become familiar with them.Document data can be read, edited, created and deleted using Domino View and Form. Simple checkbox options enable these major features and automatically add code, navigation buttons, and all other artifacts needed to make them work properly. You will use all of these features to promote your understanding of how to employ them.The Lotus Collaboration Extension feature set also includes several other builders to enhance use of Domino data in a web application or portlet. The Domino Keyword Lookup builder is used to retrieve ...
Voir Alternate Text

Publié par

Nombre de lectures

24

Langue

English

IBM WebSphere ProltteF caotyrT orutlia fo 1( m2/5/9)32518:6 00
Tutorial - Using Domino Collaboration Builders  
AM5 :1
Domino data can also be accessed using SOA. Many Lotus Notes / Domino applications include features that retrieve lists of user names from the Domino Directory. Since it is common for numerous applications to need this same data, it makes sense to create centralized data services that produce these names. In this tutorial, you will create a Service Provider that accesses the Domino Directory's ($VIMPeople) view. You will then add a Service Consumer builder to the application model in order to apply these names as a list of choices in a select list.
The Lotus Collaboration Extension feature set also includes several other builders to enhance use of Domino data in a web application or portlet. The Domino Keyword Lookup builder is used to retrieve label-value pairs from a Domino view. These label-value pairs are then used the same way a regular Lookup Table builder is used. It is very common to use these pairs in HTML UI elements such as radio buttons and select lists. The Domino Formula builder accepts Lotus Notes formula language expressions to produce dynamic text strings in much the same way computed text or Computed for Display fields are used in Lotus Notes and Domino-rendered web applications. You will used both of these builders in this tutorial.
Once you complete this tutorial, you should have a solid understanding of how to use Domino data in web
An important part of many Domino-rendered web applications is the ability to run Web Query Save agents in conjunction with submitting a new document or a document update. This type of agent gets invoked automatically when the form used to submit the document contains a reference to the agent. The Domino-side mechanism that triggers this agent only functions when the document is submitted via HTTP. Portlet Factory accesses Domino data via DIIOP, therefore, the Domino view and Form builder contains a mechanism for triggering agents during the submit process. Although the procedure is different, the net result is same: submitted documents can be post-processed immediately via agents. Portlet Factory offers a bit more flexibility here as different agents can be run for new documents versus updated ones.
WebSphere Portlet Factory contains specialized builders in the Lotus Collaboration Extension feature set that are used to work with data stored in Domino databases. Domino View and Domino View and Form are the two builders that can access Domino databases. These builders can be used in applications and portlets directly or via Service Oriented Architecture (SOA). In this tutorial, you will use both techniques. Portlet Factory Page Automation will then be used to display, create, and modify the Domino data.
Overview
Document data can be read, edited, created and deleted using Domino View and Form. Simple checkbox options enable these major features and automatically add code, navigation buttons, and all other artifacts needed to make them work properly. You will use all of these features to promote your understanding of how to employ them.
View categorization is common in Domino applications. Portlet Factory supports displaying tabular data using categories via the Category View builder. This builder can rely on Domino to categorize the view or it can use a flat Domino view and compute the categories itself. You will used both techniques to become familiar with them.
P///af/|rotceD/yorvW/TksorutlsiaI/snrtcuitno/suTtorial_Domino.htli:ef
slaisnI/curtnoitDey/orvW/Tksorut.oth m2(o  f329)s/Tutorial_Domin//P/li:etcro/|affAM
Setup Requirements
To make this tutorial work properly, a certain amount of setup is required. Some tasks must be performed in Portlet Factory and others in Domino. Those requirements are described below.
WebSphere Portlet Factory Setup
1. Complete the tutorials that ship with WebSphere Portlet Factory.
It is necessary to complete the following tutorials so that you have the basic understanding of WebSphere Portlet Factory concepts.
Creating a Web Application Project Creating a Simple Portlet Creating Data-Driven Portlets
2. Optionally, create a page in WebSphere Portal. For convenience, create a new page so that it is either a child or a sibling of one of the pages used in an earlier tutorial. 3. Create a new WebSphere Portlet Factory project containing the Lotus Collaboration Extension feature set or add this feature set to an existing project. 4. Set the Domino configuration properties. a. In the project you made for this tutorial, expand the WEB-INF\config\domino_config  _ _ Note : If y con folder and locate the default domino server.properties file. ou nect regularly to several different Domino servers, you can create several of these properties files and switch between them by choosing the correct file in the Domino builders. b. Open this file and set the properties as needed. i. ServerName= use the hostname of the Domino server and not the Domino server name itself, i.e., hostname instead of ServerName/Organization . No port number is needed unless HTTP is running on the Domino server on a port other than the default port of 80 . ii. UserName= the common name of a user with permission to use DIIOP on the server and with at least Editor access to the Notes databases you plan to connect to. In this tutorial, you will use DominoTutorialEmployees.nsf and Names. nsf . By default, the Domino server, DIIOP, and these databases will be accessible by any authenticated user. Note : Only the user's common name is needed although the user's fully distinguished name will also work. iii. Password= the internet password of the user specified in the UserName property. c. Save and close this file.
Domino Setup
1. Ensure the Domino server is running. 2. Ensure there are at least 2 or 3 Person documents in the server's Domino Directory. Having only
5/2/00 6:8151: 5 portlets.palpcitaoisna dny orctFaalritoTu erehpSb teltroPM WeIB
file://tcaf/|P/WveD/yrout/Tksor/IlsiaorcuitsnrtuTotno/s_Domrialhtm ino. 5MA
a. Views i. All Employees - A simple view that will be used by WebSphere Portlet Factory to retrieve employee data for display in a table. ii. All By Department - A categorized view containing all of the employee records categorized by department ID. iii. All By Last Name - A flat view containing all of the employee records sorted by last name. iv. Lookup > Departments - A utility view containing department names and department IDs. It is used programmatically by the Notes application and by Portlet Factory to associate the names with the IDs to gain certain user interface benefits for data entry and display. b. Forms i. Employee - A form used for display and data entry of employee data in Lotus Notes and Domino-rendered pages. Portlet Factory will use it to build schemas for data entry and display. ii. Department - A form used for display and data entry of department data in Lotus Notes and Domino-rendered pages. This form will not be used by Portlet Factory in this tutorial but the department data will be used. c. Agents i. FixApproverName - A hidden agent that uses the NoteID that gets passed to the agent when invoked by Portlet Factory to get the document being submitted. Portlet Factory will invoke this agent after employee records have been added or edited. Its function is to canonicalize names in the Approver field, i.e. to convert User Name/ Org Name to CN=User Name/O=Org Name . ii. Remove Approvers - An agent that runs against all selected documents. This agent removes the data in the Approver field from all selected documents and is included as a convenience.
6. Familiarize yourself with the contents of this database via a web browser. You can open this database via the following URL
 6:8151:)9/5/200(3 of 23torial.  this tuasyr ,erfIn cesecttee ur Aedhircoitcfo nAOS(es )torinoTuDomithe sn fee.slpyolamEes tew f aerstgi tuP  .3.sresu tF caotyrT turoailone test user iIW MBSpebreheor Pettluqtaaned rht eofrvice Seiente OroD eht nriD onim wrytoec ibel ilis mhe ts,leab tsriF fo gnillepsstNm Fire astNamev.dsere srp eawhe tix F  4.gnSiemaNega rppArevoe Dominont in thmElpyoeeuTotirla selbat ihs taht Cthwip apscudlo dBD enam na 2saopley pe alr areydaemaf ailiiw r tthm.heot N Fe:roc noistsneycw ith those sampleaislturoset\malpe>\stnamojec <pr esabatad sihT .oypldenoo\inom\daptremtn ena ded employecontainsas eelpmorf ht mer dedivec rdsorno sDomir. Terveabesadatht eo  njero phe cou yctelif siht ni si tutorial and is ertadef rot ih swilo lngatocn:ionuofni deht lof e viabasLotua a et s soNtn.lceih it wlfntcoe th fo stnetad sihtnistrator.5.  Faimilrazi eoyruesnt ee irtadasebaaiv moD  oniimdAyl ,itevreanA tl thesigncan you  deggol elihw rer.se uisths  ainva etiv nea dns o Designia Dominngisiht yaw  ot  tisopo ags t en ehT .pitselpmisp ougra shermbmecitixelp rivylo entsa agher  eittoL cSsutpirvaJ/Rud ren ristedctht eifle dalebelSecurity tab in e thn  ontmecudo revres eht ni distebe lust me m ranu esres'isng. ore ThisinattronimmdA o reoD ro Designia Dominatabesv .ssn fad
torinoTuDomier>/sn/fee.slpyolamE<h//p:ttlhiaorutbmuntrop:emantsoamtNOpe?lBAlasyLiVnewe Fettlor TrytoacbeW MBIP erehpS
Working with Domino View Data
You should see a simple, Domino-rendered web application. Use the action buttons across the top of the page to navigate between views and create new employee records. Use the links in the views to open individual employee records.
MA 51
1. Create the new model. a. From the File menu, choose File > New > WebSphere Portlet Factory Model . The New Model Wizard will open. b. In the Choose Project screen, select the project you created in the Setup Requirements section and click Next . c. In the Select Model screen, choose Factory Starter Models > Empty and click Next . d. Name and save the new model. i. In the Save New Model screen, expand the folder structure and select models/
While adding a Domino View and Form builder, you will choose one of the views in the Domino database. View names can be chosen using either their full names or their aliases. Hidden views are also supported.
The Portlet Factory Domino integration builders are powerful, high-level builders. An application that displays the data from a Domino view can be made by adding only one of these builders to a model. Either a Domino View or a Domino View and Form builder is all that is needed. In this section, you will build such an application by using a Domino View and Form builder.
Creating a Domino-Driven Model
Once the Domino data is consumed by a Domino View and Form builder, other builders can be used to enhance the appearance of the data display. For example, a Category View builder can categorize a flat view. The resulting categorization in the web application will look familiar to Domino application developers. This builder also resolves certain traditional shortcomings of Domino-rendered categorized views. For example, a Category View builder allows multiple categories to remain expanded simultaneously.
Since Portlet Factory builds the schema directly from a view, it can be useful to create a view for this sole purpose. By performing this task, one can easily control the node names, node order, and data types Portlet Factory will use to build the schema. It can also be useful to include column formulas to manipulate the raw Domino data before Portlet Factory consumes it. To keep things simple, however, this section uses a view called All Employees which is a flat view containing all of the fields in the employee records using simple column names and no column formulas other than the names of the fields.
This section focuses on using a Domino View and Form builder to access tables of Domino data found in Domino views. This type of builder examines any given view from a Domino database and builds an XML schema from it. The node names and data types used in the schema are derived from the view column names and the data in the columns. Any view can be used but a flat view without any categorizing works best for generating the schema for working with view data.
:15:8 6002/5/9)3 2of4  (tm.hnomi_loDroaiT/tuoisnructInstals/torikroWuT/syrotveD/P|//ac/ffi:/le
nter a new subfow ihhcy uoc nae do \nomio  satthredlman E .eretnthe  At of ttop otirlautii .la.sfia s  itoind eleercs ehereht ,noleysea moniEopm enter De field, weNedoM  .e ehTin Fh.is cndckliroait/tuedsl somth il pa ful themaN ledoM eht nI  i.iio.inom/dls MBIe PortleWebSpher yuTotir taFtcroanm cld  &ewor FnimoiV ooohcD esclick , l List, dlreC lat ehB iuthg inusl al cerdliub mroF & weino VDomithe out li l .F KOb.ci kvas oy ec rugnahCl. k icplAptoy dei  nhtsit baele details provid.hen es wshedfini etii  nna dtsroINF\modethe WEB-liw rc liW ldrazmos l deteeahi tih s.tT joce erpll ol wimodenew mod\slairotut\slthn  ierldfoo inno View & Form biudlrec la lote n petoautimallca.2.ydA   a dimoDal Etoriyeesmplobasad ta  nI.e.ashliabsts escc aD eht otuT onimo
Input Name Input Value Name Employees Database Name Click the Get databases and views button then choose DominoTutorialEmployees.nsf View name Choose AllEmployees - this value is the alias for the All Employees view Paged Data Check the box Display Rows per page Enter 15     
Categorizing View Data
3. Test the model. a. Run the model using the icon. b. View the application in the web browser. You should see rows and columns of data from the Notes database.
Using a Categorized Domino View
There are two approaches to categorizing Domino view data. One approach uses a view that is already categorized in Domino and relies on that view to provide the categorization. The other approach uses a flat Domino view and then relies on Portlet Factory to provide the categorization. In either case, one must use a Category View builder to make it all work.
In this section, you will temporarily change the view in the Domino View and Form to a categorized view in order to understand the first approach to categorizing view data.
A Domino View and Form builder can display document rows, category rows, or both simultaneously. If the Domino view is already categorized and the document rows must be displayed, all rows must be included. This configuration is quite common when using a categorized Domino view.
snrtslI/no/scuitrialTutoino._Domo 5( mth5/9)32 f8:6 00/2AM5 :151lifT/turoaieDWvroskfactory/e:///P|/
Using a Flat Domino View
Categorizing a flat view is a great feature because it allows the data to be displayed in categories when no Domino view exists with the same categorization. It takes a little bit more work to categorize a flat view but it has some advantages. First, if there is no existing view with the desired categorization, the view can be categorized without creating a new view in the Domino database. Second, it is generally better to use a flat view with Domino View and Form because the generated schema is simpler. The ability to categorize a flat view offers the power of categorization and the convenience of using a flat view. Finally, since the categorization work is being performed by Portlet Factory instead of Domino, there are more opportunities to extend the categorization features via Profiling.
2. Add a Category View builder to create the expand / collapse features. a. In the Builder Call List, click the , choose Category View builder and click OK . b. Use the details provided in this table to fill out this builder call. Click Apply to save your changes when finished.
Input Name Input Value View name Choose AllByDept - this value is the alias for the Employees -By Department view Rows to include Choose All rows Paged data Deselect the box - Categorizing works better without paging display     
1. Edit the Domino View & Form builder call using the details provided in this table. Click Apply to save your changes when finished.
3. Test the model. a. Run the model using the icon. b. In the web browser, you should see arrows next to each WorkDept ID. Click the arrows to expand and collapse categories. Note that more than one category can remain open at a time unlike Domino-rendered HTML views which can only have one category open at a time.
AM
Input Name Input Value Name Categories Container Field Click the and choose [EmployeesviewDataViewPage] DataPage/ViewData/Row Categories Choose Use Domino category rows Selection     
:15 vWorks/Tctory/De//P//|affli:e8:51006 /5/223)9o  f m6(.othmoni_DalritoTus/onticurtsnI/slairotuBI MPoe lertbSWeerphuT yirotaF trotcla
Voir Alternate Text
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents
Alternate Text