How to Generate menu from a databases
Hello,
It is possible to generate a menu from an XML file? (I will mostly prefer from XML otherwise any other language will also do). I think that if it can be done directly from a database, we avoid creating the XML file in question from the base.
Of course I work with Netbeans 6.5 as IDE, GlassFish v2 application server as, among other things and it does not bother me to import other libraries if necessary.
In short, my question is how to generate the menu dynamically from the database. I always speak as part of a web application in Java.
Thank you very much!
Re: How to Generate menu from a databases
The following structure is kept in a single database table with the following fields:
Code:
field name field type description
id int unique item identifier (cannot be zero)
parent_id int parent item (or zero for top-level items)
node_name varchar text of menu item
node_url varchar target URL
The above table is called sample_structure in the sample code. Please note that if you're using a different format for storing the structure, all you need to do is change the SQL queries in the sample code.
Note that you will need to remove the sample lines generated by DHTML Menu Studio. This means a few calls to SSAdd... functions that come after the comment.
Re: How to Generate menu from a databases
The fully-qualified key database name must be between 2 and 251 characters and should either have no extension or an extension of '.kdb' (the maximum database name is 247 characters if the name does not end with an extension of 1-3 characters to allow for the addition of an extension when creating the request database or the password stash file).
for more information on the database menu please check here
http://publib.boulder.ibm.com/infoce...gsk1756415.htm