|
Hi ! Thanks for
helping me , the menu is created from database and the output tree looks
like this var c_1 = new
WebFXTree('File Library');
var c_2 = new
WebFXTreeItem('Trash','_javascript_:processSearch(2);','','Images/folderTree/trash.gif','Images/folderTree/trash.gif','rightFrame');
c_1.add(c_2);
var c_3 = new
WebFXTreeItem('Company,'_javascript_:processSearch(3);','','','','rightFrame');
c_1.add(c_3);
var c_9 = new WebFXTreeItem('Saatchi &
Saatchi','_javascript_:processSearch(9);','','','','rightFrame');
c_3.add(c_9);
var c_20 = new WebFXTreeItem('Saatchi &
Saatchi','_javascript_:processSearch(20);','','','','rightFrame');
c_9.add(c_20);
var c_11 = new
WebFXTreeItem('Visa','_javascript_:processSearch(11);','','','','rightFrame');
c_20.add(c_11);
var c_12 = new
WebFXTreeItem('Documents','_javascript_:processSearch(12);','','','','rightFrame');
c_11.add(c_12);
var c_13 = new
WebFXTreeItem('Images','_javascript_:processSearch(13);','','','','rightFrame');
c_11.add(c_13);
var c_14 = new
WebFXTreeItem('Logotypes','_javascript_:processSearch(14);','','','','rightFrame');
c_11.add(c_14);
var c_15 = new WebFXTreeItem('In
Progress','_javascript_:processSearch(15);','','','','rightFrame');
c_11.add(c_15);
var c_213 = new
WebFXTreeItem('TestReplace','_javascript_:processSearch(213);',’’ ,'','','rightFrame');
c_3.add(c_213); document.write(c_1);
The
CustomePermissionsAdapter only fire the isAllowed only for c_1 c_2 c_3 I need to filter the
folders ex: c_11 Please , any clue ? Best Regrds From: Pablo Rito Hi I have problems with the Permission
filter , I have used public class
CustomePermissionsAdapter implements PermissionsAdapter { private ArrayList
menuNames; public
CustomePermissionsAdapter(String theMenuNames[]) {
menuNames = new ArrayList();
if(theMenuNames != null) {
for(int i = 0; i < theMenuNames.length; i++)
{
menuNames.add(theMenuNames[i]);
} } } public boolean
isAllowed(MenuComponent menu) {
return !menuNames.contains(menu.getName()); } } And in if (menus != null)
{
for (int i = 0; i < menus.length; i++)
System.out.println("Dont show this [" + i + "]" +
menus[i]);
}
PermissionsAdapter permissions = new CustomePermissionsAdapter(menus);
request.setAttribute("permissionAdapter", permissions); But in the isAllowed method only 2 menus
are fired up the 2 first , the menu looks like this File è
A Ø
B Ø
C Ø
D Only File and A are fired in isAllowd
method so I can’t filter B,C or D Best Regrds |
- [struts-menu] FW: Permission Pablo Rito
- Re: [struts-menu] FW: Permission Matt Raible
- [struts-menu] Sub menu problem Shyam
- Re: [struts-menu] Sub menu problem Matt Raible
