• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what's wrong with this simple code

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see anything displayed on jsp with below simple code in my struts action class.

MenuComponent mc = new MenuComponent();
mc.setName("Menu 1");
mc.setLocation("Menu 1");
mc.setTitle("Menu 1");

MenuComponent mc2 = new MenuComponent();
mc2.setName("Menu 2");
mc2.setLocation("Menu 2");
mc2.setTitle("Menu 3");

mc2.setParent(mc);

repository.addMenu(mc);

session.setAttribute("changeMgmtRepository", repository);

///jsp
all required tag libs, imports in jsp and below code.

<body>
<div class="dynamicMenu tree">
<menu:useMenuDisplayer name="ListMenu" repository="changeMgmtRepository">

<c:forEach var="menu" items="${repository.topMenus}">
<menu-el isplayMenu name="${menu.name}"/>
</c:forEach>

</menu:useMenuDisplayer>

</div>
</body>
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"menu" is a custom taglib and not Struts. This is not really a Struts question and I don't think anyone could figure this out without seeing all of the custom taglib's code, which would be way too much code to post in a forum anyway.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This wasn't outside struts question. Code I posted was struts-menu related project, if you know about it. Anyways, I have figure out the error and now my code is working just fine.
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic