Creating Portlets from My Yahoo! Enterprise Edition Modules

After you set up My Yahoo! Enterprise Edition in your portal application, you can create portlets out of any My Yahoo! Enterprise Edition modules.

The Portal Samples also include a set of preconfigured My Yahoo! Enterprise Edition portlets you can reuse in your portals. See My Yahoo! Enterprise Edition Portlets.

To create a portlet from a My Yahoo! Enterprise Edition module

  1. Make sure you have set up My Yahoo! Enterprise Edition in your portal application. See Setting up My Yahoo! Enterprise Edition.
  2. In a browser, go to the following URL to see which My Yahoo! Enterprise Edition modules are available:
    http://<server>:<port>/<project>/yahoo/admin/modules.jsp. For example, if your portal Web project is called "myPortal," enter http://localhost:7001/myPortal/yahoo/admin/modules.jsp.
  3. Print the list of modules or make a note of the module IDs of any modules you want to use.

    Note: If the isActive column in the modules.jsp table contains "false," the module is inactive and cannot be used.
  4. With your portal application open in WebLogic Workshop, expand the <project>\portlets\yahoo\modules directory.
  5. Right-click any of the .portlet files and choose Duplicate. Right-click the new .portlet file and rename it to the name of the module you are adding.
  6. Double-click the new portlet to open it in the Portlet Designer.
  7. Select the portlet in the Portlet Designer, and in the Property Editor window set the following property values:
  8. In the Portlet Designer, expand the Portlet Preferences bar and select the module_name preference.
  9. In the Property Editor window, modify the following property values:
  10. If the module is "personalizable" (customizable) according to the modules.jsp page viewed earlier (a value of "true" in the "Personalizable" column), make sure you add an Edit mode to the portlet. To do this:
    1. In the Portlet Designer, expand the portlet's Portlet Modes bar. If no "Edit" mode is listed, add one by choosing Insert-->Edit Mode in the WebLogic Workshop menu.
    2. Select the Edit mode item, and in the Property Editor window, set the following property values:
      • Content URI - /portlets/yahoo/edit.jsp
      • Backing File - com.bea.myee.portal.YahooBacking
  11. Authentication with My Yahoo! Enterprise Edition portlets: Your authentication mechanism must have two parameters within the request: one during login and one during logout. The names of these parameters must be yahoo_login and yahoo_logout, and both must be set to "true." This can be done in the login/logout form itself or with a backing file that is called during login and logout. If these parameters are not included, users may see odd behavior in their portlets.

    If you use the Login Portlet for authentication, it uses a backing file that includes both parameters.
  12. View your portal with the WebLogic Test Browser or with your default browser.

Note: The default behavior with My Yahoo! Enterprise Edition portlets is to launch a new window whenever a link inside a portlet is clicked. To prevent portlet links from launching a new browser window (for example, if you are using the Calculator portlet), change the behavior using the following steps:

    1. Open the portlet in the Portlet Designer.
    2. Choose Insert-->New Preference in the WebLogic Workshop menu.
    3. In the Portlet Designer, expand the Portlet Preferences bar and select New Preference.
    4. In the Property Editor window, set the following property values:
      • Preference Name - newWindow
      • Preference Value - false
    5. Save the portlet.

You can also create portlets for My Yahoo! Enterprise Edition modules using the WebLogic Administration Portal. Simply duplicate an existing My Yahoo! Enterprise Edition portlet in the portlet Library and reconfigure its Portlet Preferences to use a new Module Id from the modules.jsp list. See the WebLogic Administration Portal help system for information on duplicating portlets.

Samples

In the Portal Samples, see My Yahoo! Enterprise Edition Portlets.

Related Topics

Adding My Yahoo! Enterprise Edition to Portal Applications

Setting up My Yahoo! Enterprise Edition

See the WebLogic Administration Portal help system tutorial on "Setting up My Yahoo! Enterprise Edition Portlets."