title: Reusing SAPUI5 control
body: <p>I have an image and I need to use it at three places in a page. I can create three image objects and use them separately at the required places. However, I need to know if there is any way to reuse the single image object at three places. I tried to use prototype property of javascript but it is not working. I initially tried this but only footer gets the image.</p>
  
  <pre><code>var image = new sap.m.Image("id_image",{
          src:"images/myImage.png"
      });
  return new sap.m.Page("id_page",{
          enableScrolling:false,
          customHeader:new sap.m.Bar("id_headerbar",{
              contentRight:image
          }),
          content: [
  
          ],
          footer:new sap.m.Bar("id_footerbar",{
              contentLeft:image
          }),
      });
  </code></pre>
  
  <p>I tried to use the prototype property :</p>
  
  <pre><code>   var image = new sap.m.Image();
     image.prototype.src = "./images/myImage.png";
  </code></pre>
  
  <p>But it says: Cannot set property 'src' of undefined.
  Please help.</p>