Update of
/var/cvs/contributions/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/navigation
In directory
james.mmbase.org:/tmp/cvs-serv5957/cmsc/sitemanagement/src/java/com/finalist/cmsc/navigation
Modified Files:
NavigationRenderer.java
Log Message:
CMSC-800 solved, the stacking of aliassen
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/navigation
See also: http://www.mmbase.org/jira/browse/CMSC-800
Index: NavigationRenderer.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/navigation/NavigationRenderer.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- NavigationRenderer.java 18 Jan 2008 20:13:01 -0000 1.25
+++ NavigationRenderer.java 17 Mar 2008 13:00:15 -0000 1.26
@@ -64,9 +64,12 @@
public String getIcon(Object node, UserRole role) {
Node n = (Node) node;
- return "type/" + n.getNodeManager().getName() +
"_"+role.getRole().getName()+".png";
+ return getIcon(n.getNodeManager().getName(), role);
}
+ public String getIcon(String name, UserRole role) {
+ return "type/" + name + "_"+role.getRole().getName()+".png";
+ }
public String getOpenAction(Node parentNode, boolean secure) {
String contextPath = request.getContextPath();
@@ -75,8 +78,7 @@
}
public TreeOption createTreeOption(String icon, String message, String
resourcebundle, String action) {
- Locale locale = JstlUtil.getLocale(request);
- String label = JstlUtil.getMessage(resourcebundle, locale, message);
+ String label = getLabel(message, resourcebundle);
if (!action.startsWith("javascript:")) {
action = getUrl(action);
}
@@ -84,6 +86,12 @@
}
+ public String getLabel(String message, String resourcebundle) {
+ Locale locale = JstlUtil.getLocale(request);
+ String label = JstlUtil.getMessage(resourcebundle, locale, message);
+ return label;
+ }
+
public TreeOption createTreeOption(String icon, String message, String
action) {
String label = JstlUtil.getMessage(request, message);
if (!action.startsWith("javascript:")) {
@@ -99,7 +107,7 @@
public abstract TreeOption createOption(String icon, String label, String
action, String target);
- protected abstract TreeElement createElement(String icon, String id,
String name, String fragment, String action, String target);
+ public abstract TreeElement createElement(String icon, String id, String
name, String fragment, String action, String target);
public boolean showChildren(Object node) {
Node parentNode = (Node) node;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs