Re: What Java library or dll can be used to develop a WEB GUI in Xbase++?
Posted: Mon Apr 25, 2022 4:32 pm
Thank you very much,
Roger, RDONNAY.
Roger, RDONNAY.
Donnay Software Web Forums
http://bb.donnay-software.com/donnay/
http://bb.donnay-software.com/donnay/viewtopic.php?f=15&t=3009
Code: Select all
...
DBOPEN("FOXCDX",{{{"supplier"},{"supplier","id"}}},,,.T.)
DBEVAL({|| AADD(aData, {supplier_i,company_na,contact_na,phone})})
**
html = HAPAGEBGN({"files/powerweb.css"},{"files/powerweb.js"},,,"Table Demo") +;
"<H1>Table Demo</H1>" + chrCRLF +;
HTABLE({10,,"R"},aData,aCols,,"Suppliers",,,,,,.T.) +;
...
Code: Select all
FUNCTION Cars(oSrv)
**
LOCAL aCaps,aCols,aCData,html
**
SETCFG(HASSNGET(oSrv,"Lang"),,pwReg)
SET PATH TO (HASSNGET(oSrv,"Path"))
DBOPEN("DBFNTX",{{{"Cars"},{"Cars"}}},,,.T.)
IF(EMPTY(HASSNGET(oSrv,"Lang")),SetLang(oSrv),.T.)
HACKISET(oSrv,"lang",HASSNGET(oSrv,"Lang"))
HASSNSET(oSrv,"Page",PROCNAME())
HASSNSET(oSrv,"Path",HAPATH(oSrv) + "data")
aCaps = HASSNGET(oSrv,"aCaps")
**
aCols = {{"car_id",aCaps[ChdId],,70},;
{"TRIM(car_brand) + ' ' + TRIM(car_model)",aCaps[ChdName],,250},;
{"car_year",aCaps[ChdYear],,70,"C"},;
{"car_price",aCaps[ChdPrice],,70,"R"}}
aCData = {{aCaps[CarBrand]," "},;
{aCaps[CarModel]," "},;
{aCaps[CarYear]," "},;
{aCaps[CarVol]," "},;
{aCaps[CarPower]," "},;
{aCaps[CarFuel]," "},;
{aCaps[CarBody]," "},;
{aCaps[CarDesc]," "},;
{aCaps[CarPrice]," "},;
{aCaps[CarCont]," "}}
**
**
html = HAPAGEBGN({"files/style.css","files/powerweb.css"},;
{"files/script.js","files/powerweb.js","files/powerbrw.js"},,,;
aCaps[TtlHome],'onload="SetLang();"') +;
PageBgn(oSrv,aCaps,HASSNGET(oSrv,"Page")) +;
'<DIV STYLE="margin-left:10px">' + chrCRLF +;
'<H1 STYLE="color:mediumblue">' + aCaps[PhdHome] + "</H1>" + chrCRLF +;
HBRWPGN(,,,aCols,,10,,,,{"CarInfoShow"}) +;
HDIVBGN({,10},{480,570},{,{,clrIvory},{2,clrDRed,10}},{"CarInfo"},;
"z-index:100; display:none") +;
'<P STYLE="margin-top:0px"><SPAN STYLE="float:right; margin-right:10px; ' +;
'font-size:16pt; font-weight:bold; color:#800080; cursor:pointer" ' +;
'onclick="CarInfoHide()">×</SPAN></P>' + chrCRLF +;
HIMAGE({10,20},{350,240},,,{"CarImg"}) +;
HTABLE({10,270},aCData,;
{{,,,155,"LT"},{,,,300}},,,,{{,,.F.},{,,{,clrIvory}}},{"CarTbl"}) +;
"</DIV></DIV>" + chrCRLF +;
HAPAGEEND(PageEnd())
CLOSE
RETURN html