aspose file tools*
The moose likes Struts and the fly likes Dynamic menu using jquery with data from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamic menu using jquery with data from database" Watch "Dynamic menu using jquery with data from database" New topic
Author

Dynamic menu using jquery with data from database

Yuva Kumar
Greenhorn

Joined: Jul 18, 2008
Posts: 12
Hi All

I have a static accordion menu displayed currently using the struts-jquery. Now, I need to fetch list of menus / submenu items from the database and display to the logged in user, based on their roles. How can I achieve this. Is there any solution in jquery/json/ajax. Can someone please help me with an example.

My static menu :

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>

<sj:accordion id="accordion" collapsible="true" autoHeight="false">
<sj:accordionItem title="Master Maintenance" cssStyle="color: red;">
<s:a href="duration-form" style="text-decoration: none">Duration Master</s:a></br>
<s:a href="grade-form" style="text-decoration: none">Grade Master</s:a></br>
<s:a href="technology-form" style="text-decoration: none">Technology Master</s:a></br>
<s:a href="currency-form" style="text-decoration: none">Currency Master</s:a></br>
<s:a href="customer-form" style="text-decoration: none">Customer Master</s:a></br>
<s:a href="customer-form" style="text-decoration: none">Project Master</s:a></br>
<s:a href="customer-form" style="text-decoration: none">Hourly Rate Master</s:a></br>
</sj:accordionItem>
<sj:accordionItem title="Configurations"></sj:accordionItem>
<sj:accordionItem title="Generate Rate Card"></sj:accordionItem>
</sj:accordion>

Thanks in advance

Yuva
 
wood burning stoves
 
subject: Dynamic menu using jquery with data from database