Profile Picture

Extra postback in Nevron web part?

Posted By Dan Jordan 9 Years Ago
Author
Message
Dan Jordan
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 4, Visits: 2
I have a web part page that includes a Nevron Chart for SharePoint web part. I use a custom-developed web part that provides parameters to the Nevron web part using JavaScript, since this option seems to perform better than using connected web parts.

The page is functional but it's slow. When I look at the calls going back and forth to the server via Fiddler, I see the following:

POST /_layouts/Nevron/Chart/NChartCommander.aspx HTTP/1.1 (initial call; parameter not set yet)

POST /_layouts/Nevron/Params/NParamsCommander.aspx HTTP/1.1 (set parameters here)

POST /_layouts/Nevron/Chart/NChartCommander.aspx HTTP/1.1 (final call to web part with parameters)

It appears that the text of the request in the first and second calls to NChartCommander.aspx is identical.

Is there a way to dispense with the first call to NChartCommander.aspx, since the parameters aren't known at that point and won't be until I set them with JavaScript after the page loads?

Thanks in advance,
Dan Jordan

Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)Supreme Being (4,063 reputation)

Group: Forum Members
Last Active: 1 days ago @ 7:47 AM
Posts: 2,945, Visits: 3,303
Hi Jordan,

Yes - using custom parameters with Nevron JScipt are usually performing better than connected webparts, since the latter perform a complete postback to force the page to go through the web parts connection phase (page pre-render).

The client side will initiate a InitXXXParam POST request, after a certain delay, any time you call the respective NInitXXXParam method. The delay is needed for a multiple params on the page to be grouped in a single Init Request to the server, so the initial POST that you get is perhaps from a global script block, that gets executed when you load the page.

Can you please elaborate on the client side scipt that you use to Init/Set Nevron parameters and to respectively refresh the Nevron webparts. Please note that Nevron parameters are by default initialized to REFRESH ALL Nevron WebParts when any paramter changes. However you can init parameters do not refresh the webparts - to force a refresh of the webparts that use this parameters you can call the NRefreshWebPart method.

See this topic in the help:
Building Dashboards > Parameters in SharePoint Pages > Custom Parameters with Nevron JavaScript API

Best Regards,
Nevron Support Team



Dan Jordan
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 6 Years Ago
Posts: 4, Visits: 2

Thank you for responding.

When I define the parameters using the NInitSTRParam JavaScript functions, I explicitly set them to not autorefresh (using RefreshMode of "none"), because I want to control when that happens -- once all content is loaded on the page with the exception of Nevron charts (for the initial values in the filter web part) and then whenever the user changes the values in the filter web part. In either of those cases, I call the NRefreshAllWebParts JavaScript function to refresh the content in any Nevron charts on the page. This part seems to be working properly, as far as I can tell.

It looks like that in this case, however, a call is still being made to NChartCommander.aspx before the parameters are set. I'm just trying to figure out whether that initial call can be postponed until the parameters are set (thus saving a round trip to the server) or I just have to live with it the way it is.

Thanks again,

Dan Jordan

 





Similar Topics


Reading This Topic