Hi Paul;
I IceBreak you can accomplish that by the IceBreak build-in RPG feature that provides a data sore directly for ExtJS, jQuery or just plain HTML, CSV or XML. I looks as simple as:
…
Begsr getRows;
sqlCmd = 'Select * from Cust where name like ''%JOHN%'' ';
SQL_Execute(
I_EXTJSMETA: //' Return the resultset in extJS format including metadata
sqlCmd: //' The SQL statement to run "Select ..."
limit: //' Max number of rows to return
start //' Starting from row number
);
Endsr;
This "one-liner" produces a JSON response directly to the client. The positioning in the "start" parameter is used for the positioning and limit i used as the number of rows int the resulting grid pr time … just like a subfile..
I have placed your search input field, so you can preselect any values from any rows in your position to….
You can try the code here, where it serves a paging grid for ExtJs:
http://systest.icebreak.org/paul.rpgle
Best regards
Niels Liisberg
Chief Software Architect
System & Method
Håndværkersvinget 8
DK-2970 Hørsholm
Phone: +45 70 20 30 10
Fax: +45 70 20 30 11
Direct: +45 45 166 135
Mobile: +45 31 158 861
E-mail: nli@xxxxxxxxxxxxxxxxx
Web: www.system-method.com and www.Icebreak.org
“Everything should be made as simple as possible, but not simpler.”
— Albert Einstein
From: "Holm, Paul" <pholm@xxxxxxxxxxxxxxxxx<mailto:pholm@xxxxxxxxxxxxxxxxx>>
Reply-To: AS400 iSeries <web400@xxxxxxxxxxxx<mailto:web400@xxxxxxxxxxxx>>
Date: Thu, 12 Dec 2013 18:24:14 +0100
To: AS400 iSeries <web400@xxxxxxxxxxxx<mailto:web400@xxxxxxxxxxxx>>
Subject: [WEB400] "Position To:" Design Challenge with SQL
All,
I'm interested if anyone has worked on a design to enable "position to"
type of web searches. Any insight or gotchas would be appreciated. We
have a series of requirements that require a web search but with the
ability to scroll up or down from that key value position. I know RPG does
this but we need an SQL based solution.
To further explain the need...Assume you have a database table of all
people living in the US. We want to be able to search based on a number of
criteria such as "state". So I search for "MINNESOTA" and I'm presented
with a list/subfile of people living in MN. Example SQL: SELECT * FROM
US_PEOPLE where STATE = "MN" order by STATE, LASTNAME
Now they want to "scroll up" in the list which should then display people
in "MICHIGAN" . The issue is "MICHIGAN" is not in my result set. If I
scrolled down thru MN then I would see "Mississippi".
We are dealing with large tables so we need to make the searches perform.
We also obviously are looking for a "generic" design so it can be used for
numerous inquiry applications... Anyone have experience?
Thanks in advance, Paul Holm
www.planetjavainc.com
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx<mailto:WEB400@xxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx<mailto:WEB400-request@xxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.