× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi guys.
I'm old on Ibm I (since 1989) but new to this world approach.
I follow all threads, I've installed almost everything but...
But I can not find the 'Filo di Arianna' thread of Ariadne.

I seem to be missing something to come full circle and be productive.
Problems with the instruments, Editor Notepad + + is not the best.
I copy sources such as those here 'below (with great difficulty in the emails are not formatted) and then.? and then I do not know what to call them, where to put them etc. .. So 'I lose time and frustration grows.
In the end I would try to have a program that creates a rpg json file with all the details to display a grid with subtotals, or a dashboard with two graphs, statistics or a simple registry to give to customers to research more 'easy.

The one below is fine you could replicate all of the DDS PF and LF as a data store automatically, and use them or copy shall include in the definition of JS grids as the need of AS400 in RPG. But they are very far even figure out how to do it.

Thank you, I follow you all are very good.!

-----Messaggio originale-----
Da: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] Per conto di Henrik Rützou
Inviato: sabato 12 gennaio 2013 13:32
A: Web Enabling the IBM i (AS/400 and iSeries)
Oggetto: Re: [WEB400] Single Page Web Web Apps

Kevin,



What I think Aaron means is that in EXT JS we have something called a Data Store. A Data Store is an object that not only holds the data but also has a lot of functionality like any other OO javascript object.



When you define a new Data Store you have to configure it with metadata that describes the JSON object it receives.



In an EXTJS Grid you point the grid to a Data Store but you also have to define your columns in the grid and in that process point to the Data Stores description of the JSON object that is within the Data Store Object.



So what you do is (very simplified) …



myDataStore = new ExtDataStore(ServerResource,JSONMetaData);

myGrid = new ExtGrid(JSONGridColumnDescription,myDataStore);

show(myGrid);



You have now coupled the Grid to the Data Store and thereby to the ServerResource so anything you do in the Grid will automatically be coupled to the Data Store that then communicates with the server without you need to do anything.



Let’s try to define the special elements in the above code:



ServerResource = URL to the REST/CRUD service on the server

JSONMetadata = a JSON metadata definition of the data that is communicated between the server and the Data Store

JSONGridColumnDescription = a JSON metadata definition that describes the columns in the grid (header, width, type etc.)



Now let’s try to make the above code into generic code:



First we don’t describe the metadata in the Data Store in the javascript code. In order to do so, we let the server describe the data it sends. So the server sends a JSON object with a Metadata section and a Data (row) section.



We also let the server send the URL to the Server Resource in a configuration object when it launches the initial code:



myDataStore = new ExtDataStore(Config(‘serverResource’,’URLerror’));



function Config(property,pdefault) {

switch (property) {

case 'serverResource' : return '/pextcgi/pxsvpxwa.pgm';

default : return pdefault;

}

}



We also let the server send a grid column description in an OO Javacript object that returns the JSON Grid Column description with a fixed function name, let’s call it “ServerGenGridDesc”



Now we can launch the grid with the following generic code:



myDataStore = new ExtDataStore(Config(‘serverResource’,’URLerror’));

myGrid = new ExtGrid(ServerGenGridDesc(),myDataStore);

show(myGrid);



// generated by server at launch

function Config(property,pdefault) {

switch (property) {

case 'serverResource' : return '/pextcgi/pxsvpxwa.pgm';

default : return pdefault;

}

}



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.