incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benj Fayle" <bfa...@maketechnologies.com>
Subject RE: menuTabs and MenuModel
Date Wed, 17 May 2006 00:14:30 GMT
I used something like the code shown below. If you changed the
setRowfocus method to use a regular expression you may get the effect
you want.

/**
 * @author bfayle
 *
 */
public class ExplorerTabPanelBean {
	private List treeModelData;
	private TabMenuModel menuModel;
	
	public TabMenuModel getMenuModel() {
		return menuModel;
	}

	public void setMenuModel(TabMenuModel menuModel) {
		this.menuModel = menuModel;
	}

	public void setTreeModelData(List treeModelData) throws
IntrospectionException {
		this.treeModelData = treeModelData;
	    menuModel = new TabMenuModel(treeModelData);
	}
	
	public class TabMenuModel extends BaseMenuModel {
		Object focusRowKey;
		public TabMenuModel(Object arg0) {
			super(arg0);
		}
		
		public void setRowFocus(TabNodeImpl currentTab) {
			int index = treeModelData.indexOf(currentTab);
			setRowIndex(index);
			focusRowKey = getRowKey();
		}

		@Override
		public Object getFocusRowKey() {
			return focusRowKey;
		}
		
	}
	
}

-----Original Message-----
From: Thomas Spiegl [mailto:thomas.spiegl@gmail.com] 
Sent: Friday, May 12, 2006 2:30 AM
To: adffaces-user@incubator.apache.org
Subject: menuTabs and MenuModel

I'm using the menuTabs component and I want to set the focus path for
the MenuModel by using a regular expression. Is there a way to achieve
this?

Thomas

Mime
View raw message