A Custom JSP Tag Library for Dynamic Menus
by Prabu Arumugam04/09/2003
Menus are critical components of software applications. Implementing a static menu is relatively easy--just categorize and customize the application's functionality once. Implementing a dynamic menu, unique for each user depending on his or her profile and preferences, is both challenging and cumbersome.
While the Java programming language has built-in support to create basic menu structures, JSP lacks support. Web applications must use either Java applets or JavaScript to implement menu structures. Many web application developers prefer JavaScript to applets for simplicity and ease of deployment. This article describes a custom tag library that simplifies the process of generating JavaScript dynamically. The design and implementation of the tag library are covered in detail.
Design Approach
Our design goal is an object model that represents hierarchical data and contains methods to generate JavaScript.
Each menu in the hierarchical menu system can contain one or more simple menu items or sub menus, which in turn may contain simple menu items and submenus. The simple menu provides access to the application-specific functionality. Regardless of the menu type, the menu object should be capable of generating appropriate JavaScript.
Based on a composite design pattern, the simple menu represents the menu at
the leaf level, while the composite menu represents groups of submenus and
simple menus in the menu structure. In other words, the Composite can contain a
list of SimpleMenu objects and other CompositeMenu
objects. The Menu abstract class represents a menu in the
hierarchy and defines a render method for subclasses to provide
their own implementations.
Figure 1 illustrates the composite design pattern:

Figure 1. UML for our menu classes
The SimpleMenu renders menu items with URLs that point to
application functionality. The CompositeMenu overrides the
render method by looping through its list of submenus, calling
render on each. Remember, lists can contain both menu items and
sub menus, so menus can be multiple levels deep.
Listing 1 shows the render method of
CompositeMenu and SimpleMenu. Both methods just
produce JavaScript, which calls existing functions defined in dynamicmenu.js. Functions in this file are responsible for creating menus in the browser. The design and the
implementation of these functions are beyond the scope of this article.
The render Method of SimpleMenu
StringBuffer sb = new StringBuffer();
sb.append("addmenuitem(");
sb.append("\"" + getLevelCoord() + "\",");
sb.append("\"" + getMenuName() + "\",");
sb.append("\"" + getUrl() + "\",");
sb.append("\"black\",\"FAEBD7\",\"white\", \"3366CC\",\"white\",
\"3366CC\",\"font-family:Tahoma, Verdana, Arial;
font-size:12px;font-weight:normal,text-decoration:none;padding: 4px\");");
sb.append("\n");
return sb.toString();
The render Method of CompositeMenu
StringBuffer sb = new StringBuffer();
sb.append("addmenuitem(");
sb.append("\"" + getLevelCoord() + "\",");
sb.append("\"" + getMenuName() + "\",");
if (null == getUrl())
sb.append("null" + ",");
else
sb.append("\"" + getUrl() + "\",");
sb.append("\"black\",\"FAEBD7\",\"white\",\"3366CC\",\"white\",\"3366CC\",
\"font-family:Tahoma, Verdana, Arial; font-size:12px;
font-weight:normal,text-decoration:none;padding: 4px\");");
sb.append("\n");
Iterator it = list.iterator();
int i=1;
while(it.hasNext())
{
Menu menu = (Menu)it.next();
menu.setLevelCoord(getLevelCoord() + "," + i);
sb.append(menu.render());
i++;
}
return sb.toString();
Menu Data Source
The menu builder is responsible for building menus from the data source. Menu data is hierarchical by nature. It can come from any source that supports hierarchical data representation. We have implemented builders for two commonly used data sources: XML and a database. However, it is easy to develop other builders using this approach.
XMLMenuBuilder
Since menu structures and XML structures are both hierarchical, XML can
easily represent menu data. XMLMenuBuilder accepts the name of an
XML file that contains menu definitions and parses the XML document to build
the dynamic menu. The <menu> element in the XML document can
represent menu items or submenus, which in turn can contain menu items or
submenus.
JDBCMenuBuilder
Despite the fact that database tables represent relational data, tables can
still be used to represent hierarchical data. The HIERARCHYMENU
table represents hierarchical menu data. JDBCMenuBuilder accepts
database source information in order to select menu data from the
HIERARCHYMENU table.
Menu Tag Library
The menu tag library manages the complex process of creating menus in
JavaScript. The menu tag itself is an abstract class that extends the
TagSupport class and overrides the doStartTag and
doEndTag methods. The getMenu method, which is a
template method and should be overridden in the subclasses, provides JavaScript
to add menu items in the menu structure created in the doStartTag
method. Subclasses of the menu tag override the getMenu method,
which uses menu builders to render menu data from the data source.
The Dynamic Menu Tag Library contains two tags: JDBCMenuTag and
XMLMenuTag. JDBCMenuTag uses
JDBCBuilder to build the menu structure from a database source,
while XMLMenuTag uses XMLBuilder to build the menu
structure from an XML data source. The documentation provides complete
instructions for using the tag library.
The current version of this tag does have a few limitations, however. It does not yet comprehend the association between the user and the menu, which is different for each application. Also, the library does not provide support for specifying the color or font for menu items.
|
Download Source Code |
Menu Tag Sample Application
The menu-example.war file contains JSP pages that use this tag library. Follow these instructions to deploy the application on Tomcat:
- Copy menu-example.war to tomcat installation folder\webapps.
- Restart Tomcat to deploy the application.
- Adjust xmlmenu.jsp and jdbcmenu.jsp to fit your environment.
- Create a new database table structure and import seed data by running the menu.sql file.
- To access the JSP that builds menus from XML, visit localhost:8080/menu-example/xmlmenu.jsp.
- To access the JSP that builds menus from JDBC, visit localhost:8080/menu-example/jdbcmenu.jsp.
Conclusion
The Dynamic Menu Tag Library manages the complex process of creating menus in JavaScript, and allows web applications to build dynamic, hierarchical menus from a database or an XML source.
Resources
- For more information on menu tags, view the menutag.html documentation
- Design Patterns, Eric Gamma, Richard Helm, Ralph Johnson, John Vlissides (Addison-Wesley Publishing Co., 1995; ISBN: 0201633612)
- JSP Tag Libraries
Prabu Arumugam is a software architect and senior Java developer at Forest Express, LLC.
Return to ONJava.com.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 67 of 67.
-
Displaying the menu inside the Table Tag
2006-12-10 20:15:39 DynamicMenus [Reply | View]
Did anyone find the solution for displaying the dynamic menu inside the table tag
-
help on class attribute
2006-11-23 05:05:05 hsp2816 [Reply | View]
what is use /significance of class attribute with <td> tag
e.g.
<td class="bluetext">
what is meaning of this line?
-
dynamically change space between top menu items based on topmenu items length
2006-03-20 11:12:00 javaenthu [Reply | View]
Hi All,
I have used this for horizontal menu display.
My top menu items have varying lengths but since globalwidth is passed in initmenu from Menutag, I am not able to set dynamic widths.
Do anybody have a solution for this.
thanks a lot
javaenthu
-
Dynamic Sub menu position
2005-12-20 08:20:13 priya123 [Reply | View]
Hi,
Please help me in changing the position of the dynamic sub menu.
I want the submenu to appear either in the right side frame (or)
to appear on top of the main menu with some offset to left (as it is in tigra menu ).
Because this submenu opening in new td of table takes more space if i add the vertical tree in left frame.
Thanks a lot for helping -
Dynamic Sub menu position
2006-03-13 13:24:06 jayens [Reply | View]
Hi.. any luck with your problem?..
I'm facing the same problem in changing the Position of the menu display in the HTML page.
I'm using tiles Layout and trying to display the Menu below the Header page in Left navigation JSP.
The same menu display works great with single JSP.
If you got the solution pls pass it on..
Thanks,
Jay
-
Will it work in Jdeveloper 9.0.3
2005-09-20 06:06:30 khalidFahd [Reply | View]
Hi Prabhu, this is khalid,im been searching for dynamic Menus in JSP. I found your web page service,download and convert all files into Jdeveloper, this project is almost through...Finally when i run the project i get EOF error, im sure it comes from xml.. Can you please reply me ASAP and send me a complete step by step or demo how to setup and run this project in Jdeveloper or http Apache JServ.I appreciate your timing help in advance..
Cheers,
Khalid. -
Will it work in Jdeveloper 9.0.3
2005-10-17 19:15:49 HoneyJava [Reply | View]
hi khalid, this is mahesh and i am having the same problem when i used it in Oracle Jdevloper.but i don't have any error and the menu is not displayed...if u found any sol send me too also.thank you in advacne...
Cheers
Mahi
-
How to make the top level different from the rest of the menu.
2005-08-08 12:15:04 wshami [Reply | View]
Your code works perfect for my situation except for one problem I have. All I want to do is make the top level of the menu look different. i.e. The top level should be my custom images.
If there is anyway you could help me a little in this, it would be greatly appreciated.
Thanks
-
dynamic tree structure with jsp and oracle
2005-07-05 00:06:19 Selvi [Reply | View]
Dear Prabhu,
I downloaded the menuExample.war,
it doesn't contain jdbcmenu.jsp and sql commands..
my need is treestructure to be created.where parent node and child node and subsequent nodes to be get from the database..
could u help me in this. please
thks
selvi
-
Menu options for sample
2005-05-05 13:37:10 kenshinmax [Reply | View]
I got this program to work with a couple of tweeks. I recompiled the .java files and pointed the application to work with the MySQL server that I am using. Great Job to the designer!!! The program is solid and well built.
I just have one question, is it possible to alter the menu so that it looks more like a tree menu, rather then the existing menu look.
Thank you,
Kenshinmax
-
doubt regarding how to deploy
2005-04-22 17:26:42 anjaliiiii [Reply | View]
hi there
1----i tried menu.zip and menu-example.war file.pls could anyone tell me how to deploy these. i m not getting.pls tell me step by step how to deploy these two. what will be the requirements for this.
where i should deploy menu and where menu-example.war.
2------ when i compile java file then it gives error.........................................
pls tell me all the details asap.
thanks........
email-id mca_fresher_2004
-
Menu Errors on IE 6 ???
2005-03-05 17:18:27 kid1981 [Reply | View]
if you display menu alone (not include on another file) then it working fine.
but you include menu.jsp to another file.jsp, it die...... why???
???? Author here ????
-
inactive menu item
2005-02-22 04:13:00 ataer [Reply | View]
I want to make some menu items inactive. How can I do this? Please help!
-
menu
2005-02-05 01:14:35 shivajava [Reply | View]
hello
i am shiva.i want to use the meunus in my java script. how i will get efficintly.
i am using tomacat and sun application server
this is shiva
-
jdbcmenutag
2004-12-20 21:23:01 zeesunil [Reply | View]
how to make jdbcmenutag using frames.
All top nodes should come in one frame and rest of nodes should come in another frame.
help me from this way.
thanks
-
URGENT... regd. JDBCMENUTAG
2004-12-20 06:06:53 zeesunil [Reply | View]
hi
jdbcmenutag is working fine without frames.
but i want to need it in frames urgently.
i.e., all root nodes should in one frame and all rest of the nodes should be in another frame.
plz, some one just help me out of this way.
atleast prabhu should send reply for this problem.
If anyone know the solution atleast guide me or send me the details to this id : zeesunil@yahoo.com
bye
-
DOUBT REGD. JDBCMenuTag
2004-12-20 02:12:41 zeesunil [Reply | View]
JDBCMenuTag is working fine without frames.
i need to work on frames also.
i.e., the root nodes should be in one frame and all other nodes should be in another frame.
plz help me out of this loop.
Send me the detail documentation regd. this doubt to this id : zeesunil@yahoo.com
bye
-
doubt regd. jdbcmenutag
2004-12-20 00:41:28 zeesunil [Reply | View]
hi
This is sunil.
Your dynamic jdbcmenutag is excellent and working fine.
It is working perfect in horizontal format.
But i need in vertical format.
What changes i have to do to get it vertical.
plz send the detail documentation of making it vertical to this id : zeesunil@yahoo.com.
bye
Sunil
-
doubt regd. jdbcmenutag---very urgent
2005-07-09 04:23:30 Selvi [Reply | View]
My dear
I seen your comments on jdbcmenu.jsp on oreiellynet.com.. that tree structure is working in vertical format..
for me tree structure is not working. so could you please send me the source code and structure of web application..
thks
bye -
doubt regd. jdbcmenutag
2004-12-20 21:27:30 zeesunil [Reply | View]
JDBCMenuTag is working fine in horizontal as well as vertical format.
Just you have to type vertical instead of horizontal.
that's all
but one more doubt is how to make it work in frames. i.e., all root items should come in one frame and rest of the menu items should come in another frame.
someone help me out this way.
thanks
bye -
doubt regd. jdbcmenutag
2005-01-29 06:33:52 vilpesh [Reply | View]
hi
please goto this url as that may help u
http://www.softcomplex.com/products/tigra_menu/
as the code in dynamicmenu.js has been derived from above site.
My Problem:
I read "Custom JSP Tag Library for Dynamic Menus" and used menu.zip, menu-example.war.But on using it & clicking on the Menu items i got the result page in the same frame, but i was using html frames and wanted to load the new page in another frame so after referring to website above & looking i just added target = "main" (main is the name of the target frame where the new page must get displayed), i just added that line in the function
function mitem_init()
{
'<a id="mi_' + this.container.id + '_'
+ this.id +'" class="m' + this.container.id + 'l' + this.depth
+'o" href="' + this.fields[1] + '" target="main" style="position: absolute; top: '
hope some help to u
thanks -
doubt regd. jdbcmenutag
2006-03-13 13:36:54 jayens [Reply | View]
Hi VilPesh,
Your solution looks good. but how to change the position of the menu display itself.
For ex: I'm trying to display a banned and below that would like the menu to be displayed.
I'm not sure where to change the settings.I tried lot of things but still the menu is getting displayed at the top left corner of the page.
Any help in this regard is really appreciated.
Thanks,
Jay
-
the same problem...
2004-12-14 00:05:31 gino1203 [Reply | View]
I also have such problem,but seems nobody can solve this problem..
poor....
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Unable to Print the Menu.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.jdbcmenu_jsp._jspService(jdbcmenu_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
root cause
java.lang.Error: Unable to Print the Menu.
menu.MenuTag.doEndTag(Unknown Source)
org.apache.jsp.jdbcmenu_jsp._jspx_meth_menu_renderMenuFromDB_0(jdbcmenu_jsp.java:94)
org.apache.jsp.jdbcmenu_jsp._jspService(jdbcmenu_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.24 logs.
-
the same problem...
2005-07-11 23:34:43 Selvi [Reply | View]
My dear
I also have the same problem what you have mentioned for jdbcmenu.jsp(jsp tree structure)..
If u rectified this send me a reply to me
thks
bye -
the same problem...
2005-06-13 02:33:15 piotr22 [Reply | View]
please I have the sam problem.
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Unable to Print the Menu.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.jdbcmenu_jsp._jspService(jdbcmenu_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.Error: Unable to Print the Menu.
menu.MenuTag.doEndTag(Unknown Source)
org.apache.jsp.jdbcmenu_jsp._jspx_meth_menu_renderMenuFromDB_0(jdbcmenu_jsp.java:94)
org.apache.jsp.jdbcmenu_jsp._jspService(jdbcmenu_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
What can I do?
What's wrong -
the same problem...
2004-12-20 00:55:26 zeesunil [Reply | View]
i also have such problem earlier.
but i later i found that error.
In JDBCMenuBuilder.java file. prabhu disabled the line class.forName(driver). so, just you go and enable the line.
I think it will work fine.
if else mail the reply
bye
Sunil
-
Please Help - Thank you.
2004-07-01 02:44:19 Dazzler [Reply | View]
Hi,
when i am including the following code in my jsp,
its working fine in Mozilla but unable to get the expanded popupmenu in Internet Explorer.
It will be fine when I remove all the <table>,<tr> and <td>.
But i want to have the code in tds so that i can align another td beside it..
/********code***********/
<%@ taglib uri="/WEB-INF/menu.tld" prefix="menu" %>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="topbar" width="85%">
<menu:renderMenuFromDB />
</td>
<td class="topbar" width="184" align="right">
-
Please Help - Thank you.
2005-03-05 03:25:56 kid1981 [Reply | View]
no helper - i have same problem, i haven't solution.
What's Solution ??? ...... Prabu Arumugam ????
-
jdbcmenu.jsp error
2004-06-28 13:49:58 sumanish [Reply | View]
I created the table HIERARCHYMENU from menu.sql file.
http://localhost:8080/menu-example/jdbcmenu.jsp
gives me the following error..please help. THanks
exception
javax.servlet.ServletException: Unable to Print the Menu.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.jdbcmenu_005fyardi_jsp._jspService(jdbcmenu_005fyardi_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.Error: Unable to Print the Menu.
menu.MenuTag.doEndTag(Unknown Source)
org.apache.jsp.jdbcmenu_005fyardi_jsp._jspx_meth_menu_renderMenuFromDB_0(jdbcmenu_005fyardi_jsp.java:93)
org.apache.jsp.jdbcmenu_005fyardi_jsp._jspService(jdbcmenu_005fyardi_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
-
JSP Tag Libraries
2004-06-10 06:45:42 fj_rodriguez [Reply | View]
Java-Source.Net contains a list of other JSP Tag Libraries
-
JavaScript errors with Netscape 4.7 & menu-example.war
2004-03-08 02:34:09 cwele [Reply | View]
Hi,
when I try to run menu-example.war (with Jetty included in JBoss and Netscape 4.7) I get the following errors:
---------------
JavaScript Error:
http://localhost:8080/menu-example/dynamicmenu.js, line 360:
document.styleSheets has no properties.
JavaScript Error:
http://localhost:8080/menu-example/menu.jsp, line 27:
document.getElementById is not a function.
--------
So what is the problem ?
-
problem with menu inside <TD> in IE
2004-02-24 03:52:25 asanjuin [Reply | View]
Hi,
when i am including the following code in my jsp,
its working fine in Mozilla but unable to get the expanded popupmenu in Internet Explorer.
It will be fine when I remove all the <table>,<tr> and <td>.
But i want to have the code in tds so that i can align another td beside it..
/********code***********/
<%@ taglib uri="/WEB-INF/menu.tld" prefix="menu" %>
<table width="100%" border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="topbar" width="85%">
<menu:renderMenuFromDB />
</td>
<td class="topbar" width="184" align="right">
Home | Logout
</td>
</tr>
</table>
how to rectify it.
regards,
sanju
-
help me please?
2004-02-06 14:32:25 camilo79 [Reply | View]
ok the example is goob, I can run whithout problem
<%@ taglib uri="/WEB-INF/menu.tld" prefix="menu" %>
<menu:renderMenuFromXML xmlFilename="C:\Archivos de programa\Apache Group\Tomcat 4.1\webapps\pruebaXml\WEB-INF\classes\menu1.xml"/>
I want to send like parameter the name xml file..
how to do that...thanks
-
how to load menu-example on tomcat
2003-11-21 06:52:08 rexam [Reply | View]
Can anyone on give me a quick overview on how to load the example onto tomcat!! not quite sure which of the two files to use thanks
-
How to configure Dynamic menu for User and Access Right
2003-11-13 01:26:53 ashu_iit [Reply | View]
Hi !
I want to use dynamic menu and dislay the menu items as per user'd sccess rights, what are the things i am supposed to do in order to achieve it. I want to use XML file for it.
Its very urgent. -
How to configure Dynamic menu for User and Access Right
2007-09-18 00:53:02 Venkatreddy [Reply | View]
Hi,
I have come across the same issue.Solution is we need have a column in table which specifies role.
Get the list of menu items that should be disabled.Have it in List.Then pass this list to js as an Array.
In DynamicMenu.js file access that array elements and call your function then add this foollowing lines there....
document.getElementById('mi_' + this.container.id + '_' + menuid).disabled = true;
IF any queries post it.
Thanks,
Venkat. -
How to configure Dynamic menu for User and Access Right
2003-11-17 04:38:08 anonymous2 [Reply | View]
Hello
I am not very sure about XML part but there is a simple way .You can have the role and menu item id and the url in a table and then display the menu .
What I mean is when user logges in get his role and fetch the menu items and url in a hashtable .
URL is not mandatory to be put into the same table ,
Thanks
Arvind
-
has some problem in using
2003-09-12 04:24:00 anonymous2 [Reply | View]
Both the menu from Database an from Xml.It works well.
But it can only display 5 root menu.But the other levle menu works well.Anyone meets the same problem.How to deal with?
-
how do i split the menu bar?
2003-08-26 01:39:40 anonymous2 [Reply | View]
Dear techquies, i implemented the dynamic menu in my application, its quite usefull in my program, but i have a very severe problem, how can i split the menu in to next line that's i can display 7 levels in normal view, if i increase the levels to 14 it gives the side scrolling which is not a good look as far as presentation of application is concerned, i would like to display 7 items and then split the menu and display 7 items in next line and in the same way i would like to continue in every after line if the menu grows from 14 to 21, please help me i am badly in need of this, i am trying to change it with the code but not effective may somebody have the good idea for this.
Thanx in advance
-
How to add more parameters
2003-06-16 11:43:27 amitdas91 [Reply | View]
Besides the standard parameters passed to the tag from the jsp page: driverName, driverURL, etc
I want to add another parameter.
I have changed the all applicable lines but I get an error on the main function of JDBCMenuBuilder.java
>>JDBCMenuBuilder builder = new JDBCMenuBuilder("driver", "jdbc", "user", "pass", variableNewParameter);
>>gives an error:
209: non-static variable variableNewParametercannot be referenced from a static context
Error is due to passing a variable instead of a static value, how can I pass a variable:
amit
-
How do I change the Position of the Menu?
2003-05-21 10:36:55 venu_dvmr [Reply | View]
I am trying to put the menu into a table. When I try to, It position remains to be on the Top of the page.
Can any one who try doing this can give an example or can tell me where I need to change.
Thanks -
How do I change the Position of the Menu?
2003-05-21 11:11:38 venu_dvmr [Reply | View]
I was able to change the postion of the Menu. I have changed in doEndTag() of MenuTag.java
I will try to create the header with a logo on top and menu under it. Hope it should work fine.
Thanks -
How do I change the Position of the Menu?
2003-09-30 19:46:15 anonymous2 [Reply | View]
What did you changed in doEndTag()?? -
How do I change the Position of the Menu?
2006-03-13 13:20:35 jayens [Reply | View]
I'm also having problem in changing the position of this Dynamic menu display.It gets displayed top of the HTML page.
All i'm trying to do is bring it in Tiles JSP Layout.So that Menu appears on the left navigation JSP below the Header JSP.
If anyone have tried this pls help me in resolving this problem.
Otherwise Menu works great in single JSP.
Thanks,
Jay
-
the menu always tries to position itself at the top-left corner of screen
2003-05-20 11:05:23 anonymous2 [Reply | View]
Although I want to place the menu after some banners/logo's of the company, it automatically positions itself at the top left corner.
Is this a bug, or am I doing something wrong?
-
for a comparison
2003-05-05 03:49:05 anonymous2 [Reply | View]
look at http://javer.narod.ru/jspmenu.htm
-
color needs # to work on mozilla+netscape
2003-04-23 07:03:14 anonymous2 [Reply | View]
e.g. 3366CC should be #3366CC etc...
in SimpleMenu.java and CompositeMenu.java
Thanks for posting the demo.
-
JavaScript part of this product is developed by SoftComplex Inc.
2003-04-19 11:58:14 anonymous2 [Reply | View]
JavaScript part of this product is developed by SoftComplex Inc. (http://www.softcomplex.com/). Original JavaScript product (Tigra Menu http://www.softcomplex.com/products/tigra_menu/) is free of charge for any kind of applications, but product information block should be left unchanged. This part of the licnese agreement wasn't followed by authors of JSP Tag Library for Dynamic Menus.
SoftComplex team.
-
Please provide description on how to set-up Menu properties in XML file?
2003-04-19 07:49:09 anonymous2 [Reply | View]
-
JavaScrip Menu Documentation
2003-04-19 07:25:38 anonymous2 [Reply | View]
Since you've used SoftComplex Tigra Menu JavaScript - you should put a link to thier documentation:
http://www.softcomplex.com/products/tigra_menu/docs
-
JavaScrip Menu Documentation
2003-04-19 07:19:38 anonymous2 [Reply | View]
Since you've used SoftComplex Tigra Menu JavaScript - you should put a link to thier documentation:
http://www.softcomplex.com/products/tigra_menu/docs
-
all the files there?
2003-04-10 09:04:39 anonymous2 [Reply | View]
the war archive seems to be missing the xml and jdbc example jsp files... -
all the files there?
2003-04-10 15:17:16 anonymous2 [Reply | View]
The .war file contains menu.xml in the WEB-INF/classes/menu/ folder. Please copy the file
to the folder specified in the menu.jsp. Here is the code that uses JDBC
<HTML>
<HEAD><TITLE>Test program </TITLE>
</HEAD>
<BODY>
<%@ taglib uri="/WEB-INF/menu.tld" prefix="menu" %>
<menu:renderMenuFromDB driverName="oracle.jdbc.driver.OracleDriver"
driverUrl = "jdbc:oracle:thin:@xxxx:1521:xxxx"
userName="xxxx"
password="xxx"/>
</BODY>
</HTML>
Please change xxx with your values. -
all the files there?
2003-12-22 03:28:21 anonymous2 [Reply | View]
Can you tell me how to ask a question to net users as you are doing?
my mail id is:vincilin@rediffmail.com -
Pls help me
2003-11-11 21:44:02 naveenkumarg1 [Reply | View]
Iam a newbie to jsp.My requirements are to build a horizontal menu with three levels and the menu detials are retreived from database.My environment is jbuilder8 and sql server.So in order to run this menu in jbuilder and with sqlserver what i had to do.Can anyone give me some steps to do this.I will be very thankfull to u.As iam a newbie to jsp and java i cannot understand how to do this in jbuilder.
my mail id:- gudipallyn@yahoo.com
Thnaks
Naveen




