You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/03/17 07:43:27 UTC

svn commit: r1082411 - /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java

Author: lofwyr
Date: Thu Mar 17 06:43:26 2011
New Revision: 1082411

URL: http://svn.apache.org/viewvc?rev=1082411&view=rev
Log:
cleanup

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java?rev=1082411&r1=1082410&r2=1082411&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java Thu Mar 17 06:43:26 2011
@@ -190,52 +190,16 @@ public class Navigation {
     public Node(String path) {
 
       outcome = path;
-//      final Pattern pattern = Pattern.compile("(\\d\\d-\\d\\d)-(.*)\\.(xhtml)");
       final Pattern pattern = Pattern.compile("([\\d\\d|]*\\d\\d)-(.*)\\.(xhtml)");
       final Matcher matcher = pattern.matcher(path);
       matcher.find();
       branch = matcher.group(1);
       name = matcher.group(2);
       String extension = matcher.group(3);
-
-/*
-      final StringTokenizer tokenizer = new StringTokenizer(path, "-.", true);
-      final StringBuilder branchBuilder = new StringBuilder();
-      while (tokenizer.hasMoreElements()) {
-        String next = tokenizer.nextToken();
-        if (next.matches("\\d\\d") || next.matches("-")) {
-          branchBuilder.append(next);
-        } else {
-          break;
-        }
-      }
-      if (branchBuilder.length() < 2) {
-        throw new ParseException(path, 0);
+      title = ResourceManagerUtils.getProperty(FacesContext.getCurrentInstance(), "overview", name);
+      if (title == null) {
+        title = name;
       }
-      branch = branchBuilder.toString();
-
-      final StringBuilder nameBuilder = new StringBuilder();
-      while (tokenizer.hasMoreElements()) {
-        String next = tokenizer.nextToken();
-        nameBuilder.append(next);
-      }
-      name = nameBuilder.toString();
-*/
-
-/*
-      path.matches("")
-      this.title = ResourceManagerUtils.getProperty(FacesContext.getCurrentInstance(), "overview", key);
-      this.id = key;
-      this.outcome = outcome;
-*/
-      this.title = ResourceManagerUtils.getProperty(FacesContext.getCurrentInstance(), "overview", name);
-
-    }
-
-    public Node(String key, String outcome) {
-      this.title = ResourceManagerUtils.getProperty(FacesContext.getCurrentInstance(), "overview", key);
-      this.id = key;
-      this.outcome = outcome;
     }
 
     public int compareTo(Object o) {