Solved

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

Posted on 2006-11-24
3
475 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

707 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

18 Experts available now in Live!

Get 1:1 Help Now