Some of my co-workers are traveling a lot and are interested to use the Mendix applications on a tablet computer. So I took my iPad from home, surfed to the application with Mobile Safari and gave it a shot. My first experience of our Mendix application on an iPad was not bad. Nearly everything works, except that I have to take into account the smaller screen of the iPad. Then I stumbled upon a problem with downloading of files. In a couple of forms I have created download and view buttons that are based on a microflow trigger for showing PDF documents that are stored as FileDocument objects. The only thing that the microflow does is retrieve the FileDocument object and execute the Download File action. Unfortunately, the download action does not do anything at all. It makes no difference if I set the "Show file in browser" property or not. This behavior has been reproduced on iOS devices (iPhones and iPads) and on Android tablets running Android 3.0 (Honeycomb). Is there a way to fix this problem ourselves by adjusting the theme or is it something that needs a fix in Mendix?
Most mobile browsers do not support IFrames, which are used by Mendix to start a download in the background. To work around this issue you could calculate the downloadurl of a file and show that in the standard link widget. The url of a file can be calculated using the following microflow expression:
'/file?target=window&fileID=' + $file/fileID
You can store this value in a (virtual) attribute and display it using the link widget.