• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

How to Create Dynamic Menu and Sub menu using table

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello guys

I need help for creating Menu and sub menu bar using table from database ,
Menu and sub menu should be dynamically add,
I'm using Spring MVC with Hibernate

thanks
 
Ranch Hand
Posts: 499
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
angad jha,

You mean to say that your menu and sub menu headings are in a table in database and you want to retrieve them and show it? Can you please show us what you have tried upto now? Code ranch is Not a code mill. If you haven't tried anything, please Show some Effort. We are happy to help you.
 
angad jha
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I want show data something like that
(http://javakafunda.blogspot.in/2014/08/how-to-create-multi-level-menus-using.html)
and data should be come form table.
I did like below :
for(MenuTO m: menuList){
System.out.println(m.getMenuTitle());
printChilds(m);
model.addAttribute("menuList", menuList);
}

private void printChilds(MenuTO m){
if(m.getChilds() !=null){
for(MenuTO mmd:m.getChilds()){
System.out.println(mmd.getMenuTitle());
printChild(mmd);
}
}
}

Now I need to show on JSP ,
I'm using Spring MVC
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic