You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by bu...@apache.org on 2014/02/05 09:59:14 UTC

svn commit: r896490 - in /websites/staging/struts/trunk/content: ./ coding-standards.html

Author: buildbot
Date: Wed Feb  5 08:59:14 2014
New Revision: 896490

Log:
Staging update by buildbot for struts

Modified:
    websites/staging/struts/trunk/content/   (props changed)
    websites/staging/struts/trunk/content/coding-standards.html

Propchange: websites/staging/struts/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Feb  5 08:59:14 2014
@@ -1 +1 @@
-1564679
+1564681

Modified: websites/staging/struts/trunk/content/coding-standards.html
==============================================================================
--- websites/staging/struts/trunk/content/coding-standards.html (original)
+++ websites/staging/struts/trunk/content/coding-standards.html Wed Feb  5 08:59:14 2014
@@ -206,9 +206,18 @@ start("input", a);
 end("input");
 </pre></div><p>Some suggestions how to improve the code:</p>
 <ul>
-  <li><p>use static imports</p><p>a.add(type, hidden)  .add(id, _<i>multiselect</i> + defaultString(escapeHtml4(id)));</p></li>
-  <li><p>use dedicated method</p><p>a.add(type, hidden)  .add(id, _<i>multiselect</i> + safeId(id));</p></li>
-  <li><p>use builder</p><p>a.add(type, hidden)  .add(id, HtmlID.with(_<i>multiselect</i>).withSafeId(id).create());</p></li>
+  <li><p>use static imports</p>
+  <div class="source"><pre class="prettyprint">a.add(&quot;type&quot;, &quot;hidden&quot;)
+ .add(&quot;id&quot;, &quot;__multiselect_&quot; + defaultString(escapeHtml4(id)));
+</pre></div></li>
+  <li><p>use dedicated method</p>
+  <div class="source"><pre class="prettyprint">a.add(&quot;type&quot;, &quot;hidden&quot;)
+ .add(&quot;id&quot;, &quot;__multiselect_&quot; + safeId(id));
+</pre></div></li>
+  <li><p>use builder</p>
+  <div class="source"><pre class="prettyprint">a.add(&quot;type&quot;, &quot;hidden&quot;)
+ .add(&quot;id&quot;, HtmlID.with(&quot;__multiselect_&quot;).withSafeId(id).create());
+</pre></div></li>
 </ul><p>As you can see, reformatting a code is just the beginning, you shouldnt stop there and think *how can I improve readability* and follow that path to the end.</p></div>
                   </div>
           </div>