juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [16/51] [partial] incubator-juneau-website git commit: Update Javadocs.
Date Sun, 25 Jun 2017 14:43:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/5f11cb85/content/site/apidocs/src-html/org/apache/juneau/html/HtmlSerializer.SqReadable.html
----------------------------------------------------------------------
diff --git a/content/site/apidocs/src-html/org/apache/juneau/html/HtmlSerializer.SqReadable.html b/content/site/apidocs/src-html/org/apache/juneau/html/HtmlSerializer.SqReadable.html
index 7c8c3b3..2ce64c1 100644
--- a/content/site/apidocs/src-html/org/apache/juneau/html/HtmlSerializer.SqReadable.html
+++ b/content/site/apidocs/src-html/org/apache/juneau/html/HtmlSerializer.SqReadable.html
@@ -281,505 +281,510 @@
 <span class="sourceLineNo">273</span>         }<a name="line.273"></a>
 <span class="sourceLineNo">274</span><a name="line.274"></a>
 <span class="sourceLineNo">275</span>         HtmlClassMeta html = sType.getExtendedMeta(HtmlClassMeta.class);<a name="line.275"></a>
-<span class="sourceLineNo">276</span>         HtmlRender render = html.getRender();<a name="line.276"></a>
-<span class="sourceLineNo">277</span><a name="line.277"></a>
-<span class="sourceLineNo">278</span>         if (o != null &amp;&amp; render != null)<a name="line.278"></a>
-<span class="sourceLineNo">279</span>            return serializeAnything(session, out, render.getContent(session, o), null, typeName, 2, pMeta, false);<a name="line.279"></a>
-<span class="sourceLineNo">280</span><a name="line.280"></a>
-<span class="sourceLineNo">281</span>         if (html.isAsXml() || (pMeta != null &amp;&amp; pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isAsXml())) {<a name="line.281"></a>
-<span class="sourceLineNo">282</span>            super.serializeAnything(session, out, o, null, null, null, false, XmlFormat.MIXED, false, false, null);<a name="line.282"></a>
-<span class="sourceLineNo">283</span><a name="line.283"></a>
-<span class="sourceLineNo">284</span>         } else if (html.isAsPlainText() || (pMeta != null &amp;&amp; pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isAsPlainText())) {<a name="line.284"></a>
-<span class="sourceLineNo">285</span>            out.write(o == null ? "null" : o.toString());<a name="line.285"></a>
-<span class="sourceLineNo">286</span>            cr = CR_SIMPLE;<a name="line.286"></a>
-<span class="sourceLineNo">287</span><a name="line.287"></a>
-<span class="sourceLineNo">288</span>         } else if (o == null || (sType.isChar() &amp;&amp; ((Character)o).charValue() == 0)) {<a name="line.288"></a>
-<span class="sourceLineNo">289</span>            out.tag("null");<a name="line.289"></a>
-<span class="sourceLineNo">290</span>            cr = CR_SIMPLE;<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span>         } else if (sType.isNumber()) {<a name="line.292"></a>
-<span class="sourceLineNo">293</span>            if (eType.isNumber() &amp;&amp; ! isRoot)<a name="line.293"></a>
-<span class="sourceLineNo">294</span>               out.append(o);<a name="line.294"></a>
-<span class="sourceLineNo">295</span>            else<a name="line.295"></a>
-<span class="sourceLineNo">296</span>               out.sTag("number").append(o).eTag("number");<a name="line.296"></a>
-<span class="sourceLineNo">297</span>            cr = CR_SIMPLE;<a name="line.297"></a>
-<span class="sourceLineNo">298</span><a name="line.298"></a>
-<span class="sourceLineNo">299</span>         } else if (sType.isBoolean()) {<a name="line.299"></a>
-<span class="sourceLineNo">300</span>            if (eType.isBoolean() &amp;&amp; ! isRoot)<a name="line.300"></a>
-<span class="sourceLineNo">301</span>               out.append(o);<a name="line.301"></a>
-<span class="sourceLineNo">302</span>            else<a name="line.302"></a>
-<span class="sourceLineNo">303</span>               out.sTag("boolean").append(o).eTag("boolean");<a name="line.303"></a>
-<span class="sourceLineNo">304</span>            cr = CR_SIMPLE;<a name="line.304"></a>
-<span class="sourceLineNo">305</span><a name="line.305"></a>
-<span class="sourceLineNo">306</span>         } else if (sType.isMap() || (wType != null &amp;&amp; wType.isMap())) {<a name="line.306"></a>
-<span class="sourceLineNo">307</span>            out.nlIf(! isRoot, indent+1);<a name="line.307"></a>
-<span class="sourceLineNo">308</span>            if (o instanceof BeanMap)<a name="line.308"></a>
-<span class="sourceLineNo">309</span>               serializeBeanMap(session, out, (BeanMap)o, eType, pMeta);<a name="line.309"></a>
-<span class="sourceLineNo">310</span>            else<a name="line.310"></a>
-<span class="sourceLineNo">311</span>               serializeMap(session, out, (Map)o, sType, eType.getKeyType(), eType.getValueType(), typeName, pMeta);<a name="line.311"></a>
-<span class="sourceLineNo">312</span><a name="line.312"></a>
-<span class="sourceLineNo">313</span>         } else if (sType.isBean()) {<a name="line.313"></a>
-<span class="sourceLineNo">314</span>            BeanMap m = session.toBeanMap(o);<a name="line.314"></a>
-<span class="sourceLineNo">315</span>            Class&lt;?&gt; c = o.getClass();<a name="line.315"></a>
-<span class="sourceLineNo">316</span>            if (c.isAnnotationPresent(HtmlLink.class)) {<a name="line.316"></a>
-<span class="sourceLineNo">317</span>               HtmlLink h = o.getClass().getAnnotation(HtmlLink.class);<a name="line.317"></a>
-<span class="sourceLineNo">318</span>               Object urlProp = m.get(h.hrefProperty());<a name="line.318"></a>
-<span class="sourceLineNo">319</span>               Object nameProp = m.get(h.nameProperty());<a name="line.319"></a>
-<span class="sourceLineNo">320</span>               out.oTag("a").attrUri("href", urlProp).append('&gt;').text(nameProp).eTag("a");<a name="line.320"></a>
-<span class="sourceLineNo">321</span>               cr = CR_SIMPLE;<a name="line.321"></a>
-<span class="sourceLineNo">322</span>            } else {<a name="line.322"></a>
-<span class="sourceLineNo">323</span>               out.nlIf(! isRoot, indent+2);<a name="line.323"></a>
-<span class="sourceLineNo">324</span>               serializeBeanMap(session, out, m, eType, pMeta);<a name="line.324"></a>
-<span class="sourceLineNo">325</span>            }<a name="line.325"></a>
-<span class="sourceLineNo">326</span><a name="line.326"></a>
-<span class="sourceLineNo">327</span>         } else if (sType.isCollection() || sType.isArray() || (wType != null &amp;&amp; wType.isCollection())) {<a name="line.327"></a>
-<span class="sourceLineNo">328</span>            out.nlIf(! isRoot, indent+1);<a name="line.328"></a>
-<span class="sourceLineNo">329</span>            serializeCollection(session, out, o, sType, eType, name, pMeta);<a name="line.329"></a>
-<span class="sourceLineNo">330</span><a name="line.330"></a>
-<span class="sourceLineNo">331</span>         } else if (session.isUri(sType, pMeta, o)) {<a name="line.331"></a>
-<span class="sourceLineNo">332</span>            String label = session.getAnchorText(pMeta, o);<a name="line.332"></a>
-<span class="sourceLineNo">333</span>            out.oTag("a").attrUri("href", o).append('&gt;');<a name="line.333"></a>
-<span class="sourceLineNo">334</span>            out.text(label);<a name="line.334"></a>
-<span class="sourceLineNo">335</span>            out.eTag("a");<a name="line.335"></a>
-<span class="sourceLineNo">336</span>            cr = CR_SIMPLE;<a name="line.336"></a>
-<span class="sourceLineNo">337</span><a name="line.337"></a>
-<span class="sourceLineNo">338</span>         } else {<a name="line.338"></a>
-<span class="sourceLineNo">339</span>            if (isRoot)<a name="line.339"></a>
-<span class="sourceLineNo">340</span>               out.sTag("string").text(session.toString(o)).eTag("string");<a name="line.340"></a>
-<span class="sourceLineNo">341</span>            else<a name="line.341"></a>
-<span class="sourceLineNo">342</span>               out.text(session.toString(o));<a name="line.342"></a>
-<span class="sourceLineNo">343</span>            cr = CR_SIMPLE;<a name="line.343"></a>
-<span class="sourceLineNo">344</span>         }<a name="line.344"></a>
-<span class="sourceLineNo">345</span>      }<a name="line.345"></a>
-<span class="sourceLineNo">346</span>      session.pop();<a name="line.346"></a>
-<span class="sourceLineNo">347</span>      session.indent -= indent;<a name="line.347"></a>
-<span class="sourceLineNo">348</span>      return cr;<a name="line.348"></a>
-<span class="sourceLineNo">349</span>   }<a name="line.349"></a>
-<span class="sourceLineNo">350</span><a name="line.350"></a>
-<span class="sourceLineNo">351</span>   /**<a name="line.351"></a>
-<span class="sourceLineNo">352</span>    * Identifies what the contents were of a serialized bean.<a name="line.352"></a>
-<span class="sourceLineNo">353</span>    */<a name="line.353"></a>
-<span class="sourceLineNo">354</span>   static enum ContentResult {<a name="line.354"></a>
-<span class="sourceLineNo">355</span>      CR_SIMPLE,    // Simple content.  Shouldn't use whitespace.<a name="line.355"></a>
-<span class="sourceLineNo">356</span>      CR_NORMAL     // Normal content.  Use whitespace.<a name="line.356"></a>
-<span class="sourceLineNo">357</span>   }<a name="line.357"></a>
-<span class="sourceLineNo">358</span><a name="line.358"></a>
-<span class="sourceLineNo">359</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.359"></a>
-<span class="sourceLineNo">360</span>   private void serializeMap(HtmlSerializerSession session, HtmlWriter out, Map m, ClassMeta&lt;?&gt; sType, ClassMeta&lt;?&gt; eKeyType, ClassMeta&lt;?&gt; eValueType, String typeName, BeanPropertyMeta ppMeta) throws Exception {<a name="line.360"></a>
-<span class="sourceLineNo">361</span><a name="line.361"></a>
-<span class="sourceLineNo">362</span>      ClassMeta&lt;?&gt; keyType = eKeyType == null ? session.string() : eKeyType;<a name="line.362"></a>
-<span class="sourceLineNo">363</span>      ClassMeta&lt;?&gt; valueType = eValueType == null ? session.object() : eValueType;<a name="line.363"></a>
-<span class="sourceLineNo">364</span>      ClassMeta&lt;?&gt; aType = session.getClassMetaForObject(m);       // The actual type<a name="line.364"></a>
-<span class="sourceLineNo">365</span><a name="line.365"></a>
-<span class="sourceLineNo">366</span>      int i = session.getIndent();<a name="line.366"></a>
-<span class="sourceLineNo">367</span><a name="line.367"></a>
-<span class="sourceLineNo">368</span>      out.oTag(i, "table");<a name="line.368"></a>
-<span class="sourceLineNo">369</span><a name="line.369"></a>
-<span class="sourceLineNo">370</span>      if (typeName != null &amp;&amp; ppMeta != null &amp;&amp; ppMeta.getClassMeta() != aType)<a name="line.370"></a>
-<span class="sourceLineNo">371</span>         out.attr(session.getBeanTypePropertyName(sType), typeName);<a name="line.371"></a>
+<span class="sourceLineNo">276</span>         HtmlRender render = (pMeta == null ? null : pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).getRender());<a name="line.276"></a>
+<span class="sourceLineNo">277</span>         if (render == null)<a name="line.277"></a>
+<span class="sourceLineNo">278</span>            render = html.getRender();<a name="line.278"></a>
+<span class="sourceLineNo">279</span><a name="line.279"></a>
+<span class="sourceLineNo">280</span>         if (render != null) {<a name="line.280"></a>
+<span class="sourceLineNo">281</span>            Object o2 = render.getContent(session, o);<a name="line.281"></a>
+<span class="sourceLineNo">282</span>            if (o2 != o)<a name="line.282"></a>
+<span class="sourceLineNo">283</span>               return serializeAnything(session, out, o2, null, typeName, 2, null, false);<a name="line.283"></a>
+<span class="sourceLineNo">284</span>         }<a name="line.284"></a>
+<span class="sourceLineNo">285</span><a name="line.285"></a>
+<span class="sourceLineNo">286</span>         if (html.isAsXml() || (pMeta != null &amp;&amp; pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isAsXml())) {<a name="line.286"></a>
+<span class="sourceLineNo">287</span>            super.serializeAnything(session, out, o, null, null, null, false, XmlFormat.MIXED, false, false, null);<a name="line.287"></a>
+<span class="sourceLineNo">288</span><a name="line.288"></a>
+<span class="sourceLineNo">289</span>         } else if (html.isAsPlainText() || (pMeta != null &amp;&amp; pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isAsPlainText())) {<a name="line.289"></a>
+<span class="sourceLineNo">290</span>            out.write(o == null ? "null" : o.toString());<a name="line.290"></a>
+<span class="sourceLineNo">291</span>            cr = CR_SIMPLE;<a name="line.291"></a>
+<span class="sourceLineNo">292</span><a name="line.292"></a>
+<span class="sourceLineNo">293</span>         } else if (o == null || (sType.isChar() &amp;&amp; ((Character)o).charValue() == 0)) {<a name="line.293"></a>
+<span class="sourceLineNo">294</span>            out.tag("null");<a name="line.294"></a>
+<span class="sourceLineNo">295</span>            cr = CR_SIMPLE;<a name="line.295"></a>
+<span class="sourceLineNo">296</span><a name="line.296"></a>
+<span class="sourceLineNo">297</span>         } else if (sType.isNumber()) {<a name="line.297"></a>
+<span class="sourceLineNo">298</span>            if (eType.isNumber() &amp;&amp; ! isRoot)<a name="line.298"></a>
+<span class="sourceLineNo">299</span>               out.append(o);<a name="line.299"></a>
+<span class="sourceLineNo">300</span>            else<a name="line.300"></a>
+<span class="sourceLineNo">301</span>               out.sTag("number").append(o).eTag("number");<a name="line.301"></a>
+<span class="sourceLineNo">302</span>            cr = CR_SIMPLE;<a name="line.302"></a>
+<span class="sourceLineNo">303</span><a name="line.303"></a>
+<span class="sourceLineNo">304</span>         } else if (sType.isBoolean()) {<a name="line.304"></a>
+<span class="sourceLineNo">305</span>            if (eType.isBoolean() &amp;&amp; ! isRoot)<a name="line.305"></a>
+<span class="sourceLineNo">306</span>               out.append(o);<a name="line.306"></a>
+<span class="sourceLineNo">307</span>            else<a name="line.307"></a>
+<span class="sourceLineNo">308</span>               out.sTag("boolean").append(o).eTag("boolean");<a name="line.308"></a>
+<span class="sourceLineNo">309</span>            cr = CR_SIMPLE;<a name="line.309"></a>
+<span class="sourceLineNo">310</span><a name="line.310"></a>
+<span class="sourceLineNo">311</span>         } else if (sType.isMap() || (wType != null &amp;&amp; wType.isMap())) {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>            out.nlIf(! isRoot, indent+1);<a name="line.312"></a>
+<span class="sourceLineNo">313</span>            if (o instanceof BeanMap)<a name="line.313"></a>
+<span class="sourceLineNo">314</span>               serializeBeanMap(session, out, (BeanMap)o, eType, pMeta);<a name="line.314"></a>
+<span class="sourceLineNo">315</span>            else<a name="line.315"></a>
+<span class="sourceLineNo">316</span>               serializeMap(session, out, (Map)o, sType, eType.getKeyType(), eType.getValueType(), typeName, pMeta);<a name="line.316"></a>
+<span class="sourceLineNo">317</span><a name="line.317"></a>
+<span class="sourceLineNo">318</span>         } else if (sType.isBean()) {<a name="line.318"></a>
+<span class="sourceLineNo">319</span>            BeanMap m = session.toBeanMap(o);<a name="line.319"></a>
+<span class="sourceLineNo">320</span>            Class&lt;?&gt; c = o.getClass();<a name="line.320"></a>
+<span class="sourceLineNo">321</span>            if (c.isAnnotationPresent(HtmlLink.class)) {<a name="line.321"></a>
+<span class="sourceLineNo">322</span>               HtmlLink h = o.getClass().getAnnotation(HtmlLink.class);<a name="line.322"></a>
+<span class="sourceLineNo">323</span>               Object urlProp = m.get(h.hrefProperty());<a name="line.323"></a>
+<span class="sourceLineNo">324</span>               Object nameProp = m.get(h.nameProperty());<a name="line.324"></a>
+<span class="sourceLineNo">325</span>               out.oTag("a").attrUri("href", urlProp).append('&gt;').text(nameProp).eTag("a");<a name="line.325"></a>
+<span class="sourceLineNo">326</span>               cr = CR_SIMPLE;<a name="line.326"></a>
+<span class="sourceLineNo">327</span>            } else {<a name="line.327"></a>
+<span class="sourceLineNo">328</span>               out.nlIf(! isRoot, indent+2);<a name="line.328"></a>
+<span class="sourceLineNo">329</span>               serializeBeanMap(session, out, m, eType, pMeta);<a name="line.329"></a>
+<span class="sourceLineNo">330</span>            }<a name="line.330"></a>
+<span class="sourceLineNo">331</span><a name="line.331"></a>
+<span class="sourceLineNo">332</span>         } else if (sType.isCollection() || sType.isArray() || (wType != null &amp;&amp; wType.isCollection())) {<a name="line.332"></a>
+<span class="sourceLineNo">333</span>            out.nlIf(! isRoot, indent+1);<a name="line.333"></a>
+<span class="sourceLineNo">334</span>            serializeCollection(session, out, o, sType, eType, name, pMeta);<a name="line.334"></a>
+<span class="sourceLineNo">335</span><a name="line.335"></a>
+<span class="sourceLineNo">336</span>         } else if (session.isUri(sType, pMeta, o)) {<a name="line.336"></a>
+<span class="sourceLineNo">337</span>            String label = session.getAnchorText(pMeta, o);<a name="line.337"></a>
+<span class="sourceLineNo">338</span>            out.oTag("a").attrUri("href", o).append('&gt;');<a name="line.338"></a>
+<span class="sourceLineNo">339</span>            out.text(label);<a name="line.339"></a>
+<span class="sourceLineNo">340</span>            out.eTag("a");<a name="line.340"></a>
+<span class="sourceLineNo">341</span>            cr = CR_SIMPLE;<a name="line.341"></a>
+<span class="sourceLineNo">342</span><a name="line.342"></a>
+<span class="sourceLineNo">343</span>         } else {<a name="line.343"></a>
+<span class="sourceLineNo">344</span>            if (isRoot)<a name="line.344"></a>
+<span class="sourceLineNo">345</span>               out.sTag("string").text(session.toString(o)).eTag("string");<a name="line.345"></a>
+<span class="sourceLineNo">346</span>            else<a name="line.346"></a>
+<span class="sourceLineNo">347</span>               out.text(session.toString(o));<a name="line.347"></a>
+<span class="sourceLineNo">348</span>            cr = CR_SIMPLE;<a name="line.348"></a>
+<span class="sourceLineNo">349</span>         }<a name="line.349"></a>
+<span class="sourceLineNo">350</span>      }<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      session.pop();<a name="line.351"></a>
+<span class="sourceLineNo">352</span>      session.indent -= indent;<a name="line.352"></a>
+<span class="sourceLineNo">353</span>      return cr;<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   }<a name="line.354"></a>
+<span class="sourceLineNo">355</span><a name="line.355"></a>
+<span class="sourceLineNo">356</span>   /**<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    * Identifies what the contents were of a serialized bean.<a name="line.357"></a>
+<span class="sourceLineNo">358</span>    */<a name="line.358"></a>
+<span class="sourceLineNo">359</span>   static enum ContentResult {<a name="line.359"></a>
+<span class="sourceLineNo">360</span>      CR_SIMPLE,    // Simple content.  Shouldn't use whitespace.<a name="line.360"></a>
+<span class="sourceLineNo">361</span>      CR_NORMAL     // Normal content.  Use whitespace.<a name="line.361"></a>
+<span class="sourceLineNo">362</span>   }<a name="line.362"></a>
+<span class="sourceLineNo">363</span><a name="line.363"></a>
+<span class="sourceLineNo">364</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.364"></a>
+<span class="sourceLineNo">365</span>   private void serializeMap(HtmlSerializerSession session, HtmlWriter out, Map m, ClassMeta&lt;?&gt; sType, ClassMeta&lt;?&gt; eKeyType, ClassMeta&lt;?&gt; eValueType, String typeName, BeanPropertyMeta ppMeta) throws Exception {<a name="line.365"></a>
+<span class="sourceLineNo">366</span><a name="line.366"></a>
+<span class="sourceLineNo">367</span>      ClassMeta&lt;?&gt; keyType = eKeyType == null ? session.string() : eKeyType;<a name="line.367"></a>
+<span class="sourceLineNo">368</span>      ClassMeta&lt;?&gt; valueType = eValueType == null ? session.object() : eValueType;<a name="line.368"></a>
+<span class="sourceLineNo">369</span>      ClassMeta&lt;?&gt; aType = session.getClassMetaForObject(m);       // The actual type<a name="line.369"></a>
+<span class="sourceLineNo">370</span><a name="line.370"></a>
+<span class="sourceLineNo">371</span>      int i = session.getIndent();<a name="line.371"></a>
 <span class="sourceLineNo">372</span><a name="line.372"></a>
-<span class="sourceLineNo">373</span>      out.append("&gt;").nl(i+1);<a name="line.373"></a>
-<span class="sourceLineNo">374</span>      if (session.isAddKeyValueTableHeaders() &amp;&amp; ! (aType.getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() || (ppMeta != null &amp;&amp; ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) {<a name="line.374"></a>
-<span class="sourceLineNo">375</span>         out.sTag(i+1, "tr").nl(i+2);<a name="line.375"></a>
-<span class="sourceLineNo">376</span>         out.sTag(i+2, "th").append("key").eTag("th").nl(i+3);<a name="line.376"></a>
-<span class="sourceLineNo">377</span>         out.sTag(i+2, "th").append("value").eTag("th").nl(i+3);<a name="line.377"></a>
-<span class="sourceLineNo">378</span>         out.ie(i+1).eTag("tr").nl(i+2);<a name="line.378"></a>
-<span class="sourceLineNo">379</span>      }<a name="line.379"></a>
-<span class="sourceLineNo">380</span>      for (Map.Entry e : (Set&lt;Map.Entry&gt;)m.entrySet()) {<a name="line.380"></a>
-<span class="sourceLineNo">381</span><a name="line.381"></a>
-<span class="sourceLineNo">382</span>         Object key = session.generalize(e.getKey(), keyType);<a name="line.382"></a>
-<span class="sourceLineNo">383</span>         Object value = null;<a name="line.383"></a>
-<span class="sourceLineNo">384</span>         try {<a name="line.384"></a>
-<span class="sourceLineNo">385</span>            value = e.getValue();<a name="line.385"></a>
-<span class="sourceLineNo">386</span>         } catch (StackOverflowError t) {<a name="line.386"></a>
-<span class="sourceLineNo">387</span>            throw t;<a name="line.387"></a>
-<span class="sourceLineNo">388</span>         } catch (Throwable t) {<a name="line.388"></a>
-<span class="sourceLineNo">389</span>            session.onError(t, "Could not call getValue() on property ''{0}'', {1}", e.getKey(), t.getLocalizedMessage());<a name="line.389"></a>
-<span class="sourceLineNo">390</span>         }<a name="line.390"></a>
-<span class="sourceLineNo">391</span><a name="line.391"></a>
-<span class="sourceLineNo">392</span>         String link = getLink(ppMeta);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>         String style = getStyle(session, ppMeta, value);<a name="line.393"></a>
-<span class="sourceLineNo">394</span><a name="line.394"></a>
-<span class="sourceLineNo">395</span>         out.sTag(i+1, "tr").nl(i+2);<a name="line.395"></a>
-<span class="sourceLineNo">396</span>         out.oTag(i+2, "td");<a name="line.396"></a>
-<span class="sourceLineNo">397</span>         if (style != null)<a name="line.397"></a>
-<span class="sourceLineNo">398</span>            out.attr("style", style);<a name="line.398"></a>
-<span class="sourceLineNo">399</span>         out.cTag();<a name="line.399"></a>
-<span class="sourceLineNo">400</span>         if (link != null)<a name="line.400"></a>
-<span class="sourceLineNo">401</span>            out.oTag(i+3, "a").attrUri("href", link.replace("{#}", StringUtils.toString(value))).cTag();<a name="line.401"></a>
-<span class="sourceLineNo">402</span>         ContentResult cr = serializeAnything(session, out, key, keyType, null, 2, null, false);<a name="line.402"></a>
-<span class="sourceLineNo">403</span>         if (link != null)<a name="line.403"></a>
-<span class="sourceLineNo">404</span>            out.eTag("a");<a name="line.404"></a>
-<span class="sourceLineNo">405</span>         if (cr == CR_NORMAL)<a name="line.405"></a>
-<span class="sourceLineNo">406</span>            out.i(i+2);<a name="line.406"></a>
-<span class="sourceLineNo">407</span>         out.eTag("td").nl(i+2);<a name="line.407"></a>
-<span class="sourceLineNo">408</span>         out.sTag(i+2, "td");<a name="line.408"></a>
-<span class="sourceLineNo">409</span>         cr = serializeAnything(session, out, value, valueType, (key == null ? "_x0000_" : session.toString(key)), 2, null, false);<a name="line.409"></a>
+<span class="sourceLineNo">373</span>      out.oTag(i, "table");<a name="line.373"></a>
+<span class="sourceLineNo">374</span><a name="line.374"></a>
+<span class="sourceLineNo">375</span>      if (typeName != null &amp;&amp; ppMeta != null &amp;&amp; ppMeta.getClassMeta() != aType)<a name="line.375"></a>
+<span class="sourceLineNo">376</span>         out.attr(session.getBeanTypePropertyName(sType), typeName);<a name="line.376"></a>
+<span class="sourceLineNo">377</span><a name="line.377"></a>
+<span class="sourceLineNo">378</span>      out.append("&gt;").nl(i+1);<a name="line.378"></a>
+<span class="sourceLineNo">379</span>      if (session.isAddKeyValueTableHeaders() &amp;&amp; ! (aType.getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() || (ppMeta != null &amp;&amp; ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) {<a name="line.379"></a>
+<span class="sourceLineNo">380</span>         out.sTag(i+1, "tr").nl(i+2);<a name="line.380"></a>
+<span class="sourceLineNo">381</span>         out.sTag(i+2, "th").append("key").eTag("th").nl(i+3);<a name="line.381"></a>
+<span class="sourceLineNo">382</span>         out.sTag(i+2, "th").append("value").eTag("th").nl(i+3);<a name="line.382"></a>
+<span class="sourceLineNo">383</span>         out.ie(i+1).eTag("tr").nl(i+2);<a name="line.383"></a>
+<span class="sourceLineNo">384</span>      }<a name="line.384"></a>
+<span class="sourceLineNo">385</span>      for (Map.Entry e : (Set&lt;Map.Entry&gt;)m.entrySet()) {<a name="line.385"></a>
+<span class="sourceLineNo">386</span><a name="line.386"></a>
+<span class="sourceLineNo">387</span>         Object key = session.generalize(e.getKey(), keyType);<a name="line.387"></a>
+<span class="sourceLineNo">388</span>         Object value = null;<a name="line.388"></a>
+<span class="sourceLineNo">389</span>         try {<a name="line.389"></a>
+<span class="sourceLineNo">390</span>            value = e.getValue();<a name="line.390"></a>
+<span class="sourceLineNo">391</span>         } catch (StackOverflowError t) {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>            throw t;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>         } catch (Throwable t) {<a name="line.393"></a>
+<span class="sourceLineNo">394</span>            session.onError(t, "Could not call getValue() on property ''{0}'', {1}", e.getKey(), t.getLocalizedMessage());<a name="line.394"></a>
+<span class="sourceLineNo">395</span>         }<a name="line.395"></a>
+<span class="sourceLineNo">396</span><a name="line.396"></a>
+<span class="sourceLineNo">397</span>         String link = getLink(ppMeta);<a name="line.397"></a>
+<span class="sourceLineNo">398</span>         String style = getStyle(session, ppMeta, value);<a name="line.398"></a>
+<span class="sourceLineNo">399</span><a name="line.399"></a>
+<span class="sourceLineNo">400</span>         out.sTag(i+1, "tr").nl(i+2);<a name="line.400"></a>
+<span class="sourceLineNo">401</span>         out.oTag(i+2, "td");<a name="line.401"></a>
+<span class="sourceLineNo">402</span>         if (style != null)<a name="line.402"></a>
+<span class="sourceLineNo">403</span>            out.attr("style", style);<a name="line.403"></a>
+<span class="sourceLineNo">404</span>         out.cTag();<a name="line.404"></a>
+<span class="sourceLineNo">405</span>         if (link != null)<a name="line.405"></a>
+<span class="sourceLineNo">406</span>            out.oTag(i+3, "a").attrUri("href", link.replace("{#}", StringUtils.toString(value))).cTag();<a name="line.406"></a>
+<span class="sourceLineNo">407</span>         ContentResult cr = serializeAnything(session, out, key, keyType, null, 2, null, false);<a name="line.407"></a>
+<span class="sourceLineNo">408</span>         if (link != null)<a name="line.408"></a>
+<span class="sourceLineNo">409</span>            out.eTag("a");<a name="line.409"></a>
 <span class="sourceLineNo">410</span>         if (cr == CR_NORMAL)<a name="line.410"></a>
-<span class="sourceLineNo">411</span>            out.ie(i+2);<a name="line.411"></a>
+<span class="sourceLineNo">411</span>            out.i(i+2);<a name="line.411"></a>
 <span class="sourceLineNo">412</span>         out.eTag("td").nl(i+2);<a name="line.412"></a>
-<span class="sourceLineNo">413</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.413"></a>
-<span class="sourceLineNo">414</span>      }<a name="line.414"></a>
-<span class="sourceLineNo">415</span>      out.ie(i).eTag("table").nl(i);<a name="line.415"></a>
-<span class="sourceLineNo">416</span>   }<a name="line.416"></a>
-<span class="sourceLineNo">417</span><a name="line.417"></a>
-<span class="sourceLineNo">418</span>   private void serializeBeanMap(HtmlSerializerSession session, HtmlWriter out, BeanMap&lt;?&gt; m, ClassMeta&lt;?&gt; eType, BeanPropertyMeta ppMeta) throws Exception {<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      int i = session.getIndent();<a name="line.419"></a>
-<span class="sourceLineNo">420</span><a name="line.420"></a>
-<span class="sourceLineNo">421</span>      out.oTag(i, "table");<a name="line.421"></a>
+<span class="sourceLineNo">413</span>         out.sTag(i+2, "td");<a name="line.413"></a>
+<span class="sourceLineNo">414</span>         cr = serializeAnything(session, out, value, valueType, (key == null ? "_x0000_" : session.toString(key)), 2, null, false);<a name="line.414"></a>
+<span class="sourceLineNo">415</span>         if (cr == CR_NORMAL)<a name="line.415"></a>
+<span class="sourceLineNo">416</span>            out.ie(i+2);<a name="line.416"></a>
+<span class="sourceLineNo">417</span>         out.eTag("td").nl(i+2);<a name="line.417"></a>
+<span class="sourceLineNo">418</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.418"></a>
+<span class="sourceLineNo">419</span>      }<a name="line.419"></a>
+<span class="sourceLineNo">420</span>      out.ie(i).eTag("table").nl(i);<a name="line.420"></a>
+<span class="sourceLineNo">421</span>   }<a name="line.421"></a>
 <span class="sourceLineNo">422</span><a name="line.422"></a>
-<span class="sourceLineNo">423</span>      String typeName = m.getMeta().getDictionaryName();<a name="line.423"></a>
-<span class="sourceLineNo">424</span>      if (typeName != null &amp;&amp; eType != m.getClassMeta())<a name="line.424"></a>
-<span class="sourceLineNo">425</span>         out.attr(session.getBeanTypePropertyName(m.getClassMeta()), typeName);<a name="line.425"></a>
-<span class="sourceLineNo">426</span><a name="line.426"></a>
-<span class="sourceLineNo">427</span>      out.append('&gt;').nl(i);<a name="line.427"></a>
-<span class="sourceLineNo">428</span>      if (session.isAddKeyValueTableHeaders() &amp;&amp; ! (m.getClassMeta().getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() || (ppMeta != null &amp;&amp; ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) {<a name="line.428"></a>
-<span class="sourceLineNo">429</span>         out.sTag(i+1, "tr").nl(i+1);<a name="line.429"></a>
-<span class="sourceLineNo">430</span>         out.sTag(i+2, "th").append("key").eTag("th").nl(i+2);<a name="line.430"></a>
-<span class="sourceLineNo">431</span>         out.sTag(i+2, "th").append("value").eTag("th").nl(i+2);<a name="line.431"></a>
-<span class="sourceLineNo">432</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.432"></a>
-<span class="sourceLineNo">433</span>      }<a name="line.433"></a>
-<span class="sourceLineNo">434</span><a name="line.434"></a>
-<span class="sourceLineNo">435</span>      for (BeanPropertyValue p : m.getValues(session.isTrimNulls())) {<a name="line.435"></a>
-<span class="sourceLineNo">436</span>         BeanPropertyMeta pMeta = p.getMeta();<a name="line.436"></a>
-<span class="sourceLineNo">437</span>         ClassMeta&lt;?&gt; cMeta = p.getClassMeta();<a name="line.437"></a>
-<span class="sourceLineNo">438</span><a name="line.438"></a>
-<span class="sourceLineNo">439</span>         String key = p.getName();<a name="line.439"></a>
-<span class="sourceLineNo">440</span>         Object value = p.getValue();<a name="line.440"></a>
-<span class="sourceLineNo">441</span>         Throwable t = p.getThrown();<a name="line.441"></a>
-<span class="sourceLineNo">442</span>         if (t != null)<a name="line.442"></a>
-<span class="sourceLineNo">443</span>            session.onBeanGetterException(pMeta, t);<a name="line.443"></a>
-<span class="sourceLineNo">444</span><a name="line.444"></a>
-<span class="sourceLineNo">445</span>         if (session.canIgnoreValue(cMeta, key, value))<a name="line.445"></a>
-<span class="sourceLineNo">446</span>            continue;<a name="line.446"></a>
-<span class="sourceLineNo">447</span><a name="line.447"></a>
-<span class="sourceLineNo">448</span>         String link = cMeta.isCollectionOrArray() ? null : getLink(pMeta);<a name="line.448"></a>
+<span class="sourceLineNo">423</span>   private void serializeBeanMap(HtmlSerializerSession session, HtmlWriter out, BeanMap&lt;?&gt; m, ClassMeta&lt;?&gt; eType, BeanPropertyMeta ppMeta) throws Exception {<a name="line.423"></a>
+<span class="sourceLineNo">424</span>      int i = session.getIndent();<a name="line.424"></a>
+<span class="sourceLineNo">425</span><a name="line.425"></a>
+<span class="sourceLineNo">426</span>      out.oTag(i, "table");<a name="line.426"></a>
+<span class="sourceLineNo">427</span><a name="line.427"></a>
+<span class="sourceLineNo">428</span>      String typeName = m.getMeta().getDictionaryName();<a name="line.428"></a>
+<span class="sourceLineNo">429</span>      if (typeName != null &amp;&amp; eType != m.getClassMeta())<a name="line.429"></a>
+<span class="sourceLineNo">430</span>         out.attr(session.getBeanTypePropertyName(m.getClassMeta()), typeName);<a name="line.430"></a>
+<span class="sourceLineNo">431</span><a name="line.431"></a>
+<span class="sourceLineNo">432</span>      out.append('&gt;').nl(i);<a name="line.432"></a>
+<span class="sourceLineNo">433</span>      if (session.isAddKeyValueTableHeaders() &amp;&amp; ! (m.getClassMeta().getExtendedMeta(HtmlClassMeta.class).isNoTableHeaders() || (ppMeta != null &amp;&amp; ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).isNoTableHeaders()))) {<a name="line.433"></a>
+<span class="sourceLineNo">434</span>         out.sTag(i+1, "tr").nl(i+1);<a name="line.434"></a>
+<span class="sourceLineNo">435</span>         out.sTag(i+2, "th").append("key").eTag("th").nl(i+2);<a name="line.435"></a>
+<span class="sourceLineNo">436</span>         out.sTag(i+2, "th").append("value").eTag("th").nl(i+2);<a name="line.436"></a>
+<span class="sourceLineNo">437</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.437"></a>
+<span class="sourceLineNo">438</span>      }<a name="line.438"></a>
+<span class="sourceLineNo">439</span><a name="line.439"></a>
+<span class="sourceLineNo">440</span>      for (BeanPropertyValue p : m.getValues(session.isTrimNulls())) {<a name="line.440"></a>
+<span class="sourceLineNo">441</span>         BeanPropertyMeta pMeta = p.getMeta();<a name="line.441"></a>
+<span class="sourceLineNo">442</span>         ClassMeta&lt;?&gt; cMeta = p.getClassMeta();<a name="line.442"></a>
+<span class="sourceLineNo">443</span><a name="line.443"></a>
+<span class="sourceLineNo">444</span>         String key = p.getName();<a name="line.444"></a>
+<span class="sourceLineNo">445</span>         Object value = p.getValue();<a name="line.445"></a>
+<span class="sourceLineNo">446</span>         Throwable t = p.getThrown();<a name="line.446"></a>
+<span class="sourceLineNo">447</span>         if (t != null)<a name="line.447"></a>
+<span class="sourceLineNo">448</span>            session.onBeanGetterException(pMeta, t);<a name="line.448"></a>
 <span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>         out.sTag(i+1, "tr").nl(i+1);<a name="line.450"></a>
-<span class="sourceLineNo">451</span>         out.sTag(i+2, "td").text(key).eTag("td").nl(i+2);<a name="line.451"></a>
-<span class="sourceLineNo">452</span>         out.oTag(i+2, "td");<a name="line.452"></a>
-<span class="sourceLineNo">453</span>         String style = getStyle(session, pMeta, value);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>         if (style != null)<a name="line.454"></a>
-<span class="sourceLineNo">455</span>            out.attr("style", style);<a name="line.455"></a>
-<span class="sourceLineNo">456</span>         out.cTag();<a name="line.456"></a>
-<span class="sourceLineNo">457</span><a name="line.457"></a>
-<span class="sourceLineNo">458</span>         try {<a name="line.458"></a>
-<span class="sourceLineNo">459</span>            if (link != null)<a name="line.459"></a>
-<span class="sourceLineNo">460</span>               out.oTag(i+3, "a").attrUri("href", m.resolveVars(link)).cTag();<a name="line.460"></a>
-<span class="sourceLineNo">461</span>            ContentResult cr = serializeAnything(session, out, value, cMeta, key, 2, pMeta, false);<a name="line.461"></a>
-<span class="sourceLineNo">462</span>            if (cr == CR_NORMAL)<a name="line.462"></a>
-<span class="sourceLineNo">463</span>               out.i(i+2);<a name="line.463"></a>
+<span class="sourceLineNo">450</span>         if (session.canIgnoreValue(cMeta, key, value))<a name="line.450"></a>
+<span class="sourceLineNo">451</span>            continue;<a name="line.451"></a>
+<span class="sourceLineNo">452</span><a name="line.452"></a>
+<span class="sourceLineNo">453</span>         String link = cMeta.isCollectionOrArray() ? null : getLink(pMeta);<a name="line.453"></a>
+<span class="sourceLineNo">454</span><a name="line.454"></a>
+<span class="sourceLineNo">455</span>         out.sTag(i+1, "tr").nl(i+1);<a name="line.455"></a>
+<span class="sourceLineNo">456</span>         out.sTag(i+2, "td").text(key).eTag("td").nl(i+2);<a name="line.456"></a>
+<span class="sourceLineNo">457</span>         out.oTag(i+2, "td");<a name="line.457"></a>
+<span class="sourceLineNo">458</span>         String style = getStyle(session, pMeta, value);<a name="line.458"></a>
+<span class="sourceLineNo">459</span>         if (style != null)<a name="line.459"></a>
+<span class="sourceLineNo">460</span>            out.attr("style", style);<a name="line.460"></a>
+<span class="sourceLineNo">461</span>         out.cTag();<a name="line.461"></a>
+<span class="sourceLineNo">462</span><a name="line.462"></a>
+<span class="sourceLineNo">463</span>         try {<a name="line.463"></a>
 <span class="sourceLineNo">464</span>            if (link != null)<a name="line.464"></a>
-<span class="sourceLineNo">465</span>               out.eTag("a");<a name="line.465"></a>
-<span class="sourceLineNo">466</span>         } catch (SerializeException e) {<a name="line.466"></a>
-<span class="sourceLineNo">467</span>            throw e;<a name="line.467"></a>
-<span class="sourceLineNo">468</span>         } catch (Error e) {<a name="line.468"></a>
-<span class="sourceLineNo">469</span>            throw e;<a name="line.469"></a>
-<span class="sourceLineNo">470</span>         } catch (Throwable e) {<a name="line.470"></a>
-<span class="sourceLineNo">471</span>            e.printStackTrace();<a name="line.471"></a>
-<span class="sourceLineNo">472</span>            session.onBeanGetterException(pMeta, e);<a name="line.472"></a>
-<span class="sourceLineNo">473</span>         }<a name="line.473"></a>
-<span class="sourceLineNo">474</span>         out.eTag("td").nl(i+2);<a name="line.474"></a>
-<span class="sourceLineNo">475</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.475"></a>
-<span class="sourceLineNo">476</span>      }<a name="line.476"></a>
-<span class="sourceLineNo">477</span>      out.ie(i).eTag("table").nl(i);<a name="line.477"></a>
-<span class="sourceLineNo">478</span>   }<a name="line.478"></a>
-<span class="sourceLineNo">479</span><a name="line.479"></a>
-<span class="sourceLineNo">480</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.480"></a>
-<span class="sourceLineNo">481</span>   private void serializeCollection(HtmlSerializerSession session, HtmlWriter out, Object in, ClassMeta&lt;?&gt; sType, ClassMeta&lt;?&gt; eType, String name, BeanPropertyMeta ppMeta) throws Exception {<a name="line.481"></a>
-<span class="sourceLineNo">482</span><a name="line.482"></a>
-<span class="sourceLineNo">483</span>      ClassMeta&lt;?&gt; seType = sType.getElementType();<a name="line.483"></a>
-<span class="sourceLineNo">484</span>      if (seType == null)<a name="line.484"></a>
-<span class="sourceLineNo">485</span>         seType = session.object();<a name="line.485"></a>
-<span class="sourceLineNo">486</span><a name="line.486"></a>
-<span class="sourceLineNo">487</span>      Collection c = (sType.isCollection() ? (Collection)in : toList(sType.getInnerClass(), in));<a name="line.487"></a>
-<span class="sourceLineNo">488</span><a name="line.488"></a>
-<span class="sourceLineNo">489</span>      int i = session.getIndent();<a name="line.489"></a>
-<span class="sourceLineNo">490</span>      if (c.isEmpty()) {<a name="line.490"></a>
-<span class="sourceLineNo">491</span>         out.appendln(i, "&lt;ul&gt;&lt;/ul&gt;");<a name="line.491"></a>
-<span class="sourceLineNo">492</span>         return;<a name="line.492"></a>
-<span class="sourceLineNo">493</span>      }<a name="line.493"></a>
-<span class="sourceLineNo">494</span><a name="line.494"></a>
-<span class="sourceLineNo">495</span>      String type2 = null;<a name="line.495"></a>
-<span class="sourceLineNo">496</span>      if (sType != eType)<a name="line.496"></a>
-<span class="sourceLineNo">497</span>         type2 = sType.getDictionaryName();<a name="line.497"></a>
-<span class="sourceLineNo">498</span>      if (type2 == null)<a name="line.498"></a>
-<span class="sourceLineNo">499</span>         type2 = "array";<a name="line.499"></a>
-<span class="sourceLineNo">500</span><a name="line.500"></a>
-<span class="sourceLineNo">501</span>      c = session.sort(c);<a name="line.501"></a>
-<span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>      HtmlBeanPropertyMeta hbpMeta = (ppMeta == null ? null : ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class));<a name="line.503"></a>
-<span class="sourceLineNo">504</span>      String btpn = session.getBeanTypePropertyName(eType);<a name="line.504"></a>
+<span class="sourceLineNo">465</span>               out.oTag(i+3, "a").attrUri("href", m.resolveVars(link)).cTag();<a name="line.465"></a>
+<span class="sourceLineNo">466</span>            ContentResult cr = serializeAnything(session, out, value, cMeta, key, 2, pMeta, false);<a name="line.466"></a>
+<span class="sourceLineNo">467</span>            if (cr == CR_NORMAL)<a name="line.467"></a>
+<span class="sourceLineNo">468</span>               out.i(i+2);<a name="line.468"></a>
+<span class="sourceLineNo">469</span>            if (link != null)<a name="line.469"></a>
+<span class="sourceLineNo">470</span>               out.eTag("a");<a name="line.470"></a>
+<span class="sourceLineNo">471</span>         } catch (SerializeException e) {<a name="line.471"></a>
+<span class="sourceLineNo">472</span>            throw e;<a name="line.472"></a>
+<span class="sourceLineNo">473</span>         } catch (Error e) {<a name="line.473"></a>
+<span class="sourceLineNo">474</span>            throw e;<a name="line.474"></a>
+<span class="sourceLineNo">475</span>         } catch (Throwable e) {<a name="line.475"></a>
+<span class="sourceLineNo">476</span>            e.printStackTrace();<a name="line.476"></a>
+<span class="sourceLineNo">477</span>            session.onBeanGetterException(pMeta, e);<a name="line.477"></a>
+<span class="sourceLineNo">478</span>         }<a name="line.478"></a>
+<span class="sourceLineNo">479</span>         out.eTag("td").nl(i+2);<a name="line.479"></a>
+<span class="sourceLineNo">480</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.480"></a>
+<span class="sourceLineNo">481</span>      }<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      out.ie(i).eTag("table").nl(i);<a name="line.482"></a>
+<span class="sourceLineNo">483</span>   }<a name="line.483"></a>
+<span class="sourceLineNo">484</span><a name="line.484"></a>
+<span class="sourceLineNo">485</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.485"></a>
+<span class="sourceLineNo">486</span>   private void serializeCollection(HtmlSerializerSession session, HtmlWriter out, Object in, ClassMeta&lt;?&gt; sType, ClassMeta&lt;?&gt; eType, String name, BeanPropertyMeta ppMeta) throws Exception {<a name="line.486"></a>
+<span class="sourceLineNo">487</span><a name="line.487"></a>
+<span class="sourceLineNo">488</span>      ClassMeta&lt;?&gt; seType = sType.getElementType();<a name="line.488"></a>
+<span class="sourceLineNo">489</span>      if (seType == null)<a name="line.489"></a>
+<span class="sourceLineNo">490</span>         seType = session.object();<a name="line.490"></a>
+<span class="sourceLineNo">491</span><a name="line.491"></a>
+<span class="sourceLineNo">492</span>      Collection c = (sType.isCollection() ? (Collection)in : toList(sType.getInnerClass(), in));<a name="line.492"></a>
+<span class="sourceLineNo">493</span><a name="line.493"></a>
+<span class="sourceLineNo">494</span>      int i = session.getIndent();<a name="line.494"></a>
+<span class="sourceLineNo">495</span>      if (c.isEmpty()) {<a name="line.495"></a>
+<span class="sourceLineNo">496</span>         out.appendln(i, "&lt;ul&gt;&lt;/ul&gt;");<a name="line.496"></a>
+<span class="sourceLineNo">497</span>         return;<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      }<a name="line.498"></a>
+<span class="sourceLineNo">499</span><a name="line.499"></a>
+<span class="sourceLineNo">500</span>      String type2 = null;<a name="line.500"></a>
+<span class="sourceLineNo">501</span>      if (sType != eType)<a name="line.501"></a>
+<span class="sourceLineNo">502</span>         type2 = sType.getDictionaryName();<a name="line.502"></a>
+<span class="sourceLineNo">503</span>      if (type2 == null)<a name="line.503"></a>
+<span class="sourceLineNo">504</span>         type2 = "array";<a name="line.504"></a>
 <span class="sourceLineNo">505</span><a name="line.505"></a>
-<span class="sourceLineNo">506</span>      // Look at the objects to see how we're going to handle them.  Check the first object to see how we're going to handle this.<a name="line.506"></a>
-<span class="sourceLineNo">507</span>      // If it's a map or bean, then we'll create a table.<a name="line.507"></a>
-<span class="sourceLineNo">508</span>      // Otherwise, we'll create a list.<a name="line.508"></a>
-<span class="sourceLineNo">509</span>      Object[] th = getTableHeaders(session, c, hbpMeta);<a name="line.509"></a>
+<span class="sourceLineNo">506</span>      c = session.sort(c);<a name="line.506"></a>
+<span class="sourceLineNo">507</span><a name="line.507"></a>
+<span class="sourceLineNo">508</span>      HtmlBeanPropertyMeta hbpMeta = (ppMeta == null ? null : ppMeta.getExtendedMeta(HtmlBeanPropertyMeta.class));<a name="line.508"></a>
+<span class="sourceLineNo">509</span>      String btpn = session.getBeanTypePropertyName(eType);<a name="line.509"></a>
 <span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>      if (th != null) {<a name="line.511"></a>
-<span class="sourceLineNo">512</span><a name="line.512"></a>
-<span class="sourceLineNo">513</span>         out.oTag(i, "table").attr(btpn, type2).append('&gt;').nl(i+1);<a name="line.513"></a>
-<span class="sourceLineNo">514</span>         out.sTag(i+1, "tr").nl(i+2);<a name="line.514"></a>
-<span class="sourceLineNo">515</span>         for (Object key : th) {<a name="line.515"></a>
-<span class="sourceLineNo">516</span>            out.sTag(i+2, "th");<a name="line.516"></a>
-<span class="sourceLineNo">517</span>            out.text(session.convertToType(key, String.class));<a name="line.517"></a>
-<span class="sourceLineNo">518</span>            out.eTag("th").nl(i+2);<a name="line.518"></a>
-<span class="sourceLineNo">519</span>         }<a name="line.519"></a>
-<span class="sourceLineNo">520</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.520"></a>
-<span class="sourceLineNo">521</span><a name="line.521"></a>
-<span class="sourceLineNo">522</span>         for (Object o : c) {<a name="line.522"></a>
-<span class="sourceLineNo">523</span>            ClassMeta&lt;?&gt; cm = session.getClassMetaForObject(o);<a name="line.523"></a>
-<span class="sourceLineNo">524</span><a name="line.524"></a>
-<span class="sourceLineNo">525</span>            if (cm != null &amp;&amp; cm.getPojoSwap() != null) {<a name="line.525"></a>
-<span class="sourceLineNo">526</span>               PojoSwap f = cm.getPojoSwap();<a name="line.526"></a>
-<span class="sourceLineNo">527</span>               o = f.swap(session, o);<a name="line.527"></a>
-<span class="sourceLineNo">528</span>               cm = cm.getSerializedClassMeta();<a name="line.528"></a>
-<span class="sourceLineNo">529</span>            }<a name="line.529"></a>
-<span class="sourceLineNo">530</span><a name="line.530"></a>
-<span class="sourceLineNo">531</span>            out.oTag(i+1, "tr");<a name="line.531"></a>
-<span class="sourceLineNo">532</span>            String typeName = (cm == null ? null : cm.getDictionaryName());<a name="line.532"></a>
-<span class="sourceLineNo">533</span>            String typeProperty = session.getBeanTypePropertyName(cm);<a name="line.533"></a>
-<span class="sourceLineNo">534</span><a name="line.534"></a>
-<span class="sourceLineNo">535</span>            if (typeName != null &amp;&amp; eType.getElementType() != cm)<a name="line.535"></a>
-<span class="sourceLineNo">536</span>               out.attr(typeProperty, typeName);<a name="line.536"></a>
-<span class="sourceLineNo">537</span>            out.cTag().nl(i+2);<a name="line.537"></a>
-<span class="sourceLineNo">538</span><a name="line.538"></a>
-<span class="sourceLineNo">539</span>            if (cm == null) {<a name="line.539"></a>
-<span class="sourceLineNo">540</span>               serializeAnything(session, out, o, null, null, 1, null, false);<a name="line.540"></a>
-<span class="sourceLineNo">541</span><a name="line.541"></a>
-<span class="sourceLineNo">542</span>            } else if (cm.isMap() &amp;&amp; ! (cm.isBeanMap())) {<a name="line.542"></a>
-<span class="sourceLineNo">543</span>               Map m2 = session.sort((Map)o);<a name="line.543"></a>
-<span class="sourceLineNo">544</span><a name="line.544"></a>
-<span class="sourceLineNo">545</span>               for (Object k : th) {<a name="line.545"></a>
-<span class="sourceLineNo">546</span>                  out.sTag(i+2, "td");<a name="line.546"></a>
-<span class="sourceLineNo">547</span>                  ContentResult cr = serializeAnything(session, out, m2.get(k), eType.getElementType(), session.toString(k), 2, null, false);<a name="line.547"></a>
-<span class="sourceLineNo">548</span>                  if (cr == CR_NORMAL)<a name="line.548"></a>
-<span class="sourceLineNo">549</span>                     out.i(i+2);<a name="line.549"></a>
-<span class="sourceLineNo">550</span>                  out.eTag("td").nl(i+2);<a name="line.550"></a>
-<span class="sourceLineNo">551</span>               }<a name="line.551"></a>
-<span class="sourceLineNo">552</span>            } else {<a name="line.552"></a>
-<span class="sourceLineNo">553</span>               BeanMap m2 = null;<a name="line.553"></a>
-<span class="sourceLineNo">554</span>               if (o instanceof BeanMap)<a name="line.554"></a>
-<span class="sourceLineNo">555</span>                  m2 = (BeanMap)o;<a name="line.555"></a>
-<span class="sourceLineNo">556</span>               else<a name="line.556"></a>
-<span class="sourceLineNo">557</span>                  m2 = session.toBeanMap(o);<a name="line.557"></a>
-<span class="sourceLineNo">558</span><a name="line.558"></a>
-<span class="sourceLineNo">559</span>               for (Object k : th) {<a name="line.559"></a>
-<span class="sourceLineNo">560</span>                  BeanMapEntry p = m2.getProperty(session.toString(k));<a name="line.560"></a>
-<span class="sourceLineNo">561</span>                  BeanPropertyMeta pMeta = p.getMeta();<a name="line.561"></a>
-<span class="sourceLineNo">562</span>                  String link = pMeta.getClassMeta().isCollectionOrArray() ? null : getLink(pMeta);<a name="line.562"></a>
-<span class="sourceLineNo">563</span>                  Object value = p.getValue();<a name="line.563"></a>
-<span class="sourceLineNo">564</span>                  String style = getStyle(session, pMeta, value);<a name="line.564"></a>
-<span class="sourceLineNo">565</span>                  out.oTag(i+2, "td");<a name="line.565"></a>
-<span class="sourceLineNo">566</span>                  if (style != null)<a name="line.566"></a>
-<span class="sourceLineNo">567</span>                     out.attr("style", style);<a name="line.567"></a>
-<span class="sourceLineNo">568</span>                  out.cTag();<a name="line.568"></a>
-<span class="sourceLineNo">569</span>                  if (link != null)<a name="line.569"></a>
-<span class="sourceLineNo">570</span>                     out.oTag(i+3, "a").attrUri("href", m2.resolveVars(link)).cTag();<a name="line.570"></a>
-<span class="sourceLineNo">571</span>                  ContentResult cr = serializeAnything(session, out, value, pMeta.getClassMeta(), p.getKey().toString(), 2, pMeta, false);<a name="line.571"></a>
-<span class="sourceLineNo">572</span>                  if (cr == CR_NORMAL)<a name="line.572"></a>
-<span class="sourceLineNo">573</span>                     out.i(i+2);<a name="line.573"></a>
+<span class="sourceLineNo">511</span>      // Look at the objects to see how we're going to handle them.  Check the first object to see how we're going to handle this.<a name="line.511"></a>
+<span class="sourceLineNo">512</span>      // If it's a map or bean, then we'll create a table.<a name="line.512"></a>
+<span class="sourceLineNo">513</span>      // Otherwise, we'll create a list.<a name="line.513"></a>
+<span class="sourceLineNo">514</span>      Object[] th = getTableHeaders(session, c, hbpMeta);<a name="line.514"></a>
+<span class="sourceLineNo">515</span><a name="line.515"></a>
+<span class="sourceLineNo">516</span>      if (th != null) {<a name="line.516"></a>
+<span class="sourceLineNo">517</span><a name="line.517"></a>
+<span class="sourceLineNo">518</span>         out.oTag(i, "table").attr(btpn, type2).append('&gt;').nl(i+1);<a name="line.518"></a>
+<span class="sourceLineNo">519</span>         out.sTag(i+1, "tr").nl(i+2);<a name="line.519"></a>
+<span class="sourceLineNo">520</span>         for (Object key : th) {<a name="line.520"></a>
+<span class="sourceLineNo">521</span>            out.sTag(i+2, "th");<a name="line.521"></a>
+<span class="sourceLineNo">522</span>            out.text(session.convertToType(key, String.class));<a name="line.522"></a>
+<span class="sourceLineNo">523</span>            out.eTag("th").nl(i+2);<a name="line.523"></a>
+<span class="sourceLineNo">524</span>         }<a name="line.524"></a>
+<span class="sourceLineNo">525</span>         out.ie(i+1).eTag("tr").nl(i+1);<a name="line.525"></a>
+<span class="sourceLineNo">526</span><a name="line.526"></a>
+<span class="sourceLineNo">527</span>         for (Object o : c) {<a name="line.527"></a>
+<span class="sourceLineNo">528</span>            ClassMeta&lt;?&gt; cm = session.getClassMetaForObject(o);<a name="line.528"></a>
+<span class="sourceLineNo">529</span><a name="line.529"></a>
+<span class="sourceLineNo">530</span>            if (cm != null &amp;&amp; cm.getPojoSwap() != null) {<a name="line.530"></a>
+<span class="sourceLineNo">531</span>               PojoSwap f = cm.getPojoSwap();<a name="line.531"></a>
+<span class="sourceLineNo">532</span>               o = f.swap(session, o);<a name="line.532"></a>
+<span class="sourceLineNo">533</span>               cm = cm.getSerializedClassMeta();<a name="line.533"></a>
+<span class="sourceLineNo">534</span>            }<a name="line.534"></a>
+<span class="sourceLineNo">535</span><a name="line.535"></a>
+<span class="sourceLineNo">536</span>            out.oTag(i+1, "tr");<a name="line.536"></a>
+<span class="sourceLineNo">537</span>            String typeName = (cm == null ? null : cm.getDictionaryName());<a name="line.537"></a>
+<span class="sourceLineNo">538</span>            String typeProperty = session.getBeanTypePropertyName(cm);<a name="line.538"></a>
+<span class="sourceLineNo">539</span><a name="line.539"></a>
+<span class="sourceLineNo">540</span>            if (typeName != null &amp;&amp; eType.getElementType() != cm)<a name="line.540"></a>
+<span class="sourceLineNo">541</span>               out.attr(typeProperty, typeName);<a name="line.541"></a>
+<span class="sourceLineNo">542</span>            out.cTag().nl(i+2);<a name="line.542"></a>
+<span class="sourceLineNo">543</span><a name="line.543"></a>
+<span class="sourceLineNo">544</span>            if (cm == null) {<a name="line.544"></a>
+<span class="sourceLineNo">545</span>               serializeAnything(session, out, o, null, null, 1, null, false);<a name="line.545"></a>
+<span class="sourceLineNo">546</span><a name="line.546"></a>
+<span class="sourceLineNo">547</span>            } else if (cm.isMap() &amp;&amp; ! (cm.isBeanMap())) {<a name="line.547"></a>
+<span class="sourceLineNo">548</span>               Map m2 = session.sort((Map)o);<a name="line.548"></a>
+<span class="sourceLineNo">549</span><a name="line.549"></a>
+<span class="sourceLineNo">550</span>               for (Object k : th) {<a name="line.550"></a>
+<span class="sourceLineNo">551</span>                  out.sTag(i+2, "td");<a name="line.551"></a>
+<span class="sourceLineNo">552</span>                  ContentResult cr = serializeAnything(session, out, m2.get(k), eType.getElementType(), session.toString(k), 2, null, false);<a name="line.552"></a>
+<span class="sourceLineNo">553</span>                  if (cr == CR_NORMAL)<a name="line.553"></a>
+<span class="sourceLineNo">554</span>                     out.i(i+2);<a name="line.554"></a>
+<span class="sourceLineNo">555</span>                  out.eTag("td").nl(i+2);<a name="line.555"></a>
+<span class="sourceLineNo">556</span>               }<a name="line.556"></a>
+<span class="sourceLineNo">557</span>            } else {<a name="line.557"></a>
+<span class="sourceLineNo">558</span>               BeanMap m2 = null;<a name="line.558"></a>
+<span class="sourceLineNo">559</span>               if (o instanceof BeanMap)<a name="line.559"></a>
+<span class="sourceLineNo">560</span>                  m2 = (BeanMap)o;<a name="line.560"></a>
+<span class="sourceLineNo">561</span>               else<a name="line.561"></a>
+<span class="sourceLineNo">562</span>                  m2 = session.toBeanMap(o);<a name="line.562"></a>
+<span class="sourceLineNo">563</span><a name="line.563"></a>
+<span class="sourceLineNo">564</span>               for (Object k : th) {<a name="line.564"></a>
+<span class="sourceLineNo">565</span>                  BeanMapEntry p = m2.getProperty(session.toString(k));<a name="line.565"></a>
+<span class="sourceLineNo">566</span>                  BeanPropertyMeta pMeta = p.getMeta();<a name="line.566"></a>
+<span class="sourceLineNo">567</span>                  String link = pMeta.getClassMeta().isCollectionOrArray() ? null : getLink(pMeta);<a name="line.567"></a>
+<span class="sourceLineNo">568</span>                  Object value = p.getValue();<a name="line.568"></a>
+<span class="sourceLineNo">569</span>                  String style = getStyle(session, pMeta, value);<a name="line.569"></a>
+<span class="sourceLineNo">570</span>                  out.oTag(i+2, "td");<a name="line.570"></a>
+<span class="sourceLineNo">571</span>                  if (style != null)<a name="line.571"></a>
+<span class="sourceLineNo">572</span>                     out.attr("style", style);<a name="line.572"></a>
+<span class="sourceLineNo">573</span>                  out.cTag();<a name="line.573"></a>
 <span class="sourceLineNo">574</span>                  if (link != null)<a name="line.574"></a>
-<span class="sourceLineNo">575</span>                     out.eTag("a");<a name="line.575"></a>
-<span class="sourceLineNo">576</span>                  out.eTag("td").nl(i+2);<a name="line.576"></a>
-<span class="sourceLineNo">577</span>               }<a name="line.577"></a>
-<span class="sourceLineNo">578</span>            }<a name="line.578"></a>
-<span class="sourceLineNo">579</span>            out.ie(i+1).eTag("tr").nl(i+1);<a name="line.579"></a>
-<span class="sourceLineNo">580</span>         }<a name="line.580"></a>
-<span class="sourceLineNo">581</span>         out.ie(i).eTag("table").nl(i);<a name="line.581"></a>
-<span class="sourceLineNo">582</span><a name="line.582"></a>
-<span class="sourceLineNo">583</span>      } else {<a name="line.583"></a>
-<span class="sourceLineNo">584</span>         out.oTag(i, "ul");<a name="line.584"></a>
-<span class="sourceLineNo">585</span>         if (! type2.equals("array"))<a name="line.585"></a>
-<span class="sourceLineNo">586</span>            out.attr(btpn, type2);<a name="line.586"></a>
-<span class="sourceLineNo">587</span>         out.append('&gt;').nl(i+1);<a name="line.587"></a>
-<span class="sourceLineNo">588</span>         for (Object o : c) {<a name="line.588"></a>
-<span class="sourceLineNo">589</span>            out.oTag(i+1, "li");<a name="line.589"></a>
-<span class="sourceLineNo">590</span>            String style = getStyle(session, ppMeta, o);<a name="line.590"></a>
-<span class="sourceLineNo">591</span>            String link = getLink(ppMeta);<a name="line.591"></a>
-<span class="sourceLineNo">592</span>            if (style != null)<a name="line.592"></a>
-<span class="sourceLineNo">593</span>               out.attr("style", style);<a name="line.593"></a>
-<span class="sourceLineNo">594</span>            out.cTag();<a name="line.594"></a>
-<span class="sourceLineNo">595</span>            if (link != null)<a name="line.595"></a>
-<span class="sourceLineNo">596</span>               out.oTag(i+2, "a").attrUri("href", link.replace("{#}", StringUtils.toString(o))).cTag();<a name="line.596"></a>
-<span class="sourceLineNo">597</span>            ContentResult cr = serializeAnything(session, out, o, eType.getElementType(), name, 1, null, false);<a name="line.597"></a>
-<span class="sourceLineNo">598</span>            if (link != null)<a name="line.598"></a>
-<span class="sourceLineNo">599</span>               out.eTag("a");<a name="line.599"></a>
-<span class="sourceLineNo">600</span>            if (cr == CR_NORMAL)<a name="line.600"></a>
-<span class="sourceLineNo">601</span>               out.ie(i+1);<a name="line.601"></a>
-<span class="sourceLineNo">602</span>            out.eTag("li").nl(i+1);<a name="line.602"></a>
-<span class="sourceLineNo">603</span>         }<a name="line.603"></a>
-<span class="sourceLineNo">604</span>         out.ie(i).eTag("ul").nl(i);<a name="line.604"></a>
-<span class="sourceLineNo">605</span>      }<a name="line.605"></a>
-<span class="sourceLineNo">606</span>   }<a name="line.606"></a>
-<span class="sourceLineNo">607</span><a name="line.607"></a>
-<span class="sourceLineNo">608</span>   private static HtmlRender&lt;?&gt; getRender(HtmlSerializerSession session, BeanPropertyMeta pMeta, Object value) {<a name="line.608"></a>
-<span class="sourceLineNo">609</span>      if (pMeta == null)<a name="line.609"></a>
-<span class="sourceLineNo">610</span>         return null;<a name="line.610"></a>
-<span class="sourceLineNo">611</span>      HtmlBeanPropertyMeta hpMeta = pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class);<a name="line.611"></a>
-<span class="sourceLineNo">612</span>      HtmlRender&lt;?&gt; render = hpMeta.getRender();<a name="line.612"></a>
-<span class="sourceLineNo">613</span>      if (render != null)<a name="line.613"></a>
-<span class="sourceLineNo">614</span>         return render;<a name="line.614"></a>
-<span class="sourceLineNo">615</span>      ClassMeta&lt;?&gt; cMeta = session.getClassMetaForObject(value);<a name="line.615"></a>
-<span class="sourceLineNo">616</span>      render = cMeta == null ? null : cMeta.getExtendedMeta(HtmlClassMeta.class).getRender();<a name="line.616"></a>
-<span class="sourceLineNo">617</span>      return render;<a name="line.617"></a>
-<span class="sourceLineNo">618</span>   }<a name="line.618"></a>
-<span class="sourceLineNo">619</span><a name="line.619"></a>
-<span class="sourceLineNo">620</span>   @SuppressWarnings({"rawtypes","unchecked"})<a name="line.620"></a>
-<span class="sourceLineNo">621</span>   private static String getStyle(HtmlSerializerSession session, BeanPropertyMeta pMeta, Object value) {<a name="line.621"></a>
-<span class="sourceLineNo">622</span>      HtmlRender render = getRender(session, pMeta, value);<a name="line.622"></a>
-<span class="sourceLineNo">623</span>      return render == null ? null : render.getStyle(session, value);<a name="line.623"></a>
-<span class="sourceLineNo">624</span>   }<a name="line.624"></a>
-<span class="sourceLineNo">625</span><a name="line.625"></a>
-<span class="sourceLineNo">626</span>   private static String getLink(BeanPropertyMeta pMeta) {<a name="line.626"></a>
-<span class="sourceLineNo">627</span>      return pMeta == null ? null : pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).getLink();<a name="line.627"></a>
-<span class="sourceLineNo">628</span>   }<a name="line.628"></a>
-<span class="sourceLineNo">629</span><a name="line.629"></a>
-<span class="sourceLineNo">630</span>   /*<a name="line.630"></a>
-<span class="sourceLineNo">631</span>    * Returns the table column headers for the specified collection of objects.<a name="line.631"></a>
-<span class="sourceLineNo">632</span>    * Returns null if collection should not be serialized as a 2-dimensional table.<a name="line.632"></a>
-<span class="sourceLineNo">633</span>    * 2-dimensional tables are used for collections of objects that all have the same set of property names.<a name="line.633"></a>
-<span class="sourceLineNo">634</span>    */<a name="line.634"></a>
-<span class="sourceLineNo">635</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.635"></a>
-<span class="sourceLineNo">636</span>   private static Object[] getTableHeaders(SerializerSession session, Collection c, HtmlBeanPropertyMeta hbpMeta) throws Exception {<a name="line.636"></a>
-<span class="sourceLineNo">637</span>      if (c.size() == 0)<a name="line.637"></a>
-<span class="sourceLineNo">638</span>         return null;<a name="line.638"></a>
-<span class="sourceLineNo">639</span>      c = session.sort(c);<a name="line.639"></a>
-<span class="sourceLineNo">640</span>      Object[] th;<a name="line.640"></a>
-<span class="sourceLineNo">641</span>      Set&lt;ClassMeta&gt; prevC = new HashSet&lt;ClassMeta&gt;();<a name="line.641"></a>
-<span class="sourceLineNo">642</span>      Object o1 = null;<a name="line.642"></a>
-<span class="sourceLineNo">643</span>      for (Object o : c)<a name="line.643"></a>
-<span class="sourceLineNo">644</span>         if (o != null) {<a name="line.644"></a>
-<span class="sourceLineNo">645</span>            o1 = o;<a name="line.645"></a>
-<span class="sourceLineNo">646</span>            break;<a name="line.646"></a>
-<span class="sourceLineNo">647</span>         }<a name="line.647"></a>
-<span class="sourceLineNo">648</span>      if (o1 == null)<a name="line.648"></a>
-<span class="sourceLineNo">649</span>         return null;<a name="line.649"></a>
-<span class="sourceLineNo">650</span>      ClassMeta&lt;?&gt; cm = session.getClassMetaForObject(o1);<a name="line.650"></a>
-<span class="sourceLineNo">651</span>      if (cm.getPojoSwap() != null) {<a name="line.651"></a>
-<span class="sourceLineNo">652</span>         PojoSwap f = cm.getPojoSwap();<a name="line.652"></a>
-<span class="sourceLineNo">653</span>         o1 = f.swap(session, o1);<a name="line.653"></a>
-<span class="sourceLineNo">654</span>         cm = cm.getSerializedClassMeta();<a name="line.654"></a>
-<span class="sourceLineNo">655</span>      }<a name="line.655"></a>
-<span class="sourceLineNo">656</span>      if (cm == null || ! cm.isMapOrBean())<a name="line.656"></a>
-<span class="sourceLineNo">657</span>         return null;<a name="line.657"></a>
-<span class="sourceLineNo">658</span>      if (cm.getInnerClass().isAnnotationPresent(HtmlLink.class))<a name="line.658"></a>
-<span class="sourceLineNo">659</span>         return null;<a name="line.659"></a>
-<span class="sourceLineNo">660</span>      HtmlClassMeta h = cm.getExtendedMeta(HtmlClassMeta.class);<a name="line.660"></a>
-<span class="sourceLineNo">661</span>      if (h.isNoTables() || (hbpMeta != null &amp;&amp; hbpMeta.isNoTables()))<a name="line.661"></a>
+<span class="sourceLineNo">575</span>                     out.oTag(i+3, "a").attrUri("href", m2.resolveVars(link)).cTag();<a name="line.575"></a>
+<span class="sourceLineNo">576</span>                  ContentResult cr = serializeAnything(session, out, value, pMeta.getClassMeta(), p.getKey().toString(), 2, pMeta, false);<a name="line.576"></a>
+<span class="sourceLineNo">577</span>                  if (cr == CR_NORMAL)<a name="line.577"></a>
+<span class="sourceLineNo">578</span>                     out.i(i+2);<a name="line.578"></a>
+<span class="sourceLineNo">579</span>                  if (link != null)<a name="line.579"></a>
+<span class="sourceLineNo">580</span>                     out.eTag("a");<a name="line.580"></a>
+<span class="sourceLineNo">581</span>                  out.eTag("td").nl(i+2);<a name="line.581"></a>
+<span class="sourceLineNo">582</span>               }<a name="line.582"></a>
+<span class="sourceLineNo">583</span>            }<a name="line.583"></a>
+<span class="sourceLineNo">584</span>            out.ie(i+1).eTag("tr").nl(i+1);<a name="line.584"></a>
+<span class="sourceLineNo">585</span>         }<a name="line.585"></a>
+<span class="sourceLineNo">586</span>         out.ie(i).eTag("table").nl(i);<a name="line.586"></a>
+<span class="sourceLineNo">587</span><a name="line.587"></a>
+<span class="sourceLineNo">588</span>      } else {<a name="line.588"></a>
+<span class="sourceLineNo">589</span>         out.oTag(i, "ul");<a name="line.589"></a>
+<span class="sourceLineNo">590</span>         if (! type2.equals("array"))<a name="line.590"></a>
+<span class="sourceLineNo">591</span>            out.attr(btpn, type2);<a name="line.591"></a>
+<span class="sourceLineNo">592</span>         out.append('&gt;').nl(i+1);<a name="line.592"></a>
+<span class="sourceLineNo">593</span>         for (Object o : c) {<a name="line.593"></a>
+<span class="sourceLineNo">594</span>            out.oTag(i+1, "li");<a name="line.594"></a>
+<span class="sourceLineNo">595</span>            String style = getStyle(session, ppMeta, o);<a name="line.595"></a>
+<span class="sourceLineNo">596</span>            String link = getLink(ppMeta);<a name="line.596"></a>
+<span class="sourceLineNo">597</span>            if (style != null)<a name="line.597"></a>
+<span class="sourceLineNo">598</span>               out.attr("style", style);<a name="line.598"></a>
+<span class="sourceLineNo">599</span>            out.cTag();<a name="line.599"></a>
+<span class="sourceLineNo">600</span>            if (link != null)<a name="line.600"></a>
+<span class="sourceLineNo">601</span>               out.oTag(i+2, "a").attrUri("href", link.replace("{#}", StringUtils.toString(o))).cTag();<a name="line.601"></a>
+<span class="sourceLineNo">602</span>            ContentResult cr = serializeAnything(session, out, o, eType.getElementType(), name, 1, null, false);<a name="line.602"></a>
+<span class="sourceLineNo">603</span>            if (link != null)<a name="line.603"></a>
+<span class="sourceLineNo">604</span>               out.eTag("a");<a name="line.604"></a>
+<span class="sourceLineNo">605</span>            if (cr == CR_NORMAL)<a name="line.605"></a>
+<span class="sourceLineNo">606</span>               out.ie(i+1);<a name="line.606"></a>
+<span class="sourceLineNo">607</span>            out.eTag("li").nl(i+1);<a name="line.607"></a>
+<span class="sourceLineNo">608</span>         }<a name="line.608"></a>
+<span class="sourceLineNo">609</span>         out.ie(i).eTag("ul").nl(i);<a name="line.609"></a>
+<span class="sourceLineNo">610</span>      }<a name="line.610"></a>
+<span class="sourceLineNo">611</span>   }<a name="line.611"></a>
+<span class="sourceLineNo">612</span><a name="line.612"></a>
+<span class="sourceLineNo">613</span>   private static HtmlRender&lt;?&gt; getRender(HtmlSerializerSession session, BeanPropertyMeta pMeta, Object value) {<a name="line.613"></a>
+<span class="sourceLineNo">614</span>      if (pMeta == null)<a name="line.614"></a>
+<span class="sourceLineNo">615</span>         return null;<a name="line.615"></a>
+<span class="sourceLineNo">616</span>      HtmlBeanPropertyMeta hpMeta = pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class);<a name="line.616"></a>
+<span class="sourceLineNo">617</span>      HtmlRender&lt;?&gt; render = hpMeta.getRender();<a name="line.617"></a>
+<span class="sourceLineNo">618</span>      if (render != null)<a name="line.618"></a>
+<span class="sourceLineNo">619</span>         return render;<a name="line.619"></a>
+<span class="sourceLineNo">620</span>      ClassMeta&lt;?&gt; cMeta = session.getClassMetaForObject(value);<a name="line.620"></a>
+<span class="sourceLineNo">621</span>      render = cMeta == null ? null : cMeta.getExtendedMeta(HtmlClassMeta.class).getRender();<a name="line.621"></a>
+<span class="sourceLineNo">622</span>      return render;<a name="line.622"></a>
+<span class="sourceLineNo">623</span>   }<a name="line.623"></a>
+<span class="sourceLineNo">624</span><a name="line.624"></a>
+<span class="sourceLineNo">625</span>   @SuppressWarnings({"rawtypes","unchecked"})<a name="line.625"></a>
+<span class="sourceLineNo">626</span>   private static String getStyle(HtmlSerializerSession session, BeanPropertyMeta pMeta, Object value) {<a name="line.626"></a>
+<span class="sourceLineNo">627</span>      HtmlRender render = getRender(session, pMeta, value);<a name="line.627"></a>
+<span class="sourceLineNo">628</span>      return render == null ? null : render.getStyle(session, value);<a name="line.628"></a>
+<span class="sourceLineNo">629</span>   }<a name="line.629"></a>
+<span class="sourceLineNo">630</span><a name="line.630"></a>
+<span class="sourceLineNo">631</span>   private static String getLink(BeanPropertyMeta pMeta) {<a name="line.631"></a>
+<span class="sourceLineNo">632</span>      return pMeta == null ? null : pMeta.getExtendedMeta(HtmlBeanPropertyMeta.class).getLink();<a name="line.632"></a>
+<span class="sourceLineNo">633</span>   }<a name="line.633"></a>
+<span class="sourceLineNo">634</span><a name="line.634"></a>
+<span class="sourceLineNo">635</span>   /*<a name="line.635"></a>
+<span class="sourceLineNo">636</span>    * Returns the table column headers for the specified collection of objects.<a name="line.636"></a>
+<span class="sourceLineNo">637</span>    * Returns null if collection should not be serialized as a 2-dimensional table.<a name="line.637"></a>
+<span class="sourceLineNo">638</span>    * 2-dimensional tables are used for collections of objects that all have the same set of property names.<a name="line.638"></a>
+<span class="sourceLineNo">639</span>    */<a name="line.639"></a>
+<span class="sourceLineNo">640</span>   @SuppressWarnings({ "rawtypes", "unchecked" })<a name="line.640"></a>
+<span class="sourceLineNo">641</span>   private static Object[] getTableHeaders(SerializerSession session, Collection c, HtmlBeanPropertyMeta hbpMeta) throws Exception {<a name="line.641"></a>
+<span class="sourceLineNo">642</span>      if (c.size() == 0)<a name="line.642"></a>
+<span class="sourceLineNo">643</span>         return null;<a name="line.643"></a>
+<span class="sourceLineNo">644</span>      c = session.sort(c);<a name="line.644"></a>
+<span class="sourceLineNo">645</span>      Object[] th;<a name="line.645"></a>
+<span class="sourceLineNo">646</span>      Set&lt;ClassMeta&gt; prevC = new HashSet&lt;ClassMeta&gt;();<a name="line.646"></a>
+<span class="sourceLineNo">647</span>      Object o1 = null;<a name="line.647"></a>
+<span class="sourceLineNo">648</span>      for (Object o : c)<a name="line.648"></a>
+<span class="sourceLineNo">649</span>         if (o != null) {<a name="line.649"></a>
+<span class="sourceLineNo">650</span>            o1 = o;<a name="line.650"></a>
+<span class="sourceLineNo">651</span>            break;<a name="line.651"></a>
+<span class="sourceLineNo">652</span>         }<a name="line.652"></a>
+<span class="sourceLineNo">653</span>      if (o1 == null)<a name="line.653"></a>
+<span class="sourceLineNo">654</span>         return null;<a name="line.654"></a>
+<span class="sourceLineNo">655</span>      ClassMeta&lt;?&gt; cm = session.getClassMetaForObject(o1);<a name="line.655"></a>
+<span class="sourceLineNo">656</span>      if (cm.getPojoSwap() != null) {<a name="line.656"></a>
+<span class="sourceLineNo">657</span>         PojoSwap f = cm.getPojoSwap();<a name="line.657"></a>
+<span class="sourceLineNo">658</span>         o1 = f.swap(session, o1);<a name="line.658"></a>
+<span class="sourceLineNo">659</span>         cm = cm.getSerializedClassMeta();<a name="line.659"></a>
+<span class="sourceLineNo">660</span>      }<a name="line.660"></a>
+<span class="sourceLineNo">661</span>      if (cm == null || ! cm.isMapOrBean())<a name="line.661"></a>
 <span class="sourceLineNo">662</span>         return null;<a name="line.662"></a>
-<span class="sourceLineNo">663</span>      if (h.isNoTableHeaders() || (hbpMeta != null &amp;&amp; hbpMeta.isNoTableHeaders()))<a name="line.663"></a>
-<span class="sourceLineNo">664</span>         return new Object[0];<a name="line.664"></a>
-<span class="sourceLineNo">665</span>      if (session.canIgnoreValue(cm, null, o1))<a name="line.665"></a>
-<span class="sourceLineNo">666</span>         return null;<a name="line.666"></a>
-<span class="sourceLineNo">667</span>      if (cm.isMap() &amp;&amp; ! cm.isBeanMap()) {<a name="line.667"></a>
-<span class="sourceLineNo">668</span>         Set&lt;Object&gt; set = new LinkedHashSet&lt;Object&gt;();<a name="line.668"></a>
-<span class="sourceLineNo">669</span>         for (Object o : c) {<a name="line.669"></a>
-<span class="sourceLineNo">670</span>            if (! session.canIgnoreValue(cm, null, o)) {<a name="line.670"></a>
-<span class="sourceLineNo">671</span>               if (! cm.isInstance(o))<a name="line.671"></a>
-<span class="sourceLineNo">672</span>                  return null;<a name="line.672"></a>
-<span class="sourceLineNo">673</span>               Map m = session.sort((Map)o);<a name="line.673"></a>
-<span class="sourceLineNo">674</span>               for (Map.Entry e : (Set&lt;Map.Entry&gt;)m.entrySet()) {<a name="line.674"></a>
-<span class="sourceLineNo">675</span>                  if (e.getValue() != null)<a name="line.675"></a>
-<span class="sourceLineNo">676</span>                     set.add(e.getKey() == null ? null : e.getKey());<a name="line.676"></a>
-<span class="sourceLineNo">677</span>               }<a name="line.677"></a>
-<span class="sourceLineNo">678</span>            }<a name="line.678"></a>
-<span class="sourceLineNo">679</span>         }<a name="line.679"></a>
-<span class="sourceLineNo">680</span>         th = set.toArray(new Object[set.size()]);<a name="line.680"></a>
-<span class="sourceLineNo">681</span>      } else {<a name="line.681"></a>
-<span class="sourceLineNo">682</span>         Map&lt;String,Boolean&gt; m = new LinkedHashMap&lt;String,Boolean&gt;();<a name="line.682"></a>
-<span class="sourceLineNo">683</span>         for (Object o : c) {<a name="line.683"></a>
-<span class="sourceLineNo">684</span>            if (! session.canIgnoreValue(cm, null, o)) {<a name="line.684"></a>
-<span class="sourceLineNo">685</span>               if (! cm.isInstance(o))<a name="line.685"></a>
-<span class="sourceLineNo">686</span>                  return null;<a name="line.686"></a>
-<span class="sourceLineNo">687</span>               BeanMap&lt;?&gt; bm = (o instanceof BeanMap ? (BeanMap)o : session.toBeanMap(o));<a name="line.687"></a>
-<span class="sourceLineNo">688</span>               for (Map.Entry&lt;String,Object&gt; e : bm.entrySet()) {<a name="line.688"></a>
-<span class="sourceLineNo">689</span>                  String key = e.getKey();<a name="line.689"></a>
-<span class="sourceLineNo">690</span>                  if (e.getValue() != null)<a name="line.690"></a>
-<span class="sourceLineNo">691</span>                     m.put(key, true);<a name="line.691"></a>
-<span class="sourceLineNo">692</span>                  else if (! m.containsKey(key))<a name="line.692"></a>
-<span class="sourceLineNo">693</span>                     m.put(key, false);<a name="line.693"></a>
-<span class="sourceLineNo">694</span>               }<a name="line.694"></a>
-<span class="sourceLineNo">695</span>            }<a name="line.695"></a>
-<span class="sourceLineNo">696</span>         }<a name="line.696"></a>
-<span class="sourceLineNo">697</span>         for (Iterator&lt;Boolean&gt; i = m.values().iterator(); i.hasNext();)<a name="line.697"></a>
-<span class="sourceLineNo">698</span>            if (! i.next())<a name="line.698"></a>
-<span class="sourceLineNo">699</span>               i.remove();<a name="line.699"></a>
-<span class="sourceLineNo">700</span>         th = m.keySet().toArray(new Object[m.size()]);<a name="line.700"></a>
-<span class="sourceLineNo">701</span>      }<a name="line.701"></a>
-<span class="sourceLineNo">702</span>      prevC.add(cm);<a name="line.702"></a>
-<span class="sourceLineNo">703</span>      boolean isSortable = true;<a name="line.703"></a>
-<span class="sourceLineNo">704</span>      for (Object o : th)<a name="line.704"></a>
-<span class="sourceLineNo">705</span>         isSortable &amp;= (o instanceof Comparable);<a name="line.705"></a>
-<span class="sourceLineNo">706</span>      Set&lt;Object&gt; s = (isSortable ? new TreeSet&lt;Object&gt;() : new LinkedHashSet&lt;Object&gt;());<a name="line.706"></a>
-<span class="sourceLineNo">707</span>      s.addAll(Arrays.asList(th));<a name="line.707"></a>
-<span class="sourceLineNo">708</span><a name="line.708"></a>
-<span class="sourceLineNo">709</span>      for (Object o : c) {<a name="line.709"></a>
-<span class="sourceLineNo">710</span>         if (o == null)<a name="line.710"></a>
-<span class="sourceLineNo">711</span>            continue;<a name="line.711"></a>
-<span class="sourceLineNo">712</span>         cm = session.getClassMetaForObject(o);<a name="line.712"></a>
-<span class="sourceLineNo">713</span>         if (cm != null &amp;&amp; cm.getPojoSwap() != null) {<a name="line.713"></a>
-<span class="sourceLineNo">714</span>            PojoSwap f = cm.getPojoSwap();<a name="line.714"></a>
-<span class="sourceLineNo">715</span>            o = f.swap(session, o);<a name="line.715"></a>
-<span class="sourceLineNo">716</span>            cm = cm.getSerializedClassMeta();<a name="line.716"></a>
-<span class="sourceLineNo">717</span>         }<a name="line.717"></a>
-<span class="sourceLineNo">718</span>         if (prevC.contains(cm))<a name="line.718"></a>
-<span class="sourceLineNo">719</span>            continue;<a name="line.719"></a>
-<span class="sourceLineNo">720</span>         if (cm == null || ! (cm.isMap() || cm.isBean()))<a name="line.720"></a>
-<span class="sourceLineNo">721</span>            return null;<a name="line.721"></a>
-<span class="sourceLineNo">722</span>         if (cm.getInnerClass().isAnnotationPresent(HtmlLink.class))<a name="line.722"></a>
-<span class="sourceLineNo">723</span>            return null;<a name="line.723"></a>
-<span class="sourceLineNo">724</span>         if (session.canIgnoreValue(cm, null, o))<a name="line.724"></a>
-<span class="sourceLineNo">725</span>            return null;<a name="line.725"></a>
-<span class="sourceLineNo">726</span>         if (cm.isMap() &amp;&amp; ! cm.isBeanMap()) {<a name="line.726"></a>
-<span class="sourceLineNo">727</span>            Map m = (Map)o;<a name="line.727"></a>
-<span class="sourceLineNo">728</span>            if (th.length != m.keySet().size())<a name="line.728"></a>
-<span class="sourceLineNo">729</span>               return null;<a name="line.729"></a>
-<span class="sourceLineNo">730</span>            for (Object k : m.keySet())<a name="line.730"></a>
-<span class="sourceLineNo">731</span>               if (! s.contains(k.toString()))<a name="line.731"></a>
-<span class="sourceLineNo">732</span>                  return null;<a name="line.732"></a>
-<span class="sourceLineNo">733</span>         } else {<a name="line.733"></a>
-<span class="sourceLineNo">734</span>            BeanMap&lt;?&gt; bm = (o instanceof BeanMap ? (BeanMap)o : session.toBeanMap(o));<a name="line.734"></a>
-<span class="sourceLineNo">735</span>            int l = 0;<a name="line.735"></a>
-<span class="sourceLineNo">736</span>            for (String k : bm.keySet()) {<a name="line.736"></a>
-<span class="sourceLineNo">737</span>               if (! s.contains(k))<a name="line.737"></a>
-<span class="sourceLineNo">738</span>                  return null;<a name="line.738"></a>
-<span class="sourceLineNo">739</span>               l++;<a name="line.739"></a>
-<span class="sourceLineNo">740</span>            }<a name="line.740"></a>
-<span class="sourceLineNo">741</span>            if (s.size() != l)<a name="line.741"></a>
-<span class="sourceLineNo">742</span>               return null;<a name="line.742"></a>
-<span class="sourceLineNo">743</span>         }<a name="line.743"></a>
-<span class="sourceLineNo">744</span>      }<a name="line.744"></a>
-<span class="sourceLineNo">745</span>      return th;<a name="line.745"></a>
-<span class="sourceLineNo">746</span>   }<a name="line.746"></a>
-<span class="sourceLineNo">747</span><a name="line.747"></a>
-<span class="sourceLineNo">748</span>   /**<a name="line.748"></a>
-<span class="sourceLineNo">749</span>    * Returns the schema serializer based on the settings of this serializer.<a name="line.749"></a>
-<span class="sourceLineNo">750</span>    * @return The schema serializer.<a name="line.750"></a>
-<span class="sourceLineNo">751</span>    */<a name="line.751"></a>
-<span class="sourceLineNo">752</span>   @Override /* XmlSerializer */<a name="line.752"></a>
-<span class="sourceLineNo">753</span>   public HtmlSerializer getSchemaSerializer() {<a name="line.753"></a>
-<span class="sourceLineNo">754</span>      if (schemaSerializer == null)<a name="line.754"></a>
-<span class="sourceLineNo">755</span>         schemaSerializer = new HtmlSchemaDocSerializer(propertyStore, getOverrideProperties());<a name="line.755"></a>
-<span class="sourceLineNo">756</span>      return schemaSerializer;<a name="line.756"></a>
-<span class="sourceLineNo">757</span>   }<a name="line.757"></a>
-<span class="sourceLineNo">758</span><a name="line.758"></a>
-<span class="sourceLineNo">759</span><a name="line.759"></a>
-<span class="sourceLineNo">760</span>   //--------------------------------------------------------------------------------<a name="line.760"></a>
-<span class="sourceLineNo">761</span>   // Entry point methods<a name="line.761"></a>
-<span class="sourceLineNo">762</span>   //--------------------------------------------------------------------------------<a name="line.762"></a>
+<span class="sourceLineNo">663</span>      if (cm.getInnerClass().isAnnotationPresent(HtmlLink.class))<a name="line.663"></a>
+<span class="sourceLineNo">664</span>         return null;<a name="line.664"></a>
+<span class="sourceLineNo">665</span>      HtmlClassMeta h = cm.getExtendedMeta(HtmlClassMeta.class);<a name="line.665"></a>
+<span class="sourceLineNo">666</span>      if (h.isNoTables() || (hbpMeta != null &amp;&amp; hbpMeta.isNoTables()))<a name="line.666"></a>
+<span class="sourceLineNo">667</span>         return null;<a name="line.667"></a>
+<span class="sourceLineNo">668</span>      if (h.isNoTableHeaders() || (hbpMeta != null &amp;&amp; hbpMeta.isNoTableHeaders()))<a name="line.66

<TRUNCATED>


Mime
View raw message