title: passing Struts 2 property to javascript method : getting weird values
body: <p>In this example i wont to pass a property value (action attribute) to my js function like this:</p>
  
  <p>Here is my Action class:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class XXXX {
  
      private List&lt;String&gt; numberCanBuyList;
      private float price;
  
      all getters and setters are used
  }
  </code></pre>
  
  <p>Here is my jsp page:</p>
  
  <pre class="lang-jsp prettyprint-override"><code>&lt;s:hidden id="priceUnit" name="priceUnit" value="price"/&gt;
  &lt;s:select id="canBuylist" name="bundle" list="numberCanBuyList" theme="simple" onChange="javascript:updateProperty('%{#priceUnit}')"&gt;
  .....
  &lt;script type="text/javascript"&gt;
  function updateProperty(n)
  {   
  var b = document.getElementById("canBuylist").value;
  alert(n); 
  alert(b);
  }
  </code></pre>
  
  <p><strong><em>alert(n) show me : %{#priceUnit} and not the real value</em></strong> I'm doing wrong ?</p>
  
  <p>I try also something like this, and i get the same behavior:</p>
  
  <pre><code>onChange="updateProperty(price)"&gt; show me price
  onChange="updateProperty('%{price}')"&gt; show me %{price}
  </code></pre>