12.2 Sample scenario

 < Day Day Up > 

The sample application shown in this section is based on the HRPortlet from Chapter 11, "Accessing back-end JDBC databases" on page 343. Two different versions of the HRPortlet will be used, as follows :

  • The source cooperative portlet HRPortlet displays a list of jobs.

  • The target cooperative portlet Employee Details Portlet displays a list of employees working in the same department.

Using the cooperative portlet technology, users can select a department number from the source cooperative portlet. After that, WebSphere Portal updates the target portlet displaying all employees from the selected department.

12.2.1 Development workstation

This sample scenario provides step-by-step exercises to enable the JDBC portlet project (HRPortlet) to work as a Click-to-Action target portlet. You will also enable this portlet to act as a source Click-to-Action portlet. You will create, deploy and run the portlet application. This exercise will allow you to understand the techniques used to develop portlets with Click-to-Action features using the C2A declarative approach.

The development workstation and its components can be seen in Figure 12-5 on page 377.

Figure 12-5. Development workstation

graphics/12fig05.gif

12.2.2 Description

Cooperative portlets subscribe to a model for declaring, publishing, and sharing information with each other using the WebSphere Portal property broker. Portlets subscribe to the broker by publishing typed data items, or properties, that they can share, either as a provider or as a recipient.

  • The portlet that provides a property is called the source portlet.

  • The properties that the source portlet publishes are called output properties.

  • The portlet that receives a property is called the target portlet.

  • The properties that are received by the target are called input properties.

The target portlets optionally provide actions to process the properties that they receive. Action processing in target portlets does not need to distinguish between an action initiated within its own portlet area and an action initiated by the transfer of a portlet property value. Each action is associated with a single input parameter and zero or more output parameters, which provide information to the action about the objects in which the property value should be bound, such as the request or the session. Each parameter is associated with exactly one property. Parameters associated with input properties are called input parameters, while those associated with output properties are called output parameters. Instead of actions, the target portlet can receive property changes directly through the PropertyListener interface.

At runtime, the property broker matches the data type of output properties from a source portlet with the data type of input properties from one or more target portlets. If a match is determined, the portlets are capable of sharing the property. The actual transfer of the property can be initiated by one of the following methods :

  • A user launches a Click-to-Action event from an icon on the source portlet. The icon presents a pop-up menu containing the list of targets for the action. After the user selects a specific target, the property broker delivers the data to the target in the form of the corresponding portlet action. Using the Click-to-Action delivery method, users can transfer data with a simple click from a source portlet to one or more target portlets, causing the target to react to the action and display a new view with the results. The user can also broadcast the property to all portlets on the page that have declared an action associated with a matching input property.

  • A user holds down the Ctrl key while clicking an action and chooses to have the selection saved persistently as a connection between two portlets, called a wire. If a wire is present the next time the user clicks the icon, no selection menu is shown. Instead, the wired action(s) is/are automatically fired . Subsequent updates to that property are transferred without further deliberate user choice.

  • The source portlet can perform a programmatic publish of properties to the broker when it determines that property values have changed. Such property values are transferred to the target(s) only if wires have been created.

Cooperative portlets can be source portlets, target portlets, or both.

  • Source portlets identify to the property broker properties which they are able to share with other portlets.

  • Target portlets identify to the property broker actions which are able to process properties contributed by other portlets.

Figure 12-6. Click-to-Action architecture

graphics/12fig06.gif

The sequence flow for this sample scenario is as follows:

  1. At portlet initialization time, the C2A wrapper processes any action WSDL file associated with the application portlet and registers the actions with the C2A broker.

  2. During the render phase of a request cycle, JSPs associated with C2A source portlets are processed . The custom C2A tags produce calls to the C2A broker, which examines the type information to determine matching actions. The broker generates additional code to create an icon to be used to display a pop-up menu of actions, and adds code to dispatch actions on portlets upon user selection from the menu.

  3. After all render phase portlet callbacks are complete, the WebSphere Portal core assembles the response page and returns it to the client (for example, a browser).

  4. When the user clicks the C2A icon for a source, he or she sees a menu of compatible actions (on the page) and selects one.

  5. The client (for example, a browser) generates a new request containing the chosen source and action information and sends it to the WebSphere Portal Server.

  6. The WebSphere Portal Core delivers the action to the target portlet. The action is intercepted by the wrapper, which may interact with the broker to further process the request before delivering the action to the target.

All portlet actions are intercepted by the wrapper; however, actions which are invoked through direct interaction with the portlet (as opposed to interaction through the C2A menus ) are passed through transparently to the portlet. In more advanced scenarios, such as the broadcast and scatter mentioned earlier, there will be more interactions between the wrappers and the broker to determine the appropriate target set and deliver the right data to the targets.

12.2.3 Source cooperative portlet

In this section, you will be required to execute the following tasks to enable a portlet to act as a Click-to-Action source portlet using the declarative approach:

  1. You will import the original portlet if it is not in your workspace. In this scenario, the JDBC portlet from the previous sample scenario will be used (HRPortlet). See Chapter 11, "Accessing back-end JDBC databases" on page 343.

  2. You will import the property broker jar file (pbportlet.jar).

  3. You will update web.xml to refer to the property broker classes.

    1. The servlet class entry should specify the com.ibm.wps.pb.wrapper.PortletWrapper class in the property broker:

       <servlet-class>  com.ibm.wps.pb.wrapper.PortletWrapper  </servlet-class> 
    2. The original portlet application class should also be specified in the c2a-application-portlet-class initialization parameter. For example:

       <init-param> <param-name>  c2a-application-portlet-class  </param-name> <param-value>hrportlet.HRPortlet</param-value> </init-param> 
  4. You will update the JSP for View mode to include Click-to-Action menus.

Figure 12-7 on page 381 illustrates the source cooperative portlet for this sample scenario.

Figure 12-7. Cooperative portlets - sample scenario

graphics/12fig07.gif

Importing the original portlet

The HRPortlet portlet from the JDBC chapter (see Chapter 11, "Accessing back-end JDBC databases" on page 343) will be used as a base for this sample scenario. This portlet will be enabled to act as a source cooperative portlet in this scenario. You will need to import this portlet if it is not in your workspace.

Follow these steps to import this portlet:

  1. Import the WAR file by selecting File -> Import .

  2. Select WAR file and click Next .

  3. In the Import Resources from a WAR File window, enter the following information:

    1. WAR file: browse to C:\LabFiles\C2A\HRPortlet.war .

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    2. Web project: select Existing . In the box that pops up, select HRPortlet and click OK .

    3. Context root: this will change to /HRPortlet .

    4. In Options, select the Overwrite existent resources without warning check box.

Figure 12-8. Importing the original portlet HRPortlet

graphics/12fig08.jpg

Importing the property broker file (pbportlet.jar)

You will need to import the property broker jar file (pbportlet.jar). Follow these steps:

  1. Switch to the portlet perspective.

  2. Import the property broker jar file (pbportlet.jar):

    1. In the J2EE Navigator view, select the HRPortlet\Web Content\WEB-INF\lib folder.

    2. Select File -> Import .

    3. Select File system and click Next .

      Figure 12-9. Select File System

      graphics/12fig09.jpg

    4. In the Import File system window, enter the following information:

      • For the directory, browse to:

         C:\Program Files\ibm\WebSphere Studio\runtimes\portal_v50\pb\lib 

        Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

      • Select pbportlet.jar .

      • For the destination, select the folder HRPortlet/Web Content/WEB-INF/lib .

      Figure 12-10. Select pbportlet.jar to import the jar file

      graphics/12fig10.jpg

    5. Click Finish .

      Important : Make sure pbportlet.jar is in the lib folder.

    Figure 12-11. pbportlet.jar

    graphics/12fig11.jpg

  3. Update the Web Deployment Descriptor as follows:

    1. In the J2EE Navigator view, expand HRPortlet and double-click Web Deployment Descriptor .

    2. Switch to the Servlets tab and select the hrportlet.HRPortlet servlet (Figure 12-9 on page 383).

    3. In the Details area, click the Browse... button to change the servlet class.

    4. In the Servlet selection dialog, select the PortletWrapper class from the com.ibm.wps.pb.wrapper package and click OK .

      Figure 12-12. Adding PortletWrapper

      graphics/12fig12.jpg

    5. In the Initialization area, click the Add... button to add a new parameter.

    6. Enter a parameter name of c2a-application-portlet-class and a parameter value of hrportlet.HRPortlet . The final editor should look as shown in Figure 12-13.

      Figure 12-13. Web Deployment Descriptor for the source cooperative portlet

      graphics/12fig13.jpg

    7. Save your files (or press Ctrl-S to save the file) and close the deployment descriptor editor.

  4. Import the Click-to-Action tag library (c2a.tld).

    Note : This step in included here as a reference for previous releases only, the c2a.tld library is now part of WebSphere Portal V5 and does not need to be packaged in the portlet WAR file.

    1. Import the file by selecting File -> Import .

    2. Select File system and click Next .

    3. In the Import File system window, enter the following information:

      • For the directory, browse to:

         C:\Program Files\ibm\WebSphere Studio\runtimes\portal_v50\shared\app\WEB-INF\tld 

        Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

      • Check the c2a.tld box.

      • For the destination, enter the folder:

         HRPortlet/WebContent/WEB-INF/tld 
      Figure 12-14. Importing c2a tag library (c2a.tld)

      graphics/12fig14.jpg

    4. Click Finish .

  5. The final step is to update the HRPortletView.jsp with c2a tags.

    1. In the J2EE Navigator, expand HRPortlet/Web Content/hrportlet/jsp/html and double-click HRPortletView.jsp .

      Figure 12-15. Selecting HRPortalView.jsp

      graphics/12fig15.jpg

    2. In the JSP editor, switch to the Source tab.

      Note : Source portlets can publish their output properties by inserting tags from a custom JSP library in their JSPs. A JSP tag library is provided to allow source properties to be identified in JSPs.

    3. In the third line of this JSP, include the following line:

       <%@ taglib uri="/WEB-INF/tld/c2a.tld" prefix="C2A" %> 

      You can also copy and paste the JSP from c:\LabFiles\C2A\snippets\.

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

      For example, see Figure 12-16.

      Figure 12-16. Adding tag library c2a.tld

      graphics/12fig16.gif

    4. Two JSP tags can be used to declare output properties in the source portlet:

      • <c2a:encodeProperty/>

        Uses source data and type information to insert markup that displays the icon, generating a pop-up menu.

      • <c2a:encodeProperties/>

        Used to enclose normal HTML markup and one or more encodeProperty tags with the markup. This tag is provided to support the scatter scenario, where a user can optionally send more than one unit of data to target portlets.

      You will now declare the output properties. Scroll down to the following lines:

       <TD>           <P><%=results.getCacheValueAt(row, col)%></P> </TD> 

      Change the line so it looks as follows:

        <P>   <C2A:encodeProperty   name="<%=results.getColumnName(col).toString()+\"Param\"%>"   namespace="http://www.ibm.com/wps/c2a/examples/hrdetails"   type="<%=results.getColumnName(col)%>"   value="<%=results.getCacheValueAt(row, col).toString()%>" />   <%=results.getCacheValueAt(row, col)%>   </P>  

      You can also copy and paste the JSP from c:\LabFiles\C2A\snippets\.

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

      For example, see Figure 12-17 on page 390.

      Figure 12-17. Adding C2A:encodeProperty to JSP (view mode)

      graphics/12fig17.gif

      Note : As you can see, the table column name is used as an output property type. Therefore, a target portlet using the specified namespace should provide an inbound property with this name.

    5. Save all your files (you can use Ctlr-S ).

12.2.4 Target cooperative portlet

In this section, you will import a second copy of the HRPortlet and update it to support Click-to Action as a target cooperative portlet using the declarative approach. This target portlet will execute a fixed SQL statement with a variable where clause.

The code for the target portlet class must meet the following requirements:

  • The action must be implemented either as a portlet action or a Struts action. For portlet actions, you should use the simple action Strings rather than the deprecated PortletAction class.

  • Portlet actions must accept a single parameter. The parameter may appear as a request parameter, a request attribute, a session attribute, or an action attribute (deprecated), as specified in the action declaration or registration.

The HRPortlet is already prepared for this situation, so only a few changes are needed in the portlet class code.

Figure 12-18 on page 391 illustrates the target cooperative portlet for this sample scenario.

Figure 12-18. Cooperative portlets - sample scenario

graphics/12fig18.gif

To import a second version of the HRPortlet, proceed as follows:

  1. In the Portlet perspective, choose File -> New -> Portlet Application Project from the main menu.

  2. In the Create a Portlet Project window, enter a project name of EmployeeDetailsPortlet and check Create empty portlet . Click Next .

    Figure 12-19. Create portlet project EmployeeDetailsPortlet

    graphics/12fig19.jpg

  3. In the J2EE Settings Page, check the Existing radio button for the Enterprise application project and enter DefaultEAR . Click Finish .

    Figure 12-20. J2EE Settings Page

    graphics/12fig20.jpg

  4. Click OK if you receive the Repair Service Configuration message indicating that the project will be added to DefaultEAR.

    Figure 12-21. Repair Server Configuration message

    graphics/12fig21.jpg

  5. From the main menu, select File -> Import to import the original HRPortlet.

  6. Choose WAR file , click Next and configure as follows:

    1. Browse to the location of the HRPortlet.war file in c:\LabFiles\C2A\HRPortlet.war.

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    2. As the Web Project, select the existing Web project EmployeeDetailsPortlet .

    3. Check Overwrite existing resources without warning and click Finish .

    Figure 12-22. Import a second version of HRPortlet (target c2a portlet)

    graphics/12fig22.jpg

  7. Since the HRPortlet and EmployeeDetailsPortlet portlet applications use the same UID, a warning message will appear in the task pane.

    Figure 12-23. Duplicate UID messages

    graphics/12fig23.jpg

  8. To fix this problem, expand EmployeeDetailsPortlet/Web Content/WEB-INF in the J2EE Navigator view. Double-click portlet.xml .

    Figure 12-24. Selecting portlet.xml

    graphics/12fig24.jpg

  9. In the portlet deployment descriptor editor, select Portlet Application and change the last digit of the UID for this portlet application. For example, in this sample scenario, the last digit was 6 and it was changed to 7.

    Figure 12-25. Changing a digit in portlet application UID

    graphics/12fig25.gif

  10. In a similar way, select Concrete Portlet Application and change the last digit before the last dot of the UID to make it the same as in the previous step.

    Figure 12-26. Changing digit in concrete portlet application UID

    graphics/12fig26.gif

  11. Save your changes. The warning messages in the Tasks view should disappear.

The following updates are needed in order to enable the EmployeeDetailsPortlet to work as a target cooperative portlet.

  • Import the property broker jar file (pbportlet.jar).

  • Update web.xml to refer to the property broker classes. The servlet class entry should specify the com.ibm.wps.pb.wrapper.PortletWrapper class in the property broker. The original portlet application class should also be specified using the c2a-application-portlet-class initialization parameter.

  • Update portlet.xml to add a configuration parameter to each concrete portlet that exposes actions to the property broker through the WSDL file. The configuration parameter, c2a-action-descriptor, must specify a URL that points to the WSDL file that declares actions.

  • Create a WSDL file that will declare all Portlets actions which can accept data transferred using the property broker.

Execute the following steps:

  1. Import the property broker (pbportlet.jar) file into the EmployeeDetailsPortlet project as you did for the c2a source portlet. For example:

    1. Select File -> Import -> File system .

    2. For the directory, browse to:

      C:\Program Files\ibm\WebSphere Studio\runtimes\portal_v50\pb\lib

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    3. Select pbportlet.jar .

    4. For the destination, select the folder EmployeeDetailsPortlet/Web Content/WEB-INF/lib .

      Figure 12-27. Import the property broker jar file (pbportlet.jar)

      graphics/12fig27.jpg

    5. Click Finish . Make sure the pbportlet.jar file is in the \WEB-INF\lib folder.

  2. Update the Web deployment descriptor by changing the servlet class to PortletWrapper and including the c2a-application-portlet-class parameter.

    1. In the J2EE Navigator view, expand HRPortlet and double-click Web Deployment Descriptor .

    2. Switch to the Servlets tab and select the hrportlet.HRPortlet servlet (Figure 12-29 on page 399).

    3. In the Details area, click the Browse... button to change the servlet class (Figure 12-29 on page 399).

    4. In the Servlet selection dialog, select the PortletWrapper class from the com.ibm.wps.pb.wrapper package and click OK .

      Figure 12-28. Adding PortletWrapper

      graphics/12fig28.jpg

    5. In the Initialization area, click the Add... button to add a new parameter.

    6. Enter a parameter name of c2a-application-portlet-class and a parameter value of hrportlet.HRPortlet . The final editor should look as shown in Figure 12-29.

      Figure 12-29. Web Deployment Descriptor for the target cooperative portlet

      graphics/12fig29.jpg

    7. Save your files (or press Ctrl-S to save the file) and close the deployment descriptor editor.

  3. A WSDL file is needed (EmployeeDetailsPortletC2A.wsdl); follow these steps:

    1. Create a new folder with the name wsdl to store the WSDL files. Select your EmployeeDetailsPortlet\Web Content folder.

    2. Right-click the Web Content folder and select New -> Folder .

      Figure 12-30. Create a new folder in Web Content directory

      graphics/12fig30.jpg

    3. Type wsdl for the Folder name field then click Finish .

      Figure 12-31. Create new folder wsdl

      graphics/12fig31.jpg

    4. The directory structure should now look as illustrated in Figure 12-32.

      Figure 12-32. New wsdl folder

      graphics/12fig32.jpg

    5. Select the new EmployeeDetailsPortlet\Web Content\wsdl folder.

    6. Right-click the wsdl folder and choose File -> New -> Other... from the context menu.

    7. In the New window, select File from the Simple category. Click Next .

      Figure 12-33. Creating a file resource

      graphics/12fig33.jpg

    8. In the New File dialog, enter a file name of EmployeeDetailsPortletC2A.wsdl . Click Finish .

      Figure 12-34. Creating file (wsdl) EmployeeDetailsPortletC2A.wsdl

      graphics/12fig34.jpg

    9. In the XML editor, switch to the Source tab and enter the following XML code shown in Example 12-1.

      You can also copy and paste this file from c:\LabFiles\C2A\Snippets\EmployeeDetailsPortletC2A.wsdl

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

      Example 12-1. EmployeeDetailsPortletC2A.wsdl file
       <?xml version="1.0" encoding="UTF-8"?> <definitions name="GetResults_Service"            targetNamespace="http://www.ibm.com/wps/c2a/examples/hrdetails"            xmlns="http://schemas.xmlsoap.org/wsdl/"            xmlns:portlet="http://www.ibm.com/wps/c2a"            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"            xmlns:tns="http://ww.ibm.com/wps/c2a/examples/hrdetails"            xmlns:xsd="http://www.w3.org/2001/XMLSchema"            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"            xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/ http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">    <types>       <xsd:simpleType name="DEPT_NO">          <xsd:restriction base="xsd:string"></xsd:restriction>       </xsd:simpleType>    </types>    <message name="GetResultsMessageNameRequest">       <part name="get_ResultsPartName" type="tns:DEPT_NO" />    </message>    <portType name="GetResults_Service">       <operation name="get_ResultsOperation">          <input message="tns:GetResultsMessageNameRequest" />       </operation>    </portType>    <bindin name="GetResultsBinding" type="tns:GetResults_Service">       <portlet:binding />       <operation name="get_ResultsOperation">           <portlet:action name="hrportlet.HRPortletDetailsAction" type="simple" caption="Show all employees from this department." description="Get.Results.for.specified.sql.string" />           <input>              <portlet:param name="DEPT_NOParam" partname="get_ResultsPartName" caption="Show all employees from this department." />           </input>       </operation>    </binding> </definitions> 
  4. The next step is to update the portlet deployment descriptor to include a reference to the WSDL file:

    1. In the J2EE Navigator view, expand EmployeeDetailsPortlet/Web Content/WEB-INF and double-click portlet.xml .

    2. In the portlet deployment descriptor editor, expand the concrete portlet application and select hrportlet.HRPortlet .

    3. Change the title to Employee Details Portlet .

    4. In the Setting Parameter area, click the Add... button to add the following parameter:

       c2a-action-descriptor 

      Its value should be:

       /wsdl/EmployeeDetailsPortletC2A.wsdl 
    5. Press Ctrl-S to save the file and close the deployment descriptor editor.

      Figure 12-35. Updating portlet descriptor with wsdl file

      graphics/12fig35.gif

  5. The last step is to update the actionPerformed() method in the portlet class. In this scenario, you will use a special action string.

    1. Open the HRPortlet.java file from the EmployeeDetailsPortlet project.

    2. Insert the lines shown in Example 12-2 on page 405 at the end of the actionPerformed() method.

      You can also copy and paste this code from c:\LabFiles\C2A\Snippets\ap.java

      Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

      Example 12-2. The hrportlet.HRPortletDetailsAction updates the SQL string
       if (actionString.equals("hrportlet.HRPortletDetailsAction")) {           HRPortletSessionBean bean = this.getSessionBean(request);           bean.setSqlString(              "select * from employee where workdept='"                 + (String) request.getParameter("DEPT_NOParam")                 + "'");       } 
  6. Save all your files; you can use Ctrl-S .

12.2.5 Running the cooperative portlets

Execute the following steps to run the cooperative portlets scenario:

  1. To run a project in the WebSphere Studio Site Developer test environment, it is necessary to add the portlet project to the test environment. You can use a previously created test server or you can create a new server as follows:

    1. Click the Server Configuration tab (on the navigator panel).

    2. Expand the Servers tree.

    3. Right-click WebSphere Portal V5.0 Test Environment or Test Environment .

    4. If needed, click Add -> DefaultEAR to add your project to the test environment.

    Figure 12-36. Adding a project to the test environment

    graphics/12fig36.jpg

  2. If the Cloudscape sample database has not been populated , run the batch file to populate the test database to be used in this scenario. Click c:\LabFiles\Cloudscape\CreateCloudTable.bat to do this.

    Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    Figure 12-37. Populating test database

    graphics/12fig37.gif

  3. Next, click the J2EE Navigator tab to see your project again.

  4. Right-click HRPortlet . Then click Run on Server . This will load your project into the test environment so that you can view it in the WebSphere Studio Site Developer Web browser. It may take a minute or two for this process to complete.

  5. You will now see your newly created portlets project running in the Web browser.

  6. Switch to Edit mode in HRPortlet (c2a source portlet).

  7. Enter the following information and click Submit .

    - Database: jdbc:db2j:C:\LabFiles\Cloudscape\WSSAMPLE .

    - Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    - User: db2admin

    - Password: db2admin

    - SQL: select * from jobs .

    Figure 12-38. HRPortlet portlet in Edit mode

    graphics/12fig38.gif

  8. The HRPortlet now displays the jobs table, including a cooperative portlet menu in the DEPT_NO column. Before you can use this menu, you have to configure the data source in EmployeeDetailsPortlet.

    Figure 12-39. HRPortlet displays a cooperative menu in DEPT_NO column

    graphics/12fig39.jpg

  9. Switch to Edit mode in EmployeeDetailsPortlet (c2a target portlet).

  10. Enter the following information and click Submit . It is not necessary to enter an SQL command here, because it is built during the processing of the cooperative menu.

    - Database: jdbc:db2j:C:\LabFiles\Cloudscape\WSSAMPLE .

    - Note : You can also download the sample code available as additional materials. See Appendix C, "Additional material" on page 543.

    - User: db2admin

    - Password: db2admin

    Note : There is no need to enter an SQL statement (optional).

  11. In the source cooperative portlet View mode, click a DEPT_NO column, for example C01 or A00 .

  12. Click Show all employees from this department (see Figure 12-40 on page 409).

    Figure 12-40. EmployeeDetailsPortlet displays all employees from same department

    graphics/12fig40.jpg

    Note : The EmployeeDetailsPortlet (target portlet) should now display all employees in the selected department.

 < Day Day Up > 


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net