Skip to content
Advertisement

Struts2 jQuery UI dynamic Menu from Action List

How can I generate dynamic menu & menu items from a list generated at Action? I tried this approach but it is generating only main menu but not sub-menus.

Action class:

JavaScript

JSP:

JavaScript

What can i do to get Menu with menu items?

Example classes structure:

JavaScript

How to configure this in JSP page with sj:menu tag?

Advertisement

Answer

The <sj:menu> tag generates a menu from list values, to create submenu you should use <sj:menuItem> in the body of <sj:menu> tag.

Also in the body of <sj:menuItem> you can use <sj:menu> tag.

The detailed explanation and example you can find here.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement