DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Build a Dynamic Web Form Using Camunda BPMN and DMN
  • Automating a Web Form With Playwright MCP and MySQL MCP
  • Exploring Intercooler.js: Simplify AJAX With HTML Attributes
  • Dynamic Web Forms In React For Enterprise Platforms

Trending

  • Apache Spark Query Optimization on Databricks: Catalyst, AQE, and Photon Engine
  • Who Owns the Data Stack?: How AI Is Reshaping Ownership, Architecture, and Accountability Across Teams
  • Building AI-Powered Java Applications With Jakarta EE and LangChain4j
  • Jakarta NoSQL: Why JPA Is Not Enough for the AI Era

Building Dynamic UI Form With Oracle JET

In the heart of dynamic form logic, we are using JET bind for each tag, it renders form elements from metadata.

By 
Andrejus Baranovskis user avatar
Andrejus Baranovskis
·
Apr. 16, 20 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
4.7K Views

Join the DZone community and get the full member experience.

Join For Free

Dynamic form is a common requirement when building more advanced UIs. With Oracle JET you have all the tools available to build dynamic form. One of the examples of dynamic form requirements — report parameter capture screens. 

Building fixed forms to capture parameters for each report would be an overkill. A smarter approach is to build one dynamic form, which would handle a set of different UI components and render based on metadata received from the service.

oracle app name

When values are changed, we can capture all changes while submitting the form — value printed in the log.

oracle form

In the heart of dynamic form logic, we are using JET bind for each tag, it renders form elements from metadata.

JET code snippet

Each element is checked and based on the type — UI field is rendered through JET if tag. Input field properties are fetched from metadata.

Example of metadata structure — array. It is important to use Knockout observable for value property. This will allow capturing user input. When we submit the form, we can iterate through the array and read value property.

dynamicform.js

Sample code available on GitHub.

Form (document)

Published at DZone with permission of Andrejus Baranovskis. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Build a Dynamic Web Form Using Camunda BPMN and DMN
  • Automating a Web Form With Playwright MCP and MySQL MCP
  • Exploring Intercooler.js: Simplify AJAX With HTML Attributes
  • Dynamic Web Forms In React For Enterprise Platforms

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook