BEA Logo BEA WebLogic Portal Release 4.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Portal Documentation   |   Sample Portal Tour   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Miscellaneous Portlets

 

This topic discusses portlets that have a variety of functionality. The following portlets are described:

 


Email Portlet

The Email portlet demonstrates the use of the Java Mail API. The Email portlet displays a list of messages in an email inbox. Although you can see which messages are there, you cannot read them. This section describes how to set up the Email portlet.

Java Source: examples/sampleportal/email

JSP Source: sampleportal/sampleportal/portlets/email

Note: Before you can set up the Email portlet, you must have a valid email address in the selected visitor's user profile.

  1. If you have not entered a valid email address in any visitor's user profile, complete the four steps below; otherwise go to step 2.

    1. Log in as any visitor.

    2. In the Quick Links portlet, click Update Profile. The Edit Your Account page appears.

    3. Enter a valid email address in the Email Address field.

    4. Click the Save button. The Home page appears.

  2. To configure the Email portlet, complete the following directions:

    1. In the Email portlet, click the Edit button, as shown in Figure 7-1.

      Figure 7-1 Email Portlet—Not Configured


       

    2. In the expanded Email portlet, fill in the fields. Figure 7-2 shows an example.

      Figure 7-2 Email Portlet—Edit


       

    3. Click the Save button, and then click the Finished button.

      If you have entered the correct information, you should see your new emails in the Email portlet, as shown in Figure 7-3.

      Figure 7-3 Email Portlet—New Email


       

      If the information you entered is not correct, the Email portlet indicates a problem, as shown in Figure 7-4.

      Figure 7-4 Email Portlet—Improperly Configured


       

  3. Log out of the portlet.

 


What's Hot Portlet

The What's Hot portlet is an example of a simple reporting portlet. It shows the number of times a company profile has been clicked. This portlet pulls information from the WebLogic Portal event tracking system. Specifically, the What's Hot portlet collects real-time information from an event and displays the information. It shows the use of an asynchronous custom event listener. The content of What's Hot can also be displayed in an Excel spreadsheet.

Java Source: examples/sampleportal/whatshot

JSP Source: sampleportal/sampleportal/portlets/whatshot

To learn about the What's Hot portlet, complete the following instructions:

  1. Login as "visitor4". The portlet appears as shown in Figure 7-5. The right column indicates the number of times that the link for each company has been clicked in the Company Profiles portlet.

    Figure 7-5 What's Hot—Citigroup, 3 Counts


     

  2. Notice the number of counts for any company. For example Citigroup has a count of three, as indicated by the red arrow in Figure 7-5.

  3. Go to the Company Profiles portlet and click any company (Figure 7-6).

    Figure 7-6 Company Profiles Portlet


     

  4. After the Company Profiles portlet expands, click the Unmaximize button to return the portlet to its original size.

  5. Now go back and look at the What's Hot portlet. Notice that the number of counts for the company you picked increments by one. For example, Citigroup now has a count of four hits, as shown in Figure 7-7.

    Figure 7-7 What's Hot—Citigroup, 4 Counts


     

  6. Click View as Excel Spreadsheet. The browser displays the spreadsheet, as shown in Figure 7-8.

    Figure 7-8 What's Hot—Excel Spreadsheet


     

  7. To return to the portlet, click the browser Back button.

 


My Work and Team Work Portlets

The My Work portlet provides a To Do list for personal activities. The Team Work portlet provides a To Do list for team activities. Any changes in the Team Work portlet are displayed for each team member. Every member of the team can update the Team Work portlet. The My Work and Team Work portlets are implemented through Enterprise JavaBeans (EJB) 2.0 entity beans.

Java Source: examples/sampleportal/collaboration

JSP Source: sampleportal/sampleportal/portlets/collaboration

To learn more about these portlets, complete the following instructions:

  1. Login in as "visitor4".

  2. In the Team Work portlet, click the Edit button, as shown in Figure 7-9.

    Figure 7-9 Team Work Portlet—No Items Saved


     

  3. After the portlet expands, enter a task, set its priority, and then click the Add to List button, as shown in Figure 7-10

    Figure 7-10 Team Work Portlet—New To Do Items


     

  4. Add a second task. The portlet updates to show the changes, as shown in Figure 7-11.

    Figure 7-11 Team Work Portlet—Item Added


     

  5. Click the Finished button. The portlet now contains a To Do list, as shown in Figure 7-12.

    Figure 7-12 Team Work Portlet—Items Added


     

  6. Log off as Visitor 4 and login as "visitor1". The Team Work portlet for Visitor 1 now shows the items entered by Visitor 4.

  7. In the Visitor 1 Team Work portlet, click one of the check boxes, and then click the Update button. Figure 7-13 shows an example.

    Figure 7-13 Team Work Portlet—Item Checked


     

  8. Log off as Visitor 1 and login as "visitor4". The Team Work portlet for Visitor 4 now shows the checked item entered by Visitor 1.

  9. Log off as Visitor 4.

The My Work portlet operates in the same way, except other team member portlets are not updated.

 


Customer Service Portlet

The Customer Service portlet demonstrates EJB 2.0 implementation and integration with the J2EE Connector Architecture (JCA) sample database adaptor provided with WLS 6.1. The Customer Service portlet has two views: the Individual view, where visitors can see only their service requests and add new requests, and the Service Representative view, where all service requests from every group member are displayed.

Java source: sampleportal/sampleportal/WEB-INF/src/examples/sampleportal/customerservice

sampleportal/src/examples/sampleportal/customerservice

JSP source: sampleportal/customerservice

To learn more about the Customer Service portlet, complete the following instructions:

  1. Login in a "visitor5". The Customer Service portlet appears as shown in Figure 7-14.

    Note: Only the Customer Service Representative (Visitor 5) can see all the requests.

    Figure 7-14 Customer Service Portlet—Default (Visitor 5)


     

  2. Logout as Visitor 5 and then login as "visitor1". The Customer Service Portlet appears as shown in Figure 7-15.

    Figure 7-15 Customer Service Portlet—Default (Visitor 1)


     

  3. In the Visitor 1 Customer Service portlet, click the Edit button. The portlet expands as shown in Figure 7-16.

    Figure 7-16 Customer Service Portlet—Enter Request (Visitor 1)


     

  4. Enter a request, click the Save button, and then click the Finished button. The portlet now shows the service request, as shown in Figure 7-17.

    Figure 7-17 Customer Service Portlet—New Request (Visitor 1)


     

  5. Log out as Visitor 1 and then log back in as "visitor5". The portlet shows the new service request, as shown in Figure 7-18.

    Figure 7-18 Customer Service Portlet—New Request Added (Visitor 5)


     

This completes the Tour of the Avitek Financial Sample Portal.

 

back to top previous page