title: How can I open a dialog when the page is opened
body: <p>In one of our page we have a search button that open a search dialog so that the users can search and import some data from a remote system.</p>
  
  <p>Now got I new requirement that this same dialog must be showed every time the page is opened - but only when the page will be used to create a new registry, in the update mode it should be showed only if the user click the button.</p>
  
  <p>I've already tried some things, I can call the dialog by MB using Primefaces engine as below:</p>
  
  <pre><code> RequestContext.getCurrentInstance().execute("dialogArmaBos.show()")
  </code></pre>
  
  <p>This command Works great for the button case, but I can get it working when the page opens. If I try to use in the PostConstruct nothing happens.</p>
  
  <p>I tried also <code>&lt;f:event type="preRenderView" ...</code> with <code>&lt;f:metadata ...</code> but nothing changes too.</p>
  
  <p>Is there some way to make it?</p>