Using Marketplace Content
Introduction
This how-to covers the basics of accessing the Marketplace from Studio Pro and provides examples of how to add a widget and a module to your application.
This how-to teaches you how to do the following:
- Download content from the Marketplace via Studio Pro
- Use content (for example, modules) downloaded from the Marketplace in Studio Pro
Installing Marketplace Content
There are three ways to install a Marketplace component, which are described in the sections below.
Finding and Downloading Content in Studio Pro
For Studio Pro 9.19 and Above
To download content in Studio Pro 9.19 and above, follow these steps:
-
Open Studio Pro and sign in with your Mendix credentials.
-
Open the app in which you want to install the component from the Marketplace.
-
To open the Marketplace in Studio Pro, you can either click the View menu in the top bar and select Marketplace, or you can click the Marketplace icon on the right side of the top bar
The Marketplace pane opens.
-
You can explore Marketplace content in the following ways:
- Use Search in the Marketplace to find the component that you want to download
- You can paste the content ID here if you copied it via the Use in Studio Pro button in the web Marketplace
- Filter via the Categories and Subcategories drop-down menus, which correspond to the Marketplace content types
- Filter for All Content, My Company Content, or Platform-Supported Content
- Use Search in the Marketplace to find the component that you want to download
-
Select a component from the pane to see its details:
The details presented here correspond to what you see on the component details page in the online Mendix Marketplace.
-
Click Download to download the component. The correct version of the component that is compatible with your Studio Pro version is integrated directly into your application (for widgets, version compatibility is not applicable). By default, the highest correct version of the component is downloaded. If you want to download an older component version, go to the Releases tab and click Download for the desired version.
-
Depending on whether the component is a widget, a module, an extension, (which is a special type of module), or an app, go to one of the sections below:
Widgets
If you download a widget, a pop-up window states the module was successfully imported. Click OK, and you can find the imported widget in the Toolbox.
Modules
If you download a module, the Import Module dialog box opens, where you should perform the following steps:
-
Select one of these options:
-
Add as a new module (default option when the module is downloaded to your app for the first time ) – if you select this option, new entities and attributes are created in your app.
-
Replace existing module (default option when the module already exists in your app) – if you select this option, you need to specify which Module to replace
If you have made any changes to the existing module, selecting the Replace existing module option will replace all the changes that you made (for example, your renamed entities, attributes, and associations as well as their respective tables and columns represented in the database will all be replaced). Your user data will stay if you have not changed entities, attributes, or associations. If you have changed data types, your user data can be influenced as well. For more information, see Attribute Type Migration.
-
-
Click Import.
-
Wait until a pop-up window states that the module was successfully imported. Click OK. You can find the imported module in the App Explorer.
Extensions
If you download an extension, a warning dialog box opens.
-
If you trust the extension, click Trust module and enable extension.
-
If you decide to not trust the extension, you will get asked whether or not to trust the extension every time you reload the application.
Click OK in the confirmation pop-up window. Your extension is now installed and is ready to use. Depending on the extension that you have installed, the functionality appears in a certain location of your app. Read the extension-specific documentation to get more information on how to use it.
If you do not want to trust the extension and would prefer to remove the extension altogether, you can remove the add-on module that was added.
![trust extension](/attachments/appstore/use-content/trust-extension.png)
Apps
If you download an app, the Download Marketplace App dialog box opens, where you should perform the following steps:
-
Select where the app should be stored: New Mendix Team Server, Existing Mendix Team Server, or Locally on disk.
-
Configure the necessary settings based on your storage choice.
-
Click OK.
After the app is downloaded, it opens automatically in Studio Pro.
For Studio Pro 9.18 and Below
To download content in Studio Pro 9.18 and below, follow these steps:
-
Open Studio Pro and sign in with your Mendix credentials.
-
Open the app in which you want to install the component from the Marketplace.
-
Click the Marketplace icon in the top menu bar to open it in Studio Pro. The Marketplace opens within Studio Pro. The Categories menu item on the left side gives an overview of which types of content are available.
-
Use the Search bar to find the component that you want to download. Note that results for Marketplace content searches within Studio Pro may differ from those in the online Marketplace due to synchronization issue.
-
Click the component (or the Read more button on the right side) to show the details of the component.
-
Click Download to download the component. The correct version of the component that is compatible with your Studio Pro version is integrated directly into your application (for widgets, version compatibility is not applicable). By default, the highest correct version of the component is downloaded. If you want to download an older component version, go to the Releases tab and click Download for the desired version.
-
Depending on whether the component is a widget, a module, or an app, go to one of the sections above:
Importing Content from Studio Pro’s App Explorer
To import content downloaded from the online Mendix Marketplace into Studio Pro, follow these steps:
-
Go to the Marketplace and sign in with your Mendix credentials.
-
Search in the online Marketplace for the component you want to download and open the component details page.
-
Check Usage > Version to see the required Studio Pro version for the component. Do not download a component that requires a higher version than the one you are using.
-
Go to the Releases tab and Download the desired version. Mendix recommends using the latest version of the component if possible.
-
In the App Explorer, right-click the app, then click Import module package, and select the component you downloaded:
The Import Module dialog box opens.
-
In the Import Module dialog box, select one of these options:
-
Add as a new module (default option when the module is downloaded to your app for the first time ) – if you select this option, new entities and attributes are created in your app
-
Replace existing module (default option when the module already exists in your app) – if you select this option, you need to specify which Module to replace
If you have made any changes to the existing module, selecting the Replace existing module option will replace all the changes that you made (for example, your renamed entities, attributes, and associations as well as their respective tables and columns represented in the database will all be replaced). Your user data will stay if you have not changed entities, attributes, or associations. If you have changed data types, your user data can be influenced as well. For more information, see Attribute Type Migration.
-
-
Click Import.
-
Wait until a pop-up window states that the module was successfully imported. Click OK.
You can find the imported module in the App Explorer.
Manually Adding Content into App Directory
To manually add content downloaded from the online Mendix Marketplace into Studio Pro, follow these steps:
- Go to the Marketplace and sign in with your Mendix credentials.
- Search in the online Marketplace for the component you want to download and open the component details page.
- Check Usage > Version to see the required Studio Pro version for the component. Do not download a component that requires a higher version than the one you are using.
- Click Download to download the latest version of the component. Or, if you want to download an older component version, go to the Releases tab and Download the desired version.
- Open Studio Pro and sign in with your Mendix credentials.
- Open the app in which you want to install the Marketplace component.
- On the menu bar, click App > Show App Directory in Explorer. The app directory opens.
- Add the component into the app directory as follows:
- If it is a widget, add it into the widgets folder
- If it is an .mxmodule file, add it into the modules folder (you need to create this folder if it does not already exist)
- On the menu bar, click App > Synchronize App Directory.
- Wait until the synchronization is finished.
You can find the added widget in the Toolbox or the added .mxmodule in the App Explorer.
Using Content in Studio Pro
After you download a component, you can use the component in your app. For detailed information on how a component works, check the Documentation tab on the page of the component in the Marketplace.
Using a Widget
Adding the Widget to a Page
After you install the widget from the Marketplace in your app, there are two ways to add the widget from the Marketplace via Studio Pro.
To add a widget from the Toolbox, follow these steps:
-
Open the page where you want to add the widget.
-
In the Toolbox, search for the name of the widget (for example, Rating to find the widget):
-
Drag the widget to the place on the page where you want it to be.
To add a widget using the Add widget option from the toolbar, follow these steps:
-
Click Add widget on the toolbar on the page where you want to add the widget. The Select Widget dialog box opens.
-
In the Filter bar, enter the name of the widget, for example Rating, to find the widget.
-
Click the widget and then click Select.
-
In the page, click where you want to drop the widget. The widget is added to the location where the mouse pointer is.
Updating the Widget to a Newer Version
To update the widget in your app to a newer version, go to the Marketplace to download the right version, and install it in your app.
Maintaining Added Translations in a Widget to Update
In the scenario where you have an app with multiple languages in which you need to update an imported Marketplace widget that only comes with one language and where you have manually added translations for the additional languages you need, you can maintain the additional translations by following these steps:
- Maintain the translations for the widget by exporting them to Excel.
- Update the widget via the steps described above.
- Import the maintained translations from the Excel.
Configuring the Widget
After you place the widget in your page, some new errors can appear in the Errors pane. That is because you still need to configure the widget. In this procedure, the Ratings widget is used as an example.
To configure the widget, follow these steps:
-
Go to the Errors pane and check the error message. This error shows after you drop the Rating widget into the page:
-
In the page, double-click the Rating widget. The Edit Rating dialog box opens and the Attribute field shows (none) – this means that no attribute is assigned, which causes the error.
-
Click Select to select an attribute. In this example, we select the attribute ProductRating. This is the attribute of an entity that we already created.
-
In the Edit Rating dialog box, click OK. The error in the Errors pane disappears.
Using a Module
After you install a module in your app, you can use it.
A module downloaded from the Marketplace has a light blue icon to differentiate it from the development modules.
Updating the Module to a Newer Version
To update the module in your app to a newer version, follow these steps:
-
Before downloading the newer version, remove all the Java libraries that are only used by this module from the userlib folder in your app directory. Java libraries are accompanied by a blank [Module].RequiredLib file. This will help you identify by which module the Java libraries are used. Doing this prevents you from ending up with having conflicting Java libraries which cause unexpected issues.
-
Go to the Marketplace to download the right version and install it in your app. When the Import Module dialog box opens, select Replace existing module and click Import.
If you have made any changes to the existing module, selecting Replace existing module option will replace all the changes that you made, for example, your renamed entities, attributes, and associations as well as their respective tables and columns represented in the database will all be replaced. Your user data will stay if you have not changed entities, attributes, or associations. If you have changed data types, your user data can be influenced as well. For more information, see Attribute Type Migration. -
Check the userlib folder in your app directory for duplicate Java libraries. If your userlib folder contains multiple versions of the same Java library, it is usually safe to delete the old ones and keep only the new one.
Maintaining Added Translations in a Module to Update
In the scenario where you have an app with multiple languages in which you need to update an imported Marketplace module that only comes with one language and where you have manually added translations for the additional languages you need, you can maintain the additional translations by following these steps:
- Maintain the translations for the module by exporting them to Excel.
- Update the module via the steps described above.
- Import the maintained translations from the Excel.
Configuring the Module
Each module that you download from the Marketplace is different. Some modules can cause errors because they are connected to other modules. For example, after you download the Database Replication module, you also need to download the Mx Model Reflection module to accomplish the configuration. If you run into any problems, always check the Documentation tab on the page of this module in the Marketplace for installation guidelines and details on any dependencies.
Keep in mind that some modules you can download may come with their own user roles. If the Security level of your app is set to Prototype/demo or Production, you need to map the module roles to the applicable user roles in your app.
Using a Starter App
Downloading a starter app (via Create New App) creates a new app structure in the storage location that you select. After you click Download, a window will appear where you can specify how the app should be created.
Deleting Marketplace Content from Your App
To remove a widget from your app, follow these steps:
- In Studio Pro, go to App > Show App Directory in Explorer on the menu bar to open the app directory.
- Go to the widgets folder.
- Remove the .mpk file for the widget.
- In Studio Pro, go to App > Synchronize App Directory.
To remove a module and user data from your app, follow these steps:
-
In the App Explorer, find the module that you want to delete.
-
Right-click the module and select Delete from the pop-up menu. A warning pop-up window opens.
Once you delete a module, all your user data will be lost – even if you later install the module again. If you want to replace the existing module with a different version, do not delete the module – update the module instead. -
When you are sure that you want to delete the module and existing user data, click Delete module and user data.
Read More
- Importing and Exporting Apps, Modules, Widgets, and Documents
- Properties Common in the Page Editor
- My Top 5 Mendix Widgets for Speeding Up Application Development