Mendix
Integrate WebViewer into a Mendix Web Module
This sample provides a Mendix backend module that facilitates server side operations that work with WebViewer
WebViewer provides a slick out-of-the-box responsive UI that enables you to view, annotate and manipulate PDFs and other document types inside any web project.
Click the button below to view the full project in GitHub.
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// Special characters, e.g., é, ö, à, etc. are supported in comments.
package webviewer.actions;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import com.mendix.systemwideinterfaces.core.IMendixObject;
public class GetFileId extends CustomJavaAction<java.lang.String>
{
/** @deprecated use inputFile.getMendixObject() instead. */
@java.lang.Deprecated(forRemoval = true)
private final IMendixObject __inputFile;
private final webviewer.proxies.File inputFile;
public GetFileId(
IContext context,
IMendixObject _inputFile
)
{
super(context);
this.__inputFile = _inputFile;
this.inputFile = _inputFile == null ? null : webviewer.proxies.File.initialize(getContext(), _inputFile);
}
@java.lang.Override
public java.lang.String executeAction() throws Exception
{
// BEGIN USER CODE
return "" + this.inputFile.getMendixObject().getId().toLong();
// END USER CODE
}
/**
* Returns a string representation of this action
* @return a string representation of this action
*/
@java.lang.Override
public java.lang.String toString()
{
return "GetFileId";
}
// BEGIN EXTRA CODE
// END EXTRA CODE
}