In Lawson Smart Office (LSO) version 10.0.0 two generic URI parameters were added to support modal tasks. The requirement was to be able to launch any LSO URI in a modal window.
A modal window is a child window that requires users to interact with it before they can return to operating the parent application (http://en.wikipedia.org/wiki/Modal_window). There are many scenarios where this could be useful (if a modal behavior is desired) such as Mashups, personalized links, navigator links, canvas shortcuts etc.
The first parameter is called lso-modal. The parameter can be appended to any LSO URI and it does not require a value. When a URI with this parameter is launched the window that is displayed will be modal to the LSO Canvas. Some URIs will not actually display a window and in those cases the parameter will have no effect.
Example 1 – Launch the M3 program MMS001 in a modal window:
Example 2 – Launch a web page in a modal window:
The second parameter is called lso-allow-transparency and you only need to use it in some special cases. The default value is true and in this case the parameter can be omitted. Set the value to false to prevent transparent modal windows. This parameter will have no effect unless the lso-modal parameter is also present.
Due to a restriction in WPF it is not possible to display native (non-WPF) content in a transparent window. A common example of native content in LSO is the WebBrowser control. Modal windows in LSO are transparent by default but when a web page is displayed a non-transparent window is used instead. This is handled automatically for http/https URIs but in some cases the parameter must be added manually to prevent transparent modal windows. One example is a Mashup that contains a WebBrowser control and another example is a M3/S3 panel that includes a WebBrowser control added by a JScript personalization. In these cases the lso-allow-transparency parameter should be used with the value false.
Example 3 – Launch a Mashup in a non-transparent modal window:
Example 4 – Launch the M3 program CRS610 in a non-transparent modal window:
is it also be possible to call a .xaml file from the same project in modal mode?
For example: I have a button which opens or shows another small .xaml window of the same project. At the moment its just linked with the event, with the “Link URI” field.
I tried to enter the link like this “test.xaml?lso-modal” and “test.xaml&lso-modal” but with no success.
Using the lso-modal parameter with relative links in the LinkUri is currently not supported. This should probably be fixed but until then there are couple of different ways to do this.
You can use the LinkUri property with the lso-modal parameter if the Uri to the Mashup xaml file is absolute.
Another option is to use a button and set the CommandParameter of the button to a Links collection with a Link element. The Mashup Link class has a IsModal property that can be used instead of appending the lso-modal parameter.
A third option is to use the Mango.UI.Controls TaskHyperlink class and a Uri with the lso-modal parameter.
All these solutions do require an absolute Mashup link.
With the information from this post, I’ve been able to use modal windows for all of the buttons I’ve created, with the exception of the Link URI’s that have been created with Mforms Automation (MFA). Do you have suggestions on how to get MFA in a modal window?
Adding the modal parameter seems to prevent the option parameter from working on a LINK URI. In the example below, the CRS623/E form no longer displays it now goes to CRS624/B. Is this a limitation with modal windows or is there something I should change in the syntax? I’ve tried adding a semi-colon before the modal parameter, but the same issue still exists.
Is it possible to refresh the calling mashup panel once modal M3 link is closed?