|
Matt, I try to use the simple drop down menu. It works fine with frames too. But there is one problem: the 'null' behind every unexpanded or leave menu item. (This is visible on your exemples too!) The generated code looks like this: <table width="150px" cellpadding=1 cellspacing=1> <tr align=left> <td nowrap class=normal> <b><label style="cursor:hand;font-family:verdana;font-size:10px" > <img id="WNT_img" src="" style="border-style:none"/> Windows NT </label> <div id="WNT" style="display:none"> <table cellpadding=0 cellspacing=0> <tr> <td> <b> <a href="" target="_self" title="Test Menu 1.1" style="text-decoration:none;font-family:Helvetica,Arial;font-size:10px"> Test Menu 1.1</a> </td> </tr> </table> </div>null <-------- where does this come from????? </td> </tr> </table> I did some research in the sources and found the following: In net.sf.navigator.displayer is a file called DisplayerStrings.properties. There you can find the following two lines: dd.menu.item.bottom=</table></div> dd.menu.item.row.start=<tr><td><b> In the source code I saw, that you read this property in net.sf.navigator.displayer.DropDownDisplayer.java. It is the last statement of the method displayComponents(..) [line 149] The method displayComponents() is called in several of your displayers. I just looked at the DropDownMenuDisplayer and found to places where it is called: if (components[i].getMenuComponents().length > 0) { if (this.isAllowed(components[i])) { sb.append(displayStrings.getMessage("dd.menu.expander", components[i].getName(), components[i].getName() + "_img", displayStrings.getMessage("dd.image.expander", components[i].getName() + "_img", displayStrings.getMessage("dd.image.src.expand")) + NBSP + img + title)); displayComponents(components[i], sb); sb.append(displayStrings.getMessage("dd.menu.restore", components[i].getName(), components[i].getName() + "_img")); } else { sb.append(displayStrings.getMessage("dd.menu.restricted", components[i].getName(), components[i].getName() + "_img", displayStrings.getMessage("dd.image.expander", components[i].getName() + "_img", displayStrings.getMessage("dd.image.src.expand")) + NBSP + img + title)); } The red marked code might be a problem if the key dd.menu.restore is not found. The struts documentation does not say what is returned, if a message is not found. Could you please have a look at this and see, if this is the real problem? Maybe the problem is solved if I simply define the property dd.menu.restore but I have no idea what the value of this property should be. Many thanks for your help. Tom |
- RE: [struts-menu] Problem with DropDownMenuDisplayer Thomas Bednarz
