Hi!
We are using dbforms in a project. Now we like to add a function, to create a new field (column) in a given table at runtime. Can dbforms handle this?
Thanks in advance for all informations!
regards T.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No the framework will not notice the changes immediately. The only possibility is to add fields with program code. You must access the config data by a servlet and add the field definitions at runtime.
Yes there is an object with the fields list. Have a look at the Config object, there is a method tableByName or so. With the table in your hand you have access to the fields list.
regards,
Henner
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, now I see. We have to access the config object. Since this access will produce temporary modifications in the fields list object (it will be lost on next application startup), I think we will write the new table field to the xml config file too.
Thanks for your hints Henner!
regards T.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
We are using dbforms in a project. Now we like to add a function, to create a new field (column) in a given table at runtime. Can dbforms handle this?
Thanks in advance for all informations!
regards T.
New field in the database? Or new field in the configuration?
Henner
We like to add new field(s) in the database tables at the runtime.
regards T.
The question is: can we see and use the new fields via dbforms as soon as they are created in the DB?
As far as I now, dbforms is structured in static table definitions in the dbforms-config.xml.
regards T.
Yes it is. But you can change the field definition at runtime with some code.
Henner
You mean the definitions in the dbforms-config?
Ok, that's right, I will try it with an xml parser. Hopefully the dbforms framework will notice the changes immediately.
But now we have to explore the field structure of a table in a dynamic manner within the JSPs.
Is there an object in dbforms with a fields list in it?
regards T.
No the framework will not notice the changes immediately. The only possibility is to add fields with program code. You must access the config data by a servlet and add the field definitions at runtime.
Yes there is an object with the fields list. Have a look at the Config object, there is a method tableByName or so. With the table in your hand you have access to the fields list.
regards,
Henner
OK, now I see. We have to access the config object. Since this access will produce temporary modifications in the fields list object (it will be lost on next application startup), I think we will write the new table field to the xml config file too.
Thanks for your hints Henner!
regards T.