Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

This is really bad => How to add a combobox to an existing textfield dynamically

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I have designed a bean with a combination of labels and textfields . The value of the textfield is dependent on certain other attributes. So
1. If one of these other attributes is a string, the textfield should accept only strings
2. If one of these other attributes is an Integer, then the textfield should accept only integers.
3. If one of these other attibutes is a combobox, then a combobox with diff. choices should show up.
How do I get the textfield to function this way. Please help. An example code would be great for understanding the concept.
Thanks
Meghna
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is often done, is that you put a "submit" button on your GUI. Then when the user is done with their input and clicks the button, you can edit the contents of each field and send back appropriate error messages. This method does not PREVENT the user from inputting incorrect stuff, but you just don't accept it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic