Announcement Announcement Module
Collapse
No announcement yet.
JSTL display foreign key value associated along with a primary key Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSTL display foreign key value associated along with a primary key

    I am having problem trying to display a sub category menu using JSTL.

    I have a css list menu type for a site I am developing. The name of the menu category is created in a database with a primary key and the submenu also created in a database and has a primary and a (foreign key = "category"). I have managed to retrieve and display this main menu but I don't know how to display the submenu when a user hovers the main menu:

    Current code used:

    //<div id='cssleftNav'>
    <ul>
    <c:forEach var = "category" items="${categories.rows}">
    <li class='has-sub'>
    <a href="category?${category.id}"><span>${category.na me}
    </span></a>
    <ul>
    <c:forEach var = "subcategory" items="${subcategories.rows}">
    <li>
    <a href="category?${subcategory.id}"><span>${subcateg ory.name}
    </span<</a>
    </li>
    </c:forEach>
    </ul>
    </li>
    </c:forEach>
    </cssleftNav
    Please Help, i have been at this for a while now
Working...
X