Configuring profile types for widget layout
To configure widget layout, you can add a profile type containing the widget layout configuration to Profiles in the widgets-config.xml file.
Before you begin
To edit configuration files, you must use the wsadmin client. See Starting the wsadmin client for information about how to start the wsadmin command-line tool.
Procedure
To add a new profile type for widget layout, perform
the following steps.
- Start the wsadmin client from the following
directory of the system on which you installed the Deployment Manager:
where app_server_root is the WebSphere® Application Server installation directory and dm_profile_root is the Deployment Manager profile directory, typically dmgr01.app_server_root\profiles\dm_profile_root\bin
You must start the client from this directory or subsequent commands that you enter do not execute correctly.
- Use the wsadmin client to access and check out the Profiles
configuration files.
- Use the following
command to check out the widget configuration file:
ProfilesConfigService.checkOutWidgetConfig("<working_directory>", "<cell_name>")
where:- working_directory is the temporary working directory to which the configuration XML and XSD files will be copied. The files are kept in this working directory while you make changes to them.
- cell_name is the name of the WebSphere® Application Server cell hosting the Profiles application. This argument is required.
ProfilesConfigService.checkOutWidgetConfig("/wsadminoutput", "jdoe30Node02Cell")
- Save a copy of the widgets-config.xml file.
- Open the file in a text editor.
- Add a widget layout under the <widgets> element, as
in the following example:
Although this example might not match the content of the widgets-config.xml included in your deployment, it does include the widgets supported for your deployment.
Important: Do not delete widgets from the default resourceSubType layout used for default Profile Type. Connections uses widgets info specified for the default for rendering widgets in multiple profile types.<layoutConfiguration> <widgets xmlns:tns="http://www.ibm.com/profiles-config"> <layout resourceSubType="debug"> <page pageId="profilesView"> <widgetInstance uiLocation="col2" defIdRef="multiWidget" instanceId="tabsWidget1"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="board"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="contactInfo"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="backgroundInfo"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="multiFeedReader"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="socialTags"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="sand_thingsInCommon"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="sand_socialPath"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="reportStructure"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="friends"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="linkRoll"/> </page> </layout> <layout resourceSubType="restricted"> <page pageId="profilesView"> <!-- <widgetInstance uiLocation="col2" defIdRef="multiWidget" instanceId="mw1"/> --> <widgetInstance uiLocation="col2" defIdRef="contactInfo" instanceId="ci1"/> <widgetInstance uiLocation="col1" defIdRef="reportStructure"/> </page> </layout> <layout resourceSubType="mobile"> <page pageId="profilesView"> <widgetInstance uiLocation="col2" defIdRef="multiWidget" instanceId="tabsWidget1"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="board"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="contactInfo"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="backgroundInfo"/> <widgetInstance uiLocation="col2" defIdRef="multiWidget" instanceId="tabsWidget2"/> <widgetInstance uiLocation="tabsWidget2" defIdRef="multiFeedReader"/> <widgetInstance uiLocation="col1" defIdRef="socialTags"/> <widgetInstance uiLocation="col1" defIdRef="sand_thingsInCommon"/> <widgetInstance uiLocation="col1" defIdRef="sand_socialPath"/> <widgetInstance uiLocation="col3" defIdRef="reportStructure"/> <widgetInstance uiLocation="col3" defIdRef="friends"/> <widgetInstance uiLocation="col3" defIdRef="linkRoll"/> </page> </layout> <layout resourceSubType="default"> <page pageId="profilesView"> <widgetInstance uiLocation="col2" defIdRef="multiWidget" instanceId="tabsWidget1"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="board"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="contactInfo"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="backgroundInfo"/> <widgetInstance uiLocation="tabsWidget1" defIdRef="multiFeedReader"/> <widgetInstance uiLocation="col1" defIdRef="socialTags"/> <widgetInstance uiLocation="col1" defIdRef="sand_thingsInCommon"/> <widgetInstance uiLocation="col3" defIdRef="sand_socialPath"/> <widgetInstance uiLocation="col3" defIdRef="reportStructure"/> <widgetInstance uiLocation="col3" defIdRef="friends"/> <widgetInstance uiLocation="col3" defIdRef="linkRoll"/> </page> <page pageId="searchResultView"> <widgetInstance uiLocation="col1" defIdRef="commonTags"/> </page> <page pageId="searchView"> <widgetInstance uiLocation="col1" defIdRef="sand_DYK"/> <widgetInstance uiLocation="col1" defIdRef="commonTags"/> <!-- <widgetInstance uiLocation="col3" defIdRef="sand_recomItems"/> --> </page> <page pageId="networkView"> <widgetInstance uiLocation="col1" defIdRef="sand_DYK"/> </page> <page pageId="editProfileView"> ... </layout> </widgets> </layoutConfiguration>
- Save your changes
and check the widgets-config.xml file back in
using the following command:
ProfilesConfigService.checkInWidgetConfig()
- To exit the wsadmin client, type exit at the prompt.
- Stop and restart the Profiles server.