View Full Version : JSON Configuration Blocks Question???

27 Aug 2009, 7:14 AM
Hello all, first post. Been reading a lot and trying to digest some of this stuff.

I am writing an app and would like to configure my app (viewport) and depending on user level show the applicaple viewport based on their permissions.

My question is this. The following post from Animal was in another thread.


The application's HTML file will be about 7 lines long.

You will write your server side application to be able to provide, on-demand, JSON configuration blocks for every component (what used to be called "page").

The client-side application manager that you set up will request these, and insert them into the center region of the Viewport.

How do I set my object up to use the JSON configuration block sent back from server??

I understand the concept but don't understand how to implement it. I have searched the forums and looked at the APIs but don't know where to go from here.


27 Aug 2009, 1:17 PM
Scott -

You can use the standard Ext.Container add method to add configuration literals describing your component.

Therefore if you were adding some components to a Panel your code might look like so:

// response is an AJAX response object
var obj = Ext.decode(response.responseText);