public interface MenuItemDecorator
| Modifier and Type | Method and Description | 
|---|---|
DTOMenuItem | 
processMenuItem(DTOMenuItem menuItem,
Implement this method to provide your own dynamic logic and decorate the passed MenuItem. 
 | 
 public DTOMenuItem processMenuItem(DTOMenuItem menuItem, MenuProcessingContext ctx) {
   DTOMenuItem mItem =ctx.proceedDecoratorChain(menuItem); //proceed parent in decorator chain
   if(mItem.getMainEntity().isActive()){  //make your logic
     mItem.setIcon("active.gif");
   }
   return mItem; 
 }
 menuItem - The menu item that should be decorated.ctx - The processing context informations, like Locale, DecoratorChain, etc.