+ All Categories
Home > Documents > Lab 10 XPage Widgets.pdf

Lab 10 XPage Widgets.pdf

Date post: 03-Apr-2018
Category:
Upload: avadh-kumar
View: 243 times
Download: 0 times
Share this document with a friend

of 15

Transcript
  • 7/29/2019 Lab 10 XPage Widgets.pdf

    1/15

    Domino's XPages Workshop

    Lab Manual

    Lab 10

    XPage Widgets

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 1 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    2/15

    Introduction:

    The My Widgets feature is installed with Notes since 8.0.1. Using available policy and preference settings,

    an administrator you - can control which users can display My Widgets in their sidebar as well as

    various levels of access to My Widgets functionality. End users will typically not see My Widgets in their

    sidebar, yet still access widgets that are available when they act on Live Text in their (i)Notes documents.

    Description:

    This lab will show policies which enable widgets, create a widget from an XPage application, and enable it

    on iNotes

    Objective:

    At the end of the lab, you should be able to:

    Set up a server to utilize widgets, and give access to users

    Create a widget from an XPage

    Enable use of this widget through iNotes

    Procedure:

    SECTION 1: SETUP SERVERTO UTILIZE WIDGETS & GIVE ACCESSTO USERS

    In this section, you will create and deploy the policies required for enabling the MyWidgets feature for Notes and iNotes users.

    Step 1 If Domino has not been started, start it now.

    Step 2 Open Domino Administratorfrom the desktop icon.

    Step 3 Create a New Widget Catalog on your Domino server.

    Note: You could either achieve that by creating a new application based on the toolbox.ntftemplate or as used in this exercise create a replica from an existing catalog

    (widgetcatalog.nsf) hosted on www.noteswidgets.com .

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 2 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    3/15

    Step 4 Navigate to the Configuration tab. From the right-hand menu select Policies > Create.

    Step 5 Create a New Mail Settings policy document.

    Step 6 Name the new mail settings policy document iNotesWidgets. Navigate to the Lotus iNotestab and select Configuration.

    Step 7 Navigate to the Widget Settings section. Enable the Show the Widgets folder in the Mailoutline option.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 3 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    4/15

    Step 8 Save and close the new document. Again, select Policies > Create to build a new DynamicDesktop Settings policy document.

    Step 9 Name the Settings document Widgets. Navigate to the Widgets tab and enforce the following

    settings (keep the defaults for all other options) on client side:

    Widget catalog server: Xpages/LotusWidget catalog application name: toolbox.nsf

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 4 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    5/15

    Step 10 Save and close the Settings document. Click on Policy > Create again to build a new Policy.

    Step 11 Name the explicit Policy/MyWidgets. Select the Widgets Desktop and iNotesWidgets MailSettings documents to assign.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 5 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    6/15

    Step 12 Save and close the Policy. Then, navigate to the People & Groups tab. Select Groups fromthe left-hand navigator and create a new group containing all users:

    Step 13 Save and close the new group.

    Step 14 Assign the /MyWidgets policy to the All group:

    Step 15 If a warning dialog comes up, clickYes to overwrite existing assignments.

    Step 16 Navigate to the Domino console. Run the following command:

    tell adminp process mail policy

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 6 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    7/15

    NOTE: You have created and deployed the policies required for enabling theNotes and iNotes users to leverage the My Widgets feature.

    SECTION 2: XPAGEWIDGET

    In this section, you will learn how to start enabling your XPage application into aWeb widget..

    Step 1 Open the Scrapbook application in Domino Designer. Open the home XPage.

    Step 2 Navigate to the Events tab. From the Page navigator, select beforePageLoad and click AddAction.

    Step 3 Add an Execute Script action containing the following code:

    v = facesContext.getExternalContext().getRequest().getParameter(name);if (v != null){url = @LeftBack(context.getUrl().toString(),/) +facesContext.getExternalContext().getRequestContextPath();sessionScope.nameToSearch = v;facesContext.getExternalContext().redirect(url + /results.xsp);

    }

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 7 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    8/15

    Step 4 Save and close the home XPage.

    Step 5 Close Domino Designer and Lotus Notes, if opened.

    SECTION 3: INOTESWIDGET

    In this section, you learn how to add your XPage application as a Web widget tothe iNotes navigator pane.

    Step 1 From the My Widgets sidebar component header menu, select Get Started again.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 8 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    9/15

    Step 2 Our widget will consume a Web Page, therefore select the Web Page option.

    Step 3 Specify notesdomino.dfw.ibm.com/XScrapbook.nsf/home.xsp as our Web source, thenclick Next >.

    Step 4 Specify a HTTP GET as the submit option of choice.

    Step 5 You might need to authenticate with the Domino Web Server. Provide your credentials andassure to enable the Remember my password box, then click OK.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 9 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    10/15

    Step 6 The home XPage is getting opened. Extend the URL of the XPage by the followingQueryString parameter:

    ?name=Nobody

    Step 7 Notice: Do not click the Load URL button before selecting Next >.

    Step 8 From the Configure a Widget dialog, name the widget Search Profile (iNotes), then navigateto the Advanced tab.

    Step 9 Enable the Configure name option and click Next >.

    Step 10 Click Finish.

    Step 11 The new Widget has been added to the My Widgets sidebar component.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 10 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    11/15

    Step 12 Right-click on the new widget, then select Configure a New Action.

    Step 13 Select the Text Selection recognizer and specify contents as the type property. The resultsshould be displayed in a Floating Window.

    Step 14 Click OK.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 11 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    12/15

    Step 15 In a last step, we will publish this newly created widget to our companys widget catalog.Therefore, right-click on the new widget and select Publish to Catalog.

    Step 16 Name the widget Search Profile from iNotes, the save and close the document.

    Step 17 Navigate to the Attachment section within the document. Open the extension.xml file in a texteditor such as Notepad.

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 12 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    13/15

    Step 18 Open the Windows Explorerand navigate to your Lotus Domino installation directory.Within the data\domino\html subdirectory, find the file inotes_config.xml.template.

    Step 19 Copy the template into a new file inotes_config.xml. Open this file in anotherNotepadwindow.

    Step 20 From the extension.xml window, copy all the code except the first line and insert it into theinotes_config.xml before the closing tag:

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 13 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    14/15

    Step 21 Save and close the inotes_config.xml. Afterwards, restart your Domino server.

    Step 22 If Domino is up and running again, open your Browser client and navigate to your mail file, e.g.notesdomino.dfw.ibm.com/mail/dadmin.nsf.

    Step 23 After authentication, you should see a Widgets section within the left-hand navigator.

    Step 24 Navigate to your inbox. Open the mail we sent during the previous section:

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 14 of 15

  • 7/29/2019 Lab 10 XPage Widgets.pdf

    15/15

    Step 25 Select the name of the colleague (in this case John Doe), then expand the Widgets tab andclick on Search Profile (iNotes).

    Summary:

    Congratulations! You have completed this lab of XPages widgets.

    In this lab, you completed the following procedures:

    Setup a server to utilize widgets, and give access to users

    Create a widget from an XPage

    Enable user of a widget through iNotes

    COPYRIGHT IBM CORPORATION 2010. ALL RIGHTS RESERVED. LAB 10 IBM ISV & DEVELOPER RELATIONS.

    Page 15 of 15


Recommended