Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Add permanent request property

$
0
0
I have an application that is used to manage data for multiple sites. The application's outmost widget is a TabSet with tabs for each site. The user is only administrating one site at a time. Each table in the database has a field that identifies for which site it is. What I would like to do, is set a "permanent" request parameter when a tab is selected so that requests include that site identifier.

So, each table in the database has a field "site_code", with data like "shop_x", "shop_y" or "shop_z". The web application should include the site code in each request.

What I now have is global variable (actually, an property on the window object) with the active site code. On tabSelected of the application's outmost widget I change that active site code. In the transformRequest() method of each data source I include the request parameter based on the global variable.

Is this correct? Or is there something like isc.DataSource.setDefaultRequestParameters()?

Viewing all articles
Browse latest Browse all 4756

Trending Articles