Rendering UI API - imona/tutorial GitHub Wiki

Imona Rendering UI API can be used to generate the UI of different clients like (FXML, Smartface...)

Authentication method

No authentication is required.

Services

Service URL: /rest/metadata/ui/public/{type}/{orgName}/{appShortName}/{entityName}?width=500
If width is not passed the service will generate the WEB layout.
If width<600 the service will generate the MOBILE layout if it is available.
If width>=600 and width<720 the service will generate the TABLET7 layout if it is available.
If width>=720 and width<=1536 the service will generate the TABLET10 layout if it is available.
If width > 1536 the service will generate the WEB layout.
Method: GET
Description: Retrieves the generated UI.
Sample response:
type= fxml:

<?xml version="1.0" encoding="UTF-8"?><?import javafx.scene.layout.Pane?><?import controls.IMONA_BUTTON?>
<?import controls.IMONA_LABEL?>
<?import controls.IMONA_TRANSIENT_TEXT_FIELD?>
<Pane fx:id="main" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"  xmlns="http://javafx.com/javafx/8.0.112-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.Controller">
<children>
<IMONA_TRANSIENT_TEXT_FIELD fx:id="IMONA_TRANSIENT_TEXT_FIELD1" layoutX="20.0" layoutY="280.0" visible="true" prefWidth="250" prefHeight="-1" />
<IMONA_BUTTON mnemonicParsing="false" fx:id="IMONA_BUTTON1" layoutX="20.0" layoutY="60.0" visible="true" prefWidth="250" prefHeight="30" text="null" />
<IMONA_LABEL fx:id="IMONA_LABEL1" layoutX="40.0" layoutY="180.0" visible="true" prefWidth="250" prefHeight="-1" text="null" />
</children>
</Pane>

type= sfjs:

(function() {var test = Pages.test = new SMF.UI.Page({name: 'test',onKeyPress: test_onKeyPress,onShow: test_onShow});
var IMONA_TRANSIENT_TEXT_FIELD1 = new SMF.UI.TextBox ({top : "53%",left : "6%",height : "10%",width : "78%"});
test.add(IMONA_TRANSIENT_TEXT_FIELD1);
var IMONA_LABEL1 = new SMF.UI.Label ({text : "Yeni Etiket",top : "34%",left : "12%",height : "10%",width : "78%"});
test.add(IMONA_LABEL1);
var IMONA_BUTTON1 = new SMF.UI.TextButton ({text : "Yeni Buton",onPressed : test_IMONA_BUTTON1_onPressed,top : "11%",left : "6%",height : "5%",width : "78%"});
test.add(IMONA_BUTTON1);
function test_onKeyPress(e) {if (e.keyCode === 4) {Application.exit();}}function test_onShow() {}})();
⚠️ **GitHub.com Fallback** ⚠️