Saturday, January 28, 2012

Adding Custom Panels In ATG Self Service


You can add custom panels to the ATG Self Service user interface.

Before you begin, start your ATG Self Service application.

1.Using the ACC or Eclipse, create a new Web application for the customer who needs the custom panel. The Web application’s context root must be /svc-external.

  Note: This context root is already configured in web.xml so no additional configuration is required to use it.

Everything in a particular panel is implemented in a single JSP. These JSPs can exist in either the Self Service application or any other Web application whose context-root is declared in the Self Service application’s web.xml file. The atg.dynamo.contextPaths attribute lists all of the context-paths this web application knows about. This enables you to include JSPs from other Web applications. The DSP:include src="[pagename]" uses the param values specified in this attribute. By default, all Self Service panels are stored in the /panels directory.

Note: Never put new panels here; use links to external web applications instead.

2.Create your JSP. Include any required taglibs. The basic structure for the content should be:

<div class="panel">
     <div class="panelContent">
      [your content here]
     </div>
</div>

3.Build your Web application.

4.In the BCC, log in as a user that has permission to access the Service Admin Publishing menu.

5.Select Service Admin Publishing > Service Admin to access a deployable project.

6.Name the project and click Continue.

7.On the Assets tab, click Add asset to project.

8.Select Service Repository as the Repository, and select PanelDefinition as the Asset Type. Click Create New.

9.Set the following properties as indicated:

a.appId: selfService

b.contentUrl: /svc-external/pathtoyourJSP

c.panelId: panel_id

  This should be a meaningful and unique value.

d.helpKey: help_id

  This is optional, but you may wish to use it.

e.nameKey: name_key

  Used for rendering the panel in the Admin UI.

f.titleKey: title_key

 Used as the title of the panel in the UI. The helpKey, nameKey, and titleKey are all  references into a resource bundle (which values you will create later in this procedure).

10.Click Apply.

11.Click Back to the Project’s Assets.

12.Click Add Asset to Project. Select ServiceRepository as the Repository, and PanelStackDefinition as the Asset Type.

13.Click Add Existing to bring up the Asset Picker, and locate the panel stack to which you want to add the new panel.

14.Select the panel stack. It must be a Self Service panel stack, and should be targeted to segmentName: Everyone-External.

15.Click Add to add the asset to the project, then click Close. The asset should now appear in your Assets list.

16.Select the new asset. In the list of panelIds, click Add a New Element. Enter the panelId of the panel you are adding. You can move it up or down in the panel stack as necessary. Click Apply.

17.Click Back to the Project’s Assets to return to the Projects page.

18.Select the Tasks tab.

19.In the Actions list, select Check In and Deploy, then click Go. Enter a message if you want in the confirmation dialog, and click OK.

20.Go to the Service.Branding module, and in the lib/resources/atg/svc/
branding directory, edit the AtgServiceBrandingResources.properties file. Add the keys you entered above to this file for the panel name, title, etc.

21.Reassemble and deploy your EAR with the new module included, then start your Self Service server. The new panel should be included.

Note: All references in ATG Self Service point back to main.jsp. URL parameters are passed to indicate which tab to render. Any URLs that you include in your panel’s JSP must refer back to main.jsp and pass any attributes used by your page as well as those required by the application. Look at existing panel JSPs for implementation examples.

No comments:

Popular Posts