Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic entries in web form

 
Anam Zahra
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi my dear fellow!!!
I am making a plot in my mind for resolving a situation. Suppose, I have a web form with a field Department. I want to add Sub Departments(unknown number) of one Department and then further Sub Sub Departments(unknown number) of one Sub Department. How I will make a form and how I will add this data in attached database. I have one solution:
One Department field with a button to add any sub department if any. By clicking on button, a new row will be generated with another text field and new button. In this way, it will go on. Tree like structure.
But I have another solution, JSF Tree to add or delete entries on the run time. But the problem is that I am unable to find any example of JSF tree like structure populated from database and in which we can add or delete entries on run time and on the same time these entries may also be stored in database.
Can you please give me right direction so that I can choose the professional approach for resolving this situation.
 
Devaka Cooray
Marshal
Posts: 5184
503
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't suggest going for JSF just to populate text fields. (of course, unless you are already in JSF).
If I understand the context correctly, your first solution, which is using Javascript to populate text fields is the best way to go.
 
I've never won anything before. Not even a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!