Getlist listbox array

This forum is for eXpress++ general support.
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Getlist listbox array

#1 Post by c-tec »

Hello,
I try to make a own HTML output from a getlist for my webinterface. I know DRCREAD HTML, but need some special things because I use Metro UI. I am actually successful with says, gets and buttons. Actually I have two problems.
I make a dialog with DCREAD GUI EXIT SAVE, destroy the dialog object and parse the getlist. But the dialog flashes when creating, can I avoid this ? I need it working like DCREAD HTML .
The second problem is getting the arry from a DCLISTBOX with the values, I would like to make a HTML select with this values, where in the getlist I can find it ?
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Getlist listbox array

#2 Post by rdonnay »

But the dialog flashes when creating, can I avoid this ?
DCGETOPTONS HIDE
The second problem is getting the arry from a DCLISTBOX with the values,
That is stored in element 31 of the Getlist ( bGETLIST_REFVAR )

nElement := AScan( GetList, {|a|a[nGETLIST_TYPE] == GETLIST_LISTBOX})
aList := Getlist[ nElement, bGETLIST_REFVAR )

IF Valtype(aList) == 'B'
aList := Eval(aList)
ENDIF
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Getlist listbox array

#3 Post by c-tec »

Hello Roger,
thank you, works great now. I can now convert some important controls from the getlist array to HTML like you do it with DCREAD DCHTML with absolut positioning the controls. Attached some screenshots from my XB2NET webserver with eXpress++ UI and source and HTML result. The function that converts a getlist to HTML has only a few lines of code, so it is again fascinating what is possible with eXpress++. The next step is to integrate a table control with jquery datatables and parsing DCBROWSE in a getlist. I think here I will need your help again.
regards
Rudolf
Attachments
2017-04-20_08h48_33.png
2017-04-20_08h48_33.png (58.01 KiB) Viewed 18208 times
2017-04-20_08h49_00.png
2017-04-20_08h49_00.png (58.88 KiB) Viewed 18208 times
2017-04-20_08h47_20.png
2017-04-20_08h47_20.png (34.9 KiB) Viewed 18208 times
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Getlist listbox array

#4 Post by skiman »

Hi Rudolf,

This looks great.

Is your parsegetlist() function using DC_ReadHtml()?
Best regards,

Chris.
www.aboservice.be

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Getlist listbox array

#5 Post by c-tec »

Hello,
fist step with browser
regards
Rudolf
Attachments
2017-04-20_10h05_13.png
2017-04-20_10h05_13.png (79.55 KiB) Viewed 18207 times
2017-04-20_10h04_58.png
2017-04-20_10h04_58.png (49.68 KiB) Viewed 18207 times
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Getlist listbox array

#6 Post by rdonnay »

Rudolf -

That is an interesting technique for generating HTML code.
It would not have occurred to me to go in that direction.

What are you doing with the result?
Are you using DCHTMLVIEWER to display it in a web browser?

I have added a new command: DCHTMLWINDOW in build 265.

This is a much lighter HTML viewer.
I am using it in a wizard.
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Getlist listbox array

#7 Post by c-tec »

Hello Roger,
I use it for my special webserver with XB2NET, but the resulting code you can use for all things that are using HTML. It is also easy to transfer the code to jquery mobile. So I could check the browser settings to see which interface I build for the response to the browser. With Javascript it is also possible to translate other things from eXpress++ to HTML code, I have also successfull implemented xmlhttprequest for some things like updating tables after editing. I think you could help to make much more from this basics, so no problem to send you the code. I have also a generic interface to fill the fields and tables with SQL querys or DBF tables and read the result back to the application. For me the Metro UI has a very nice GUI, but the dialogs can also use any other Javascript lib for building dialogs. The really complicated things were the Javascript things, but I think I have most of the problems solved.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Getlist listbox array

#8 Post by skiman »

Hi Rudolf, Roger,

It looks as Rudolf found the way to create xbase applications for the web. :clap:
- Easy to create the screens for each Xbase programmer.
- Updating the tables after editing.

Using it in combination with DCHTMLWINDOW can maybe result in a desktop application with the modern look of a webapplication? This could be the most important Xbase++ step of the last decade.

The base of this is already in eXPress for at least 10 years. It looks as nobody was aware of the power of this. We were (and still are) waiting for Alaska, and didn't realise that we had it under the hood of eXPress++.

I'm interested in this technique.
Best regards,

Chris.
www.aboservice.be

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Getlist listbox array

#9 Post by c-tec »

Hello Chris,
eXpress++ is perfect for such things. The method with the getlists has a lot of possibilities for interesting addons. I have added now some more controls like switch style checkboxes, edit and delete icons in the browser, browse editing in a separate window etc. It is also possible to add menus and tabpages from the getlist, but the most complicated thing is the session handling, I have to take care about all datasources and record pointers in the sessions. I have solved much things, but still a lot of work to make it perfect. This needs a Javascript profi.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Getlist listbox array

#10 Post by skiman »

Hi,

Yes, session handling and record pointers are not so easy. We have a system which is using hidden vars in the html. When we create the html file, we add some extra info.

Code: Select all

<input name="_SID" type=hidden value="_ID_" />
<input name="file" type=hidden value="klant" />
<input name="parent" type=hidden value="<[str(klant->(recno()))]>" />
<input name="record" type=hidden value="<[str(klant->(recno()))]>" />
<input type="hidden" name="scope" value="_SCOPE_"  />
So after an edit, we know which record we have to update. Our problem is the creation of the screen that takes too much time. If we could do this in Xbase++ it would make it easier.
Best regards,

Chris.
www.aboservice.be

Post Reply