Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to handle Web App with multiple different possible fields

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I have developed an app in Springboot, running a tomcat server displays several forms for inputting data for compiling UDP messages to send to different equipment.

The problem I have, is that the different equipment has subtle differences in required data, for example, one type has a time parameter that is mandatory, and another has no time parameter, and another the time is not mandatory.
Another example would be that some equipment use one term for a control parameter in the message, whereas another would use the same parameter but with a different name.

Obviously I could have different forms for each type, but this seems like it would be very bad practice and not at all malleable.

Can someone give me a steer as to how to handle this situation, in terms of displaying the correct fields in my forms, and then error and bounds checking the entered data in a logical and sensible manner for each case.

I should say that whilst I am not new to programming (I programmed C+ many years ago for real money), I am new to Java, JS, HTML, Spring, OOP and all the other things that I have chosen to use on this journey :-)

Thanks in anticipation for your thoughts and ideas,
Water proof donuts! Eat them while reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!