My web application does not work in Smart Office!

If there is a web application that does not work in Smart Office there are a few know limitations and work arounds that you should be aware of. In this blog post I’ll cover some of the issues with web applications as well as some work arounds that you can try. Most of this information applies to Smart Client and Smart Office.

Knows issues
– Only web browser plug-ins that support 64-bit mode in Internet Explorer will work in Infor Smart Office when running on 64-bit. This is becuase Smart Office is a 64 bit application on a 64 bit machine and it will run the browser control as 64 bit.
– The default render mode for the Browser control is IE7. As more and more applications are HTML5 they will not work in the IE7 render mode.
– Focus is not maintained between WPF and the Browser control. This means that as you switch between native applications in Smart Office and web applications the focus in the web application will be lost. There is no focus support from Micrososft in a mixed environment. Even if there is a new Browser Control the control is still not pure WPF. Which leads us to the last problem.
– The z-index – web browser is always on top issue. When including a web browser in a WPF window it will always be on to of other content.

Internet Explorer in 64-bit mode

Only web browser plug-ins that support 64-bit mode in Internet Explorer will work in Infor Smart Office 10.0.5 and earlier. For example the Silverlight plugin only exists as a 32-bit plugin.

Note that as of Smart Office 10.1 the application has changed to be a 32-bit application on all operating systems so this should no longer be an issue.

Workaround for a demo would be to use a 32-bit OS. Another workaround would be to configure and use External Applications in the profile.

ExternalApplication

In External applications it is possible to define a path to Internet Explorer and pass in a URL. Defining an External Application will create a node under Other in the Navigator. In my example the resulting URL is ext://exe/?value=iexplore&parameters=http://www.infor.com.

Unfortunately IE will use a launcher process and then open the URL in an existing process or a new and Smart Office will not be able to find the window handle to the web page so it will not be visible in Smart Office toolbar. So this is more an external launch and you leave Smart Office. So there is no good workaround in place. The option to add external application links works best for applications that starts one process and keep that same process. This is not the case with Internet Explorer.

There are a bunch of command line switches that you can read more about.

In Smart Office 10.1 as we there is no upgrade support for previous clients we have decided to build the client in 32 bit for all platsforms. That means that all 32 bit plugins will work as of Smart Office 10.1.

Render mode

The default render mode in Smart Office is IE7. This can be verified by opening http://www.whatsmyuseragent.com/.

useragent

This render mode works well for old web applications like M3 IBrix but not with the UX3.0 Infor HTML5 controls for web applications. It does not matter if you have IE 8, 9 or 10. The default render mode for the Browser control that Smart Office uses is IE7. Specifying a tag is supposed to force the Browser Control to use a different rendering engine, but that only seems to work if the page hasn’t been launched by another window (window.open). You can try and add these meta tags if you have access to the application.

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="X-UA-Compatible" content="IE=9" />

The work around that will always work is to add a registry setting for the LawsonClient.exe that all browser content should run in a specific render mode. Note that this will affect all applications so if you have some applications that requires to be in compability mode and others that need to be in IE9 render mode you have to make a choice. There is only one setting and it is for all web content within Smart Office.

For LawsonClient.exe (Smart Office up to version 10.0.5) you should use:
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE
Microsoft
Internet Explorer
Main
FeatureControl
FEATURE_BROWSER_EMULATION
LawsonClient.exe = (DWORD) 00009000

For Smart Office 10.1 the exe name is MangoClient.exe.

For Smart Office 10.1 (on a 64-bit system) you should use:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

On my 64-bit machine I added a 9999 for LawsonClient.exe.

registry3

Table with emulation modes for Internet Explorer on MSDN.

There is no current way to configure this via Smart Office but there are other ways for an administrator to change the registry on corporate computers.

You need to restart Smart Office for the changes to take effect.

Many Feature Control keys can also be controlled by network administrators by using Group Policy. When a group policy is modified, a value similar to the one above is written to the policy hive in the Windows registry. Because Feature Controls can be configured in multiple places, Internet Explorer will look for values in the following order of precedence:
– HKEY_LOCAL_MACHINE policy hive (administrative overrides)
– KEY_CURRENT_USER policy hive
– HKEY_CURRENT_USER preference hive
– HKEY_LOCAL_MACHINE preference hive (system default settings)

Focus is not maintained when switching between applications

Keyboard focus is lost when switching between native Smart Office applications and web applications. This is a known design deficiency in WPF’s focus management combinded with HwndSource / Web Browser. There is no workaround that will work for all web applications.

Web Browser always on top

In Smart Office all windows exist on the Canvas which is one window. Widgets can pop over windows and windows always have rounded corners. In Smart Office we will replace any web content with a screenshot of the content as soon as that window is not the active window. This means that you might see some issues as the web content is replaced with an images. On windows XP there have been reported issues and we have even had a case with Microsoft that there is an issue when taking the image on some of the webapplications, inlcuding IBrixes. So on XP we can’t take an image so we replace the content with a default image with the text “Click to activate”. There is no workaround for the z-index problem with web content. Ot the workaround is exactly what we are doning – replacing the BrowserControl with an image as soon as it is not the active window. Therefore it is very important that you use our ExtendedWebBrowser and not the default controls if you need a BrowserControl in your feature or JScript.

If you have any issues releated to switching between Web application or as the web application launches a new window you can try and disable the preview image. This can be done in the profile by adding a web/EnableDefaultWebBrowserImage. In 10.0.5 this should be available in the advanced view of the profile.

EnableScreenshot

More reading

Table with emulation modes for Internet Explorer on MSDN.
http-equiv attribute | httpEquiv property

13 thoughts on “My web application does not work in Smart Office!

    1. karinpb Post author

      Hi Bryan,
      10.1 has not been released to customers. But it will be released very soon. I don’t have the exact date (and I not sure if I can share an exact date), but it should be this month :-). As soon as it is released I’ll do a post on it so don’t forget to follow this blog.

  1. Pingback: Workaround for Google Maps back in Mashups | M3 ideas

  2. thibaudatwork

    Tjenare Karin. Do you know if there will be a fix for having Google Maps back in Mashups, or should I open an Infor Xtreme incident? Tack. /Thibaud

    1. karinpb Post author

      It’s google maps that have changed how you are allowed to link to them. I think we have already done a work around for 10.2 FP 1. I think you need to add it in an iframe.

      1. thibaudatwork

        (Oops – I’m re-replying with HTML escapes) Karin. Can you make the WebBrowser’s render mode a property in the Mashup? For example <WebBrowser RenderMode=”IE11″/>. That would solve the JavaScript error. Also, can you make the WebBrowser’s Accept header of the HTTP Request a property in the Mashup? For example <WebBrowser Accept=”text/html, application/xhtml+xml, */*”>. That would solve the Google Maps 302 switch to classic mode. See my pingback post for details. Thank you. /Thibaud

      2. karinpb Post author

        Hi,
        I’ve talked to the developer. Since the rendemode affects the process and all browser controls we cannot have that as a property since that affects all the controls and not a single instance. As for the Accept header we are not modifying the header for the standard browser control that we use and we will not start to do complex modifications only for the map to work. The fix that was done was to remove the embed parameter. Another option would be to have a web page on a web server that can host an iframe and use javascript to get parameters from the location and translate that to the URL for the iframe – or a jsp/asp page if that is simpler.

  3. Heiko

    Hi,

    I developed a C#/SDK application which opens a M3 panel with an embedded webbrowser control and navigates to a JSP page. As you described, the content is replaced by an image if the panel looses its focus. This works fine as long as the windows font size which the user has defined in the control panel is “normal” (100 %). But users who use a bigger font (125%, 150% or user defined) make the experience, that the image is scaled to a much bigger size, cutted off at the borders of the panel. When the panel retrieves back the focus, everything is fine – until the focus is lost again. It is easy to explain to IT stuff what is going on, but end users are pretty confused. Is there any chance to solve this issue ?

    /Heiko

    1. karinpb Post author

      Hi,
      There are some things that we can try but we need to compensate for both the DPI and the browser zoom level so it is not a trivial task. I suggest that they report this to support so that we have it in our system. We have done some DPI improvements but we did not have time for this part. One suggestion is to turn on detached windows – it is a setting in the User Settings. It forces all windows to be opened in the detached mode – and it has been added to 10.2 and perhaps 10.1 as well.

Comments are closed.