Why to use portlet factory?
Ø
Powerful and flexible tool for rapidly building
portlets on top of service oriented architecture.
Ø
Portlet created with WPF are dynamic roboust
java 2 enterprise edition application that react automaticalli to change, and
can be modified by business users in real time to meet changing requirement without requiring any coding , duplicating or
versioning of assets.
Ø
WPF simplifies the development ,deployment and
change management process , saving companies time and money.
Ø
Support SOA development.
Ø
Roboust integration capabilities with enterprise
as well as data.
Ø
WPF has
around 160 wizard like builders that can be used to automate common development task.
What
are building blocks of portlet factory?
WPF consists of three main building
blocks:
Ø
Builders
Ø
Models
Ø
Profiles
Developers
work withthese above elements builders models and profiles along with other
design elements like HTML pages and XML documents and java classes.A WPF mechanism known as Factory generation
engine can automatically generate
executable applications known as WebApps.
What
are builders in WPF?
Builders
are the basis of any WPF application.
Builders
are wizard based interface that automates common development task, builder can
do anything from adding a button to calling a webservice.Builders contains
input parameters use to customize the builders output.
Developers
usually interact with builders with interface but a combination of java classes
and XML are used to create builders on the back end.
What
id Model in WPF?
A
model is the sequenced collection of builders that generates the
application components that implement the behaviour ,structure, data
and presantation of the application.
Internally
a model is simply a XML file contating a series of calls to the builders.
A
single WPF prj. Can contain one or more models and subsequently can contain
several portlets.
What
is Profile in WPF?
A
profile contains a set of inputs that varies the way a portlet behaves.
A
profile feeds values into builders based on user identity or other contextual
information.
Using
profiles you can generate different variations of generic portlets for
different users or situations.
List
of WPF Builders.
I am assuming that we have put the wsdl files under the file
structure as follows
Steps for calling WebService in WPF.
In the WebContent – “WSDL” folder wsdl files are present.
Open the designer – Eclipse - Portlet Factory
Click on “Add a Builder Call to Current Model” button -
Following screen will appear -
Select the “Web Service Call” click on “Ok” button
The Web Service Call builder allows you to execute several different types
of services, and displays different inputs according to
the type of service call you choose.
The following steps
describe the general process of configuring a web service call.
1.
In the Service Call Type input, select the type of service call: WSDL, SOAP, HTTP, or
Local.
2.
Enter the URL for the service.
For WSDL service calls, enter the URL for the
WSDL document that describes the service you want to call. The URL may be HTTP-based, for example http://myhost/mywsdl.wsdl or a file within the project, such as WEB-INF/mywsdl.wsdl.
If your organization is using WebSphere Service Registry and Repository (WSRR), you can use WSRR to search for
and download WSDL to your project.
3.
Specify the values for
the arguments to pass to the service.
For WSDL service calls, the builder call editor lists the
arguments that the service requires and you must
specify their values.
For SOAP and HTTP service calls, you need to know the
required arguments and build up the arguments list in the Arguments input in the builder call editor.
4.
Enter any authentication
information.
The other inputs to the Web Service Call builder are service type-specific, and in the case of WSDL service calls, may be read-only or
have default values specified by the WSDL document.
Create the Service operation for
this Web-Service
Specify the execute method of the
“WebService Call” in the “Action To Call”.
In the Consumer Model (for showing
the result on the page purpose model)
User the builder - Service Consumer and
specify the Provider builder name (for DB/WebService call builder present)
In the Data page we can follow the
following things
Here we are specifying
Which result it should show from the
operation and also we are specifying which page and span result should be
displayed.
When we run the portlet it will show
the result in the data-grid format.
If we do not specify any input value
it will take the default value from the “input schema”
Currently for the respective input
data, data is not present it is showing the only datapage.
Custom builders in
WPF?
You might need custom builders to:
Automate a task that occurs frequently, if same set of some
builders appears in your model again and again.
To enforce a particular development standard.
Support a new data type integration.
In such conditions you might need to create custom builders.
Design of a typical builder in WPF.
Link for creating custom builders:http://publib.boulder.ibm.com/infocenter/wpfhelp/v6r1m2/index.jsp?topic=/com.bowstreet.designer.doc/tutorials/Custom_Builder_Introductory_Tutorial.htm
How to personalize a
page using Profiling?
Profiling to Personalize Portlets
In this section, you will perform similar tasks to expose
builder inputs to the portlet's personalization page.
Individual portlet users with an access level of Privileged User
or higher can use the portlet's personalization page. These users can open the
personalization page and make their own choices from the available options. The
settings they choose control certain behaviors of the portlet depending upon
which builder
inputs have been exposed to this page. These settings apply
separately to each individual user.
To test the portlet's personalization features, you will need to
use the various test users you created in the Setup Requirements section of
this tutorial. To be sure these features are working; you will need to log in
as one user and make choices on the personalization page then log in as a
different user and make different choices.
Using this technique, you should be able to determine that the
personalization settings are stored independently for each user.
Since setting up a personalization page is so similar to setting
up a configuration page, fewer details are provided in this section as you can
refer to the details in the previous section if you need to.
Create the Profile Set and Entries
Personalization pages in portlets often include preferences
about how a portlet should appear. The personalization page for this portlet
will have options that allow the users to choose which columns of data should
appear, how many rows of data should appear on one page, which column to use as
the default sort, and whether or not to group the data on the detail page.
In this section, you will create the Profile Set for the
personalization page and the Profile Entries in this Profile Set.
1. Create the Profile Set
a. Choose from the File menu File > New > WebSphere
Portlet Factory Profile Set
b. Name the Profile Set EP_EditPage
c. In the Description field, enter Employees Portlet Edit Page
d. Click Finish to continue. The new Profile
Set will open in the Profile Set Editor. This Profile Set is stored in the
WEB-INF\profiles folder in this project and is named EP_EditPage.pset.
2. Create the Profile Entries
By now you should be able to use what you learned while creating
the Entries in the EP_ConfigPage Profile Set to create the Entries in this
Profile Set without the benefit of detailed instructions. The following table
describes the Entries needed in the Profile Set used for the portlet's
personalization page.
a. Create the Entries in the EP_EditPage Profile Set. Use the Add button to create new Entries.
b. Save the Profile Set periodically to protect your work.
Profiling the Builder Call Inputs
Some builder call inputs have simple profiling options while
others are more complex. Consider the data table in Data Column Modifier.
Profiling table rows allows you to enable / disable the entire row or to
control the values of individual properties within the row.
1. Open the EP_Profiling_Working model again.
2. Enable control over the number of rows to display
a. Locate the builder call of type Data Column Modifier named
allEmployeesFormatting and edit it.
b. In the Settings to control paging of the table data section,
locate the input labeled Page Size. This input controls how many rows of data
will display at any one time.
c. Profile this input so that the user can choose how many rows
to display.
i. Click the next to this input.
ii. Choose the EP_EditPage Profile Set. Be sure to choose the
correct Profile Set as this dialog box does not always default to the last
Profile Set used.
iii. Choose the PagingRows input you created earlier.
iv. Click OK to save these changes.
d. When completed, this input will be grayed out and the Profile
Set : Profile Entry relationship will be displayed below it.
e. Leave this builder call open as you will make more changes to
it in the next few steps.
3. Enabling optional display columns
a. In the same builder call, scroll down to the table used to
manage the columns of data.
b. Locate the row labeled WORKDEPT and profile it by clicking
the on that row. The Profile Row of
Inputs dialog box will open.
i. Note that this box has one to enable / disable the entire row
and one for each
property in the row. Since the objective is to profile the
Status property which is how a column's visibility is controlled, click the
next to Status.
ii. Choose the correct Profile Set and Profile Entry for this
input. Be sure to choose the EP_EditPage Profile Set and the WorkDept_OnOff
Profile Entry.
iii. Click OK to save these settings.
c. Click OK to close this dialog box. Once saved, the Status
column in the WORKDEPT row should be grayed out indicating that it has been
profiled.
d. Profile the Status property of the JOB row and the HIREDATE
row the same way as the WORKDEPT row. Be sure to choose the correct Profile Set
and Profile Entries.
i. Associate the Status property of the JOB row with the Entry
called JobTitle_OnOff.
ii. Associate the Status property of the HIREDATE row with the
Entry called
HireDate_OnOff.
e. Save and close this builder call by clicking the OK button in the builder call editor.
4. Enabling the default column sorting option
a. Locate the builder call of type Action List named main and
edit it. This Action List runs automatically because its name is main. The View
and Form builder contains an Action List called main but it is disabled in the
Advanced section of the builder call in this model. It was necessary to disable
it in order to add the SortSortAction method call described in the next
step.
b. The second action in the list is a call to a method named
SortSortAction. Click the button to see the names of the other similar actions.
i. You should see names like SortSortAction, SortSortAction1,
SortSortAction2, etc. Each SortSortAction method corresponds to
a sorted
column in the employees data table counting the columns from
left to right. For example, if SortSortAction2 is chosen, the third sortable
column from the left will be sorted when the page loads for the first time.
ii. Click Cancel to avoid making any changes to the Action List
step.
c. Profile the Action List step containing the SortSortAction
method call.
i. Click the row in the table containing SortSortAction. The
Profile Row of
Inputs dialog box will open.
ii. Click the next to Action List. The idea is to set the name
of the method that will be called by using the value in a Profile Entry.
iii. Associate this input with the Default_SortAction Entry in
the EP_EditPage Profile Set.
iv. Click OK to save these settings.
d. Save and close this builder call by clicking the OK button in the builder call editor.
5. Save the model.
What are Data
Driven Portlets?
In data driven
portlets we fetch data from DB either by creating JNDI/connection.In the
provider model we use sql Call and other builder data driven builders to fetch
data from db.in the consumer model we can use the data.
What is SOA in WPF?
How to achieve
Inter portlet communication Between the Portlet in WPF?
- Imported
Model
- Linked Model
Difference
between Imported Model & Linked Model?
http://www-10.lotus.com/ldd/pfwiki.nsf/dx/07282008035003PMWEBR9U.htm
Recomendations:-
Linked Model -
Recommendation: The
Linked Model builder should rarely be used directly. For most scenarios,
consider whether techniques such as Service Provider or Model Container can
provide the modularity you need.
Imported Model
builder -
Recommendation: Use
Imported Model when you want to include some builders in multiple models, such
as Event Declarations, Shared Variables, or shared utility functions. and
method call for example out GETREMOTEUSER METHOD by using substring which we
have created.
what is webapp
in WPF?
webapp is the name
of the structure created by the builders in the model and it is the abstraction
for all the elements that can make up a web app including pages, variables,
schemas, methods and events.
webappaccess
paramater using portlet factory api and used to change variable in webapp.