How can I set the target attribute of NavigationMenuItem? I use the
setTarget(String) method ,but seem's not work ;
I want to show the menu action in the iframe, But the open a new
window now, What's wrong with my code ?
below is my code ;
My NavigationMenuItem.java
public List getPanelNavigationItems() {
List menu = new ArrayList();
// Customer
NavigationMenuItem customer = new
NavigationMenuItem("#{messages['customer']}", null);
menu.add(customer);
customer.add(getNavigationMenuItem("#{messages['submenu_dgslfx']}",
"http://www.apache.com"));
customer.add(getNavigationMenuItem("#{messages['submenu_khpm']}",
"http://www.apache.com"));
return menu;
}
private NavigationMenuItem getNavigationMenuItem(String label,String action){
NavigationMenuItem item = new
NavigationMenuItem(null,label,"",false,true,action,"",false,"reportframe");
return item;
}
my jsf file
<f:view>
<f:loadBundle
basename="com.asiacom.util.messages"
var="messages" />
<t:jscookMenu id="menu2" layout="hbr"
theme="ThemeOffice" styleLocation="css/jscookmenu">
<t:navigationMenuItems id="navitems"
value="#{navigationMenu.panelNavigationItems}" />
</t:jscookMenu>
</f:view>
<iframe id="reportframe" name="reportframe" FRAMEBORDER="0"
src="" height="1000" scrolling="no" width="100%"> </iframe>
Thanks