Author: dolander
Date: Thu Dec  2 19:57:58 2004
New Revision: 109624

URL: http://svn.apache.org/viewcvs?view=rev&rev=109624
Log:
Cleanup of the createName() method.



Modified:
   
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java

Modified: 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java?view=diff&rev=109624&p1=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java&r1=109623&p2=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java&r2=109624
==============================================================================
--- 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java
       (original)
+++ 
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/HtmlDataSourceTag.java
       Thu Dec  2 19:57:58 2004
@@ -135,40 +135,27 @@
         String datasource = "{" + _dataSource + "}";
         String expr = applyNamingChain(datasource);
 
-        // The default name is the expression
-        String retName = expr;
-
         // figure out how the id is being written out
         IHtmlIdWriter idWriter = getNearestIdWriter();
         if (idWriter != null) {
             String id = getTagId();
-            if (id == null) {
-                id = idWriter.getNextId();
-            }
-            retName = idWriter.writeId(id, expr);
-            if (hiddenSuffix != null)
-                idWriter.writeId(id + hiddenSuffix, expr);
-        }
+            if (id != null) {
 
-        if (state.id == null) {
-            state.name = retName;
-            return;
+                // form keeps track of this so that it can add this control to 
it's focus map
+                Form parentForm = getNearestForm();
+                if (parentForm != null)
+                    parentForm.addTagID(state.id, expr);
+
+                state.id = rewriteName(id);
+
+                String idScript = addTagIdMapping(state.id, expr);
+                if (idScript != null)
+                    javaScript.setRef(idScript);
+            }
+            state.id = null;
         }
 
-        if (retName == null)
-            retName = rewriteName(state.id);
-
-        String idScript = addTagIdMapping(state.id, retName);
-
-        // form keeps track of this so that it can add this control to it's 
focus map
-        Form parentForm = getNearestForm();
-        if (parentForm != null)
-            parentForm.addTagID(state.id, retName);
-
-        if (idScript != null)
-            javaScript.setRef(idScript);
-        state.name = retName;
-        state.id = null;
+        state.name = expr;
     }
 
     /**

Reply via email to