Configuring Navigator Widget (and others) with default values

In this post I will show you how you can configure the Navigator widget so that the favorites tab is opened by default.  And by default I mean the tab that is opened when you add the widget to the Canvas. The same approach can be used for ANY widget in the widget library! You can use the same approach for the News Reader. Instead of having the default Lawson feed (which never seems to work), you can select your own company’s feed. This approach works with older versions, even Lawson Smart Client. But the steps are different because in previous versions you could edit the file directly in the file-area of the Smart Office server.

Let’s start with configuring the Navigator. Before I go into the details I just want to point out that first time users will load a default canvas. The file name of the canvas is configurable in settings and the actual file is stored in the Smart Office Server file area in the CanvasFiles-folder. As you save a canvas file to this location make sure the Navigator has the correct tab selected when you save the Canvas file. This gives you the possibility to have default widgets on the canvas for first time users.

Pre-defined widgets
Pre-defined widgets are the way we configure new versions of a widget. Popular widgets are the M3 Browse Info and the S3 (Lawson) Browse Info. They require configuration and can exist in many form. Pre-defined widgets can also be used to configure default values for all standard widgets. It is not possible to change Title or Description but it is possible to change the configuration that you see in the widget’s settings view.

The pre-defined widgets editor only works with widgets that implements a specific interface, widgets that we anticipated would be configurable in different variations.
If you are an administrator you can configure a widget that implements this interface (S3 Browse widget) and then right click on the widget’s title and select “Publish Widget…” in order to transfer those settings to the pre-defined widgets editor.

Configuring Navigator Widget
In order to configure the Navigator widget and change the default selected tab you need to insert the following XML section in the WidgetSettingsDefinitions.xml.

 <WidgetSettings assemblyName="Mango.UI" factoryClass="Mango.Widgets.Menu.NavigatorWidgetFactory" id="Mango.Widgets.Menu.NavigatorWidget">
      <Title>Navigator re-defined</Title>
        <Property name="SelectedTabIndex" readOnly="false">
        <Property name="EnableSettings" readOnly="false">

The xml is the same for all widgets, what differs is the id, assemblyName, factoryClass and the property name of the settings. How to find those values? Add the standard widget you want to configure to your canvas. Save the canvas file using the context menu on the canvas. The file format is *.jade but if you open it in Notepad you can see the XML and search for the information that you need. Just make sure that you find and use the ID of a standard widget and not of a predefined widget. The way to check is to open the Predefined Widgets administration tool and look for the ID. If you find the ID there, you already have the settings for the widget.

Adding this setting in version 10.0.4 and 10.0.5 involves running the Export/Import Manager.

1. Export the predefined widgets and nothing else
2. Take the zip and unzip it to get to the WidgetSettingsDefinitions.xml
3. Insert the section above. If the file is empty you should publish for example the NewsReader and save a variant of it so that you at least have one example of a predefined widget in the file. It makes it easier to add a new section in the correct place.
4. Open the WidgetSettingsDefinitions.xml in Internet Explorer or another browser to validate that the XML is still valid.
5. Recreate the zip file or simply update the WidgetSettingsDefinitions.xml within the exported zip with your updated version.
6. Launch the Export/Import admin tool again and select to import the updated zip.
7. Note! Restart Smart Office
8. Login again. Since you probably had the Navigator on you canvas you should remove it.
9. Add the Navigator from the widget library or by writing Add Navigator in start and search (if you are running in English).

The new default tab is now “Favorites”.

Since you added a new section for the Navigator it is now available for editing in the Predefined Widgets Editor.

The beauty of this is that it works for all widgets that use settings in the Canvas file! Some of the widgets has its default ID, factory and assembly documentation in the Administration guide. But if you learn how to find out those values from the actual running Smart Office you know that they are always correct. You find them by saving your canvas to a file. If that option is not available you need to find the isolated storage on your PC and locate the Canvas.xml file there. I’ll cover the quickest way to find the isolated storage in another post.

Let me know if there are widgets that you thing should be enabled for easy configuration as a predefined widget. As for the Navigator it is part of the framework so we might consider adding a defaultNavigatorTab setting, just to make it easy to configure. This approach isn’t easy. But once the XML section is added to the Pre-defined widgets you can use the tooling to edit it or to create new copies.

3 thoughts on “Configuring Navigator Widget (and others) with default values

  1. Jordane

    I Karin,

    I try to configure a specific Widget.
    I searching a model to copy parameters for my widget, but don’t find any model…
    I’ve found the WidgetSettingsDefinitions.xml file… this file contains only my examples (my tests) but none model.
    Did it exists, like i’ve understood, a WidgetSettingsDefinitions.xml file, which contains some models of widgets ?
    I’m using LSO 10.0.4 and test since few days LSO 10.0.5…
    I try to develop Widgets for finals users which displays them, for example, “sales’s commands awaiting expedition”
    Thank in advance,

    1. karinpb Post author

      Hi Jordane,
      I assume you are talking about the S3 Browser widget. The model is not part of the widget setting because it is pretty large. You can export it separately but I need to check the details with our Lawson dev team. The model is saved on the Lawson back end.

      1. karinpb Post author

        First it is not really clear what you are trying to do. Is it migrating data from 10.0.4 to 10.0.5? But if it’s trying to configure a ‘pre-defined Info Browser’ in the XML definition file, it’s possible but not an easy task to take a 10.0.4 widget to 10.0.5. Instead of the back end XML file, the user can instead have a FIELDLIST node with semi-colon delimited list of the field names (from the base table) as the value.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s