Solved

Menu Design using XML, DOM PARSER(Java),Jsp

Posted on 2006-11-24
3
484 Views
Last Modified: 2013-11-23
SUBJECT

                I want to display a menu in jsp from xml document using DomParser. that DomParser Code should be written in java we can handle the event using javascript.for desig we can use HTML & CSS .

                 i know to get a data from xml using dom parser and also i displayed a value into the jsp page, but i can't able to from display the data like a menu.

                can you help me for that

if you know the answer send me to my mail id (selvaraj.ravikumar@cognizant.com or ravikumar.sun.java@gmail.com)
 
My XML File Content is like This,
 

<?xml version="1.0" encoding="UTF-8"?>
<application name="mtm">
            <menuDefinition role="admin">
                        <menu>
                              <menuId>0</menuId>
                              <name>File</name>
                        </menu>
                              <menu>
                                    <menuId>1</menuId>
                              <parentId>0</parentId>
                                    <name>open</name>
                              </menu>
      <menu>
                                    <menuId>2</menuId>
                              <parentId>0</parentId>
                                    <name>save</name>
                              </menu>
                        <menu>
                              <menuId>1</menuId>
                              <name>Edit</name>
                        </menu>
                        <menu>
<menuId>1</menuId>
                                    <parentId>1</parentId>
                        <name>Cut</name>
      </menu>
      <menu>
                                    <menuId>2</menuId>
                                    <parentId>1</parentId>
                                     <name>Copy</name>
       </menu>
                  </menuDefinition>

</application>


i want the output Jsp page like

                                              File  >
                                              Edil  >


If we pressing the File Menu Know it should be display like,
 
                                              File  >
                                                   New
                                                   Open
                                              Edil  >

If we pressing the Edit Menu Know it should be display like,

                                              File  >
                                              Edil  >
                                                  Cut
                                                  Copy


If we pressing the Edit Menu – SubMenu Copy Know it should be display like,

                                              File  >
                                              Edil  >
                                                  Cut
                                                  Copy >
                                                            ClipBoard
 

with regards
ravi(cts pvt ltd-india)
selvaraj.ravikumar@cognizant.com
9884599329
 
0
Comment
Question by:srinivasdumpala
3 Comments
 
LVL 9

Accepted Solution

by:
matthew016 earned 500 total points
ID: 18085714
U will need HTML, CSS and Javascript.

use ID's in CSS for each menu, then u hide/show the submenu's via Javascript code if u detect a click on a menu.


document.getElementById("someElementIdHere").style.display='';                // to reset the display status (to show)
document.getElementById("someElementIdHere").style.display='hidden';      //(to hide)


<table style="display:hidden" />    (<-- the submenu's are hidden by default)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now