Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<html xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>toScript
         (VDL Documentation)
         
      </title>
      <meta name="keywords" content="$title">
      <link rel="stylesheet" type="text/css" href="../css/stylesheet.css" title="Style">
   </head><script>
                        function asd()
                        {
                        parent.document.title="toScript (VDL Documentation)";
                        }
                    </script><body bgcolor="white" onload="asd();"><a name="navbar_top"></a><table border="0" width="100%" cellpadding="1" cellspacing="0">
         <tr>
            <td COLSPAN="3" BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><a NAME="navbar_top_firstrow"></a><table BORDER="0" CELLPADDING="0" CELLSPACING="3">
                  <tr ALIGN="center" VALIGN="top">
                     <td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;
                        <a href="../overview-summary.html"><font CLASS="NavBarFont1"><b>Overview</b></font></a>
                        &nbsp;
                        
                     </td>
                     <td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;
                        <a href="tld-summary.html"><font CLASS="NavBarFont1"><b>Library</b></font></a>
                        &nbsp;
                        
                     </td>
                     <td BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<font CLASS="NavBarFont1Rev">
                           &nbsp;Tag&nbsp;</font>&nbsp;
                        
                     </td>
                     <td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;
                        <a HREF="../help-doc.html"><font CLASS="NavBarFont1"><b>Help</b></font></a>
                        &nbsp;
                        
                     </td>
                  </tr>
               </table>
            </td>
            <td ALIGN="right" VALIGN="top" ROWSPAN="3"><em></em></td>
         </tr>
         <tr>
            <td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2"></font></td>
            <td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2">
                  &nbsp;
                  <a HREF="../index.html" TARGET="_top"><b>FRAMES</b></a>
                  &nbsp;
                  &nbsp;
                  <a href="toScript.fn.html%0A                                            " target="_top"><b>NO FRAMES</b></a>
                  &nbsp;
                  <script></script><noscript><a HREF="../alltags-noframe.html" TARGET=""><b>All Tags</b></a></noscript></font></td>
         </tr>
      </table>
      <hr>
      <h2><font size="-1">rich</font><br>
         Function
         toScript
      </h2><code>java.lang.String<b>&nbsp;toScript</b>
         (java.lang.Object)</code><hr>Convert any Java Object to JavaScript representation, converting types properly, e.g.: <ul> <li><tt>Java primitives</tt></li>
      <li><tt>Arrays: toScript(new int[] { 1, 2, 3 }) -&gt; [1, 2, 3]</tt></li> <li><tt>Collections (sets, lists): toScript(Arrays.asList(new
      int[] { 1, 2, 3 })) -&gt; [1, 2, 3]</tt></li> <li><tt>Maps: toScript((Map&lt;String, String&gt;)map) -&gt; {\"a\":\"foo\",\"b\":\"bar\",\"c\":\"baz\"}</tt></li>
      <li> <tt>Beans / Objects: toScript(new Bean[] { new Bean(1, true, "bar") }) -&gt; [{\"bool\":true,\"foo\":\"bar\",\"integer\":1}]</tt>
      </li> <li><tt>Dates and Timezones</tt></li> <li><tt>Combinations of above</tt></li> </ul> This function delegates to org.ajax4jsf.javascript.ScriptUtils#toScript(Object)<br><p></p>
      <hr>
      <table border="1" cellpadding="3" cellspacing="0" width="100%">
         <tr bgcolor="#CCCCFF" class="TableHeadingColor">
            <td colspan="2"><font size="+2"><b>Function Information</b></font></td>
         </tr>
         <tr>
            <td>Function Class</td>
            <td>org.richfaces.function.RichFunction</td>
         </tr>
         <tr>
            <td>Function Signature</td>
            <td>java.lang.String toScript(java.lang.Object)</td>
         </tr>
         <tr>
            <td>Display Name</td>
            <td><i>None</i></td>
         </tr>
      </table><br><p></p><a name="navbar_bottom"></a><table border="0" width="100%" cellpadding="1" cellspacing="0">
         <tr>
            <td COLSPAN="3" BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><a NAME="navbar_bottom_firstrow"></a><table BORDER="0" CELLPADDING="0" CELLSPACING="3">
                  <tr ALIGN="center" VALIGN="top">
                     <td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;
                        <a href="../overview-summary.html"><font CLASS="NavBarFont1"><b>Overview</b></font></a>
                        &nbsp;
                        
                     </td>
                     <td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;
                        <a href="tld-summary.html"><font CLASS="NavBarFont1"><b>Library</b></font></a>
                        &nbsp;
                        
                     </td>
                     <td BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<font CLASS="NavBarFont1Rev">
                           &nbsp;Tag&nbsp;</font>&nbsp;
                        
                     </td>
                     <td BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    &nbsp;
                        <a HREF="../help-doc.html"><font CLASS="NavBarFont1"><b>Help</b></font></a>
                        &nbsp;
                        
                     </td>
                  </tr>
               </table>
            </td>
            <td ALIGN="right" VALIGN="top" ROWSPAN="3"><em></em></td>
         </tr>
         <tr>
            <td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2"></font></td>
            <td BGCOLOR="white" CLASS="NavBarCell2"><font SIZE="-2">
                  &nbsp;
                  <a HREF="../index.html" TARGET="_top"><b>FRAMES</b></a>
                  &nbsp;
                  &nbsp;
                  <a href="toScript.fn.html%0A                                            " target="_top"><b>NO FRAMES</b></a>
                  &nbsp;
                  <script></script><noscript><a HREF="../alltags-noframe.html" TARGET=""><b>All Tags</b></a></noscript></font></td>
         </tr>
      </table>
      <hr><small><i>
            Output Generated by
            <a href="http://taglibrarydoc.dev.java.net/" target="_blank">Tag Library Documentation
               Generator</a>.
            Java, JSP, and JavaServer Pages are trademarks or
            registered trademarks of Sun Microsystems, Inc. in the US and other
            countries. Copyright 2002-4 Sun Microsystems, Inc.
            4150 Network Circle
            Santa Clara, CA 95054, U.S.A.
            All Rights Reserved.
            </i></small></body>
</html>
New to GrepCode? Check out our FAQ X