Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions docs/integrations/communication/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ You can show the screens you create using `ArmoryAPI.show()`, which takes the us
<li><code>public static Show show(String connectionId, List&lt;HistoryItem> history, Screen... screens)</code></li>
<li><code>public static Show show(String connectionId, String firstScreen, List&lt;HistoryItem&gt; history, Screen... screens)</code></li>
<li><code>public static Show show(String connectionId, List&lt;HistoryItem> history, Map&lt;String, Object&gt; configuration, Screen... screens)</code></li>
<li><code> public static Show show(String connectionId, String firstScreen, List&ltHistoryItem&gt; history, Map&lt;String, Object&gt; configuration, Screen... screens)</code></li>
<li><code>public static Show show(String connectionId, String firstScreen, List&ltHistoryItem&gt; history, Map&lt;String, Object&gt; configuration, Screen... screens)</code></li>
<li><code>public static Show show(String connectionId, List&lt;HistoryItem> history, List&lt;Screen&gt; screens)</code></li>
<li><code>public static Show show(String connectionId, String firstScreen, List&lt;HistoryItem&gt; history, List&lt;Screen&gt; screens)</code></li>
<li><code>public static Show show(String connectionId, List&lt;HistoryItem> history, Map&lt;String, Object> configuration, List&lt;Screen> screens)</code></li>
Expand All @@ -135,6 +135,41 @@ You can show the screens you create using `ArmoryAPI.show()`, which takes the us
</details>


### Flow configuration

You can use the <code>configuration</code> map as an argument in the <code>ArmoryAPI.show()</code> to customize every flow individually like this:
<ul>
<li>
<p><b>Add a custom favicon:</b></p>
<p>If you store a path to a custom favicon - <code>yourCustomFaviconPath</code> in <code>configuration</code> like here:</p>


```java
Map<String, Object> configuration = new HashMap<>("customFaviconPath", yourCustomFaviconPath);
ArmoryAPI.show(connectionId, configuration, screens);
```

<div>the screens in that flow will be shown with a custom favicon you've chosen.<br/></div>
</li>

<li>
<p><b>Add custom CSS:</b></p>
<p>Same goes for custom CSS for your screens. When you store a string containing CSS - <code>yourCustomCSS</code> like so:</p>


```java
Map<String, Object> configuration = new HashMap<>("customCSS", yourCustomCSS);
ArmoryAPI.show(connectionId, configuration, screens);
```

<div>you can differentiate the look of that particular flow from the rest of the project.</div>
</li>
</ul>

You can use any other implementation of the <code>ArmoryAPI.show()</code> method, as long as you pass the <code>configuration</code> map as an argument.

### Examples

Finally, here are some examples that show how the two different ways of building screens are used in rules. First one is covering the manual way, while the other is covering the configuration file way.

```java
Expand Down Expand Up @@ -337,7 +372,7 @@ This component is used for collecting user's input, especially in cases where yo
- `type` is used for setting the input type, different versions can be found [here](https://www.w3schools.com/tags/att_input_type.asp)
- `value` is used for setting the default value of the input and can be additionally edited from the user's side
- `required` is used for setting whether the input is required or not
- `label` is used for setting the label text, which will be shown directly above the input and serves as an description of the specific input field
- `label` is used for setting the label text, which will be shown directly above the input and serves as a description of the specific input field

#### SubmitButton

Expand Down Expand Up @@ -453,7 +488,7 @@ This component is used in cases where you need users to select multiple values f
- text: "Teamwork"
value: "teamwork"
- text: "Creativity"
value: "creativeity"
value: "creativity"
- text: "Detail oriented"
value: "flexible"
```
Expand Down