Skip to content
Discussions/App Development/How do you generate dynamically in Navigator the UI input widgets?Forum ↗

How do you generate dynamically in Navigator the UI input widgets?

App Development5 posts223 views1 likesLast activity Apr 2023
GY
gyorgybalazsiOP
Apr 2023

I want to create UI input widgets always mirroring the data types in the Daml model for myself.

CO
cocreature
Apr 2023

I don’t think this is supported at the moment. Generally, I would recommend to build your own UI based on the react bindings and not rely on customizing navigator.

GY
gyorgybalazsi
Apr 2023

Yes, my question was not clearly formulated.

I don’t want to customize Navigator, I want to build my own UI in a way that the input widgets are dynamically generated.

I’m just interested how this works with Navigator to maybe get some inspiration.

CO
cocreature
Apr 2023

Oh I see, if you want to build generic apps that are not specific to a given Daml model then you often have to fetch the packages from the ledger and parse them to gather various kinds of metadata, e.g., the list of choices. You’re largely on your own there but at a high-level you’ll have to do this:

  1. Fetch the packages from the [package service]( The thing is the contractId which I’m trying to show and persist has been already created in a separate transaction)
  2. Decode the Daml-LF protobuf
  3. Process the decoded Daml-LF in some form to extract whatever info your tooling needs.

Both the JSON API and Navigator do something similar here.

GY
gyorgybalazsi
Apr 2023

Thank you!

← Back to Discussions