The news reader widget is for displaying a news feed. You can configure the News Reader Widget with a specific URL and publish it to the Widget Library. The tip of the day is that you can create your own RSS xml and have the News Widget as a Menu Widget with a list of different programs that can be launched directly from the widget. In this post I’ll show you the syntax of the XML and how to publish the widget to the Widget Library.
Start by creating a list of programs that you want to have in your Menu Widget. My example is below. The RSS feed is more or less a xml file with items. If the item has no description the link will be launched on double click but if there is a description the widget will show the details in a new page and the link will be available under the “details” link. Unfortunately it is not currently possible to have URL:s in the description and have them converted to clickable links. If this is a feature that is important to you I suggest that you contact support and ask for it. It would have been nice if we automatically converted all Lawson Smart Office links to launchable links within the context of the Widget. We already do that kind of stuff in the chat and in the Communicator (using channels to push out messages).
My example XML looks like this:
<?xml version="1.0" encoding="utf-8" ?> <rss version="2.0"> <channel> <title>Programs</title> <description>This is an example of a RSS feed</description> <lastBuildDate>Mon, 28 May 2012 00:01:00 +0000 </lastBuildDate> <pubDate>Mon, 28 May 2012 00:01:00 +0000 </pubDate> <ttl>1800</ttl> <item> <title>Wiki</title> <description></description> <link>http://www.wikipedia.org/</link> <pubDate></pubDate> </item> <item> <title>Customer - CRS610</title> <description></description> <link>mforms://crs610</link> <pubDate></pubDate> </item> <item> <title>Entry with comment</title> <description>This is an item with a comment.</description> <link>mforms://crs610</link> <pubDate></pubDate> </item> </channel> </rss>
You need a web server where you can publish this file so that you can add the link in the News Reader Widget settings. In my case I just added it to my local IIS.
I did not change any settings I just used my Default Web Site.
And placed the test file in the Root.
The result looks like this. Notice that the title of the channel is used as title on the Widget and the items are the items in the list.
The widget is now on your canvas. You can play around with the XML file and continue to add stuff since it will reload automatically (or when LSO starts up). This trick should work with all version of Lawson Smart Office, even with Lawson Smart Client.
The next step is to publish your widget to the widget library. In my version I simply right click on the title area of the widget to open the context menu and select publish. (I am an Administrator).
If you don’t have the menu please check that you are an administrator (the best way is to check if you have an Administration Tools node in the Navigator). If you are an administrator the publish tool might not be available in your version of LSO (I’m not sure at what version it was added) and you will need to modify a xml file in order to do the registration. Check the administration documentation and search for ‘predefined widgets’.
Next step is to configure the widget. I would change the ID and set a default title and description. The title and description will be used in the Widget Library. You can make the widget read only so that the users cannot change the URL or access the settings.
Press save and the new widget is published to the server.
Restart Lawson Smart Office and verify that your widget is in the Widget Library!
Now it can be a bit tricky to find the URL to a program that you would like to add, especially if it isn’t a M3 or S3 program becuase you tend to learn their short names by heart.
There are lots of ways to check the URL of a program. I usually take a launched program and minimize it, then I drag the icon in the taskbar to the canvas and create a shortcut. I can drag and drop directly from the Navigator’s recent tab as well.
Once I have the Shortcut on the canvas I right click and select settings from the context menu. And there it is. Easy to select and copy!
I plan to write a follow-up post where I show you how you can add different canvas files as links directly from a widget. That way you can have one widget but load different canvases depending on your tasks at hand.
Do you happen to know how to get the check box in front of an item? I sat in on a Ask the LSO Expert webinar the other day and Matt Albee showed a nice GUI ($99 on Lawson Marketplace) for designing menus. I don’t necessarily need the gui as I can just write the XML myself, but the one feature it has is the check box option that automatically gets checked when you click on the item and launch the link. There is then a clear button at the bottom of the menu to clear all the check boxes. Very useful for defining step-by-step processes for users. I’ve been playing around with various RSS tags, but haven’t been able to find the right thing yet.
Hi Jeremy,
I’m not sure about the GUI you are refering to. It might be another widget. On the other hand I know that the RSS reader has support for kind of a checklist where the check box get checked but there is no state being saved. The process needs to get all steps completed before the user closes down LSO or the checkboxes that are check will loose their checked state. I should show know becuase I coded the RSS reader. I’ll check my files and do a new short post on it.
Thanks, I actually just found the tag that can be added to an item. That does the trick.
Try and add an item like this:
<item>
<title>Wiki</title>
<completed></completed>
<description></description>
<link>http://www.wikipedia.org/</link>
<pubDate></pubDate>
</item>
The RSS spect is open. You can add your own elements as you feel like.
So you found it? Decompilation perhaps? 🙂
Ah the power of strong network of Lawson System Admins… 🙂
Is there a list of valid tags for use with the News Reader?
If the RSS spec is “open” for adding elements where is the “base” file located?
I have admin rights and should be able to get to anything on our servers.
I don’t have the link to the spec but I have covered all tags that we use in my posts. “completed” is the only tag that I have added and if the XML contains that tag the result will be the checklist view.
What I mean with open is that is specified which elements should be in the RSS xml but if there are extra elements those should be ignored by other RSS readers. As for changing the default News reader which points to a Lawson RSS feed that sometimes has invalid xml you should use predefined widgets and specify the Widget ID of the default widget and set your own RSS feed. For example if you company have one. What configuration to use is described in the Administration guide. If you specify the same ID as an existing widget you can override the default (hardcoded) configuration values for the default widget.
I don’t have the link to the spec but I have covered all tags that we use in my posts. “completed” is the only tag that I have added and if the XML contains that tag the result will be the checklist view.
What I mean with open is that is specified which elements should be in the RSS xml but if there are extra elements those should be ignored by other RSS readers. As for changing the default News reader which points to a Lawson RSS feed that sometimes has invalid xml you should use predefined widgets and specify the Widget ID of the default widget and set your own RSS feed. For example if you company have one. What configuration to use is described in the Administration guide. If you specify the same ID as an existing widget you can override the default (hardcoded) configuration values for the default widget.
Here is an example XML
http://lawsonsmartoffice.com/2012/05/29/how-to-create-a-menu-widget-using-the-news-reader-widget/
Karin: Thanks for the reply
I was already using the article you reference as a starting point and had that working. I was trying to create a somewhat hierarchical structure for ESS (which I realize cannot be done after reading the RSS spec):
Personal Information
Leave Balances (this would be a ,, set
but indented)
Personal Profile (item,title,link)
Dependents (item,title,link)
Pay
Tax Withholding View Only (item,title,link)
Pay Checks (item,title,link).
I did find that text formatting in description appears not to work. I tried embedding and tags inside a CDATA to no effect. Viewing the same .xml file with a browser does display the bolded or italisized text.
The reply box doesn’t like characters such as less than and formatted using my bold and itailc tags .
Personal Information
Leave Balances (this would be a item,title, link set
but indented)
Well html formatting is not supported. We will strip those out.
Sorry, the last post left out the tag name I guess becuase it was enclosed in a less than/greater than pair. The tag name is “completed”
Pingback: Working with multiple Canvases « Developing for Lawson Smart Office
can you show the settings you made within your local IIS? Thanks, Joe
Sure, I have updated the post. But since this is plain XML I did not have to to any changes in the IIS settings.
Pingback: Working with multiple Canvases | Developing for Infor Smart Office
Pingback: News Reader Widget as a Check list | Developing for Infor Smart Office