How to access the property bag in Javascript?
<p>I want to access my property bag using Javascript from a 

<pre><code> &lt;CommandUIHandler
          Command="FCS.Intake.Tab.Reports.TL"
          CommandAction="javascript:
          function getWebProperty() {

        var ctx = new SP.ClientContext.get_current();
        var web = ctx.get_site().get_rootweb();
        this.props =  web.get_allProperties();
        this.props.set_item('aProperty', 'it worked!');
        ctx.load(web);

        ctx.executeQueryAsync(Function.createDelegate(this, gotProperty), Function.createDelegate(this, failedGettingProperty));
    }

    function gotProperty() {
        alert(this.props.get_item('aProperty'));
    }

    function failedGettingProperty() {
        alert('failed');
    }
  getWebProperty();"
        /&gt;
</code></pre>

<p>But I am getting an error saying " Object has no method 'get_rootweb'. I imagine this is because I haven't registered the sp.js library. If thats the problem, how would I register the sp.js library inside my elements.xml file? (Its all contained inside a  element. If thats not the problem, is there a better way to access the property bag using javascript inside a  element?</p>
