Spelling+comments
Change-Id: I51065466031338b116ab185722915bae1c45c5cc
This commit is contained in:
parent
532b93f008
commit
8506215602
@ -56,7 +56,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
protected void populateItem( ListItem<MenuItem> item ) {
|
||||
final MenuItem mi = item.getModelObject();
|
||||
boolean highLightAsCurrentByInterface = false;
|
||||
Class<?> menuItemInterface = mi.getMenuHilightInterface();
|
||||
Class<?> menuItemInterface = mi.getMenuHighlightInterface();
|
||||
if( menuItemInterface != null ){
|
||||
for( Class<?> actualPageInterface : containerClass.getInterfaces() ){
|
||||
if( actualPageInterface.equals(menuItemInterface) ){
|
||||
@ -72,7 +72,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
&&
|
||||
mi.getTargetClass().getSuperclass() != menuContainerCommonSuperClass
|
||||
)
|
||||
){
|
||||
){
|
||||
//item.setMarkupId("current");
|
||||
//item.setOutputMarkupId(true);
|
||||
//Replaced the above because it generates invalid markup if two menus are added to the same page (id no longer unique)
|
||||
@ -99,7 +99,8 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
}
|
||||
/**
|
||||
* May not rely on anything in the implementing class's constructor as this will not have been initialized yet.
|
||||
* Items are rendered from left to right as you might expect, first item in the list will be first tab item on the left.
|
||||
* Items are rendered from left to right (or top to bottom depending on type of menu) as you might expect,
|
||||
* the first item in the list will be the first menu item on the left/top.
|
||||
* @return
|
||||
*/
|
||||
protected abstract List<MenuItem> getItemList();
|
||||
@ -118,7 +119,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
private Class<? extends Page> targetClass;
|
||||
private PageParameters pp;
|
||||
private String iconName;
|
||||
private Class<? extends MenuHighlight> menuHilightInterface;
|
||||
private Class<? extends MenuHighlight> menuHighlightInterface;
|
||||
|
||||
public MenuItem(final String name, final Class<? extends Page> targetClass) {
|
||||
this(name, targetClass, null, null, null);
|
||||
@ -148,7 +149,7 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
public MenuItem(final String name, final Class<? extends Page> targetClass, final Class<? extends MenuHighlight> menuHilightInterface, PageParameters pp, String iconName) {
|
||||
this.name = name;
|
||||
this.targetClass = targetClass;
|
||||
this.menuHilightInterface = menuHilightInterface;
|
||||
this.menuHighlightInterface = menuHilightInterface;
|
||||
this.pp = pp;
|
||||
this.iconName = iconName == null ? ImageIcon.ICON_EMPTY : iconName;
|
||||
}
|
||||
@ -169,13 +170,13 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
return iconName;
|
||||
}
|
||||
|
||||
public MenuItem setMenuHilightInterface(Class<? extends MenuHighlight> menuHilightInterface) {
|
||||
this.menuHilightInterface = menuHilightInterface;
|
||||
public MenuItem setMenuHighlightInterface(Class<? extends MenuHighlight> menuHighlightInterface) {
|
||||
this.menuHighlightInterface = menuHighlightInterface;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Class<? extends MenuHighlight> getMenuHilightInterface() {
|
||||
return menuHilightInterface;
|
||||
public Class<? extends MenuHighlight> getMenuHighlightInterface() {
|
||||
return menuHighlightInterface;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user