[Paraview] No rendering in ParaviewWeb with javascript

Purohit, Sumit Sumit.Purohit at pnnl.gov
Thu Oct 25 16:48:08 EDT 2012


Thanks Seb,

I realized that i was running my html page  under Apache but it was not properly configured to talk to paraviweWeb which is under. tomcat. I Fixed that and i worked fine. Thanks

My goal is to add  this code under a Mediawiki Page and run it on a button click BUT when i do that i get "uncaught exception: get_module() takes no arguments (2 given). Paraview.js line 231"

I see one deference in the way internal paraviewWeb POST calls are made.

1. When running outside Mediawiki (This Works) : 
  {id:3,method:"VisualizationsManager.invoke",params:["87095ed9081c5fc32c76f43105d74c32-28", "{\"id\":1,\"method\":\"get_module\",\"params\":[]}"]}

2. Within MW ( This gives above exception)
{id:3,method:"VisualizationsManager.invoke",params:["87095ed9081c5fc32c76f43105d74c32-27", "{\"id\":1,\"method\":\"get_module\",\"params\":\"[]\"}"]}

the difference is  how empty param are specified in both the POST requests.   [] Vs. \"[]\"

Both are made internally by ParaViewWeb, so do you think i can control this in my javascript ( actually jQuery) code ?? OR on ParaviewWeb code/config side ??


Thanks
Sumit Purohit



________________________________________
From: Sebastien Jourdain [sebastien.jourdain at kitware.com]
Sent: Wednesday, October 24, 2012 4:33 AM
To: Purohit, Sumit
Cc: paraview at paraview.org
Subject: Re: [Paraview] No rendering  in ParaviewWeb with javascript

Try to move the script section between </table> and </body> . Moreover does the other applications let you properly see 3d content?

Seb

On Oct 23, 2012, at 4:08 PM, "Purohit, Sumit" <Sumit.Purohit at pnnl.gov> wrote:

> Hi Everyone,
>
> I am a newbie (and this is a cliche ) in paraview and trying to run ParaViewWeb using javascript rendering.
> I installed the Paraview Web and i can access various webapps Ex :
>
> http://localhost:8180/PWApp/index.jsp
> http://localhost:8180/PWService/
>
> [ i installed ParaviewWeb on port 8180]
>
> As a next step i am tried to use its javascript rendering but could not see any thing on the page.
> JavaScript console shows "Error: Connection failed" in line 116 ParaviewWeb.js
>
> Here is my complete HTML
> <html>
>     <head>
>         <script type="text/javascript" src="http://localhost:8180/PWService/js/ParaViewWeb.js"></script>
>     </head>
>     <body>
>       <table width='100%'>
>        <tr>
>           <td>Viewport title</td>
>        </tr>
>        <tr>
>           <td id='renderer-container-id'>
>               <!-- The renderer will be inserted here -->
>
>    <script type="text/javascript">
>         // Set the web service base URL
>         var serverUrl = "http://localhost:8180/PWService";
>
>         //
>         // Create a paraview proxy
>         //
>         var paraview = new Paraview(serverUrl);
>         paraview.createSession("Session name", "Session comment", "default");
>
>         var activeView = paraview.CreateIfNeededRenderView();
>
>         // Create and bind renderer
>         var renderer = new JavaScriptRenderer("rendererName", serverUrl);
>         renderer.init(paraview.sessionId, activeView.__selfid__);
>         renderer.setSize('200','200');
>         renderer.bindToElementId("renderer-container-id");
>         renderer.start();
>      </script>
>           </td>
>        </tr>
>        </table>
>     </body>
> </html>
>
> Thank you for the help.
> Sumit Purohit
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list