I have another problem. I want to create new custom control, which is almost the same as Dynamic Data Dropdown. The difference is that user instead of typing in control details data like this:
- URL - http://www.example.com/ABCDE
- Items - items
- Label - label
- Value - value
should pass only
- Dictionary - ABCDE
and the rest of the URL and other data should be default and remembered in the control. So instead of 4 input fields (url, item, label, value) there should be only 1 (dictionary). I already figuraed out how to remove these input fields and add the one that I want:
I simply replaced this part of code:
<xf:input ref="@resource">
<xf:label lang="en">Resource URL</xf:label>
<xf:label lang="es">URL del Recurso</xf:label>
<xf:label lang="fi">Resurssi URL</xf:label>
<xf:label lang="fr">URL de la ressource</xf:label>
<xf:label lang="ru">URL ресурса</xf:label>
<xf:label lang="it">URL della risorsa</xf:label>
<xf:label lang="de">URL der Ressource</xf:label>
<xf:label lang="sv">Resursens adress</xf:label>
<xf:label lang="nl">Resource URL</xf:label>
<xf:label lang="pt">URL do Recurso</xf:label>
<xf:hint lang="en">HTTP URL returning data used to populate the dropdown</xf:hint>
<xf:hint lang="es">HTTP URL retornando datos para poblar la lista</xf:hint>
<xf:hint lang="fi">HTTP URL palauttaa pudotusvalikon täyttämiseen käytettyä dataa</xf:hint>
<xf:hint lang="fr">URL HTTP auquel réside le service</xf:hint>
<xf:hint lang="ru">HTTP URL сервиса, данными из которого будет заполнен выпадающий список</xf:hint>
<xf:hint lang="it">URL HTTP che da i dati per il menu a tendina</xf:hint>
<xf:hint lang="de">HTTP URL die die Inhalte für das Dropdown-Menü liefert</xf:hint>
<xf:hint lang="sv">Vanligen en Internetadress som börjar med http://</xf:hint>
<xf:hint lang="nl">HTTP URL als bron voor de gegevens in de selectie</xf:hint>
<xf:hint lang="pt">HTTP URL devolvendo dados para preencher a lista de opções</xf:hint>
</xf:input>
<xf:input ref="xf:itemset/@ref">
<xf:label ref="$resources/dialog-actions/items/label"/>
<xf:hint ref="$resources/dialog-actions/items/hint"/>
</xf:input>
<xf:input ref="xf:itemset/xf:label/@ref">
<xf:label ref="$resources/dialog-actions/item-label/label"/>
<xf:hint ref="$resources/dialog-actions/item-label/hint"/>
</xf:input>
<xf:input ref="xf:itemset/xf:value/@ref">
<xf:label ref="$resources/dialog-actions/item-value/label"/>
<xf:hint ref="$resources/dialog-actions/item-value/hint"/>
</xf:input>
with this:
<xf:input ref="@resource">
<xf:label lang="en">Dictionary</xf:label>
<xf:hint lang="en">Dictionary returning data used to populate the dropdown</xf:hint>
</xf:input>
And now I have no idea how to store the default values which should be remembered and how to bind them to the methods so it can retrieve elements from the url to my dropdown control. Please help
Ok, I've done something like this:
and it works (takes values from the given xml), but now I want to give the user oportunity to choose the name of dictionary. So in URL to the xml file (http://localhost:8080/form/resources/dictionaries/colors), in place of colors, I want to insert string which user put in dictionary input in control details. How can I achieve it? Is it gonna change dropdown list after user click apply in control details?