Jump to content
denisduval75

Primefaces commandlink : window.onload

Recommended Posts

I use JSF (2.2) and Primefaces (6.1.2) frameworks.

In a page I display charts (chart.js) and I have to use window.onload for loading.

The page is called by p: commandLink but window.onload does not work.

Can you help me please ?

Thank you.

My code:

<p:commandLink value="Espace standard" 
               style="position: absolute; top: 455px; left: 700px"
               action="pageGraphiqueEspaceStandard.xhtml" 
               actionListener="#{utilitaireManagerBean.initialiserPageCourante('graphiqueEspaceStandard')}"/>
<script type="text/javascript">
        window.onload = function ()
          {
            drawChart('espaceStandardGraphique1', 'idCanvasGraphique1');
            drawChart('espaceStandardGraphique2', 'idCanvasGraphique2')
          };
</script

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...