Beacon table

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

Beacon table

Postby Otto » Tue Jul 13, 2021 7:58 am

Dear Cristobal,
May I ask you which TABLE componente you use in Beacon, or have you built one yourself?
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Beacon table

Postby cnavarro » Tue Jul 13, 2021 9:21 am

Dear Otto
Use, until now DATATABLE, always trying to implement it with AJAX. In the near future you may add other table controls than DATATABLE
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Beacon table

Postby Otto » Tue Jul 13, 2021 9:46 am

Dear Cristobal,

I ask because I think a homemade browser might be easier for simple tasks and for beginners.

I have to look at seamap.prg again. Maybe we can just expand that.

Mr. Rao has posted a function where you can easily create a table. This function would also be optimal.


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Beacon table

Postby cnavarro » Wed Jul 14, 2021 2:54 pm

Dear Otto
Yes, I have also had a function for years to make an html table from a data source (array), but for me it is essential that privacy is maintained. That is the reason for using AJAX and that when you see "Source code" on a web page, you do not see the data contained in the table. I hope I have explained myself correctly.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Beacon table

Postby Otto » Wed Jul 14, 2021 3:29 pm

Dear Cristobal,
I think one of the problems for beginners is that getting started is too complicated.
If we now use AJAX, then the matter is already more complex than a simple table.
I mean, I have a minimal application here, a simple list of links.
So far, I have been maintaining the database with the DBU.
Yesterday I quickly expanded the program and built in a simple CRUD.
Even though it's straightforward, it's a lot of work.
With FW I would have done that quickly.
It's a bit difficult to get started here. You always have to keep in mind that I am speaking of HTML beginners.
A function AP_xbrowse (), AP_recordEdit (), AP_Login () would be ideal.

Best regards,
Otto
Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Beacon table

Postby cnavarro » Sun Jul 18, 2021 11:07 am

Dear Otto
With Beacon,
Code: Select all  Expand view

Tables( oMain, oCard:oBodyCard, nInd, "SimpleAccessData", { 1, 2, 3, 4, 6 }, 1, "100%", "2.0vh", , , "table-responsive-00025", {}, "GET"  ) }
 

Code: Select all  Expand view

Function Tables( oMain, oParent, nInd, cTable, aCols, nColKey, nW, nHF, nLen, lOrder, cId2, aCols2, cType )
   hb_default( @cTable, "SimpleAccessData" )     // id html element table
   hb_default( aCols, { 1, 2, 3, 4, 6 } )
   hb_default( @nColKey, 1 )
   hb_default( @cId2, "table-responsive-00025" )
   hb_default( @lOrder, .T. )
   hb_default( @aCols2, {} )
   hb_default( @oParent, oCard:oBodyCard )
   hb_default( @nHF, "2.3vh" )
   hb_default( @cType, "POST" )

   oTable1 := TTableData():New( , oMain, , oParent, , .F. )
   WITH OBJECT oTable1
      :SetSourceTable( cType, "adosql.prg", cTable, aCols, nColKey, cId2, aCols2 )   // adosql.prg: harbour code return json
      :SetPageLenght( nLen )
      :SetOrdering( lOrder )
      :SetScrollCollapse( .t. )

      :SetSizeFont( nHF )
      :SetFamFont( "Roboto" )
      :SetColor( "#FFFFF0", )
      cStr := :Activate( "tabledata1", , , nInd, .F. )
   END
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Beacon table

Postby Antonio Linares » Sun Jul 18, 2021 3:24 pm

Dear Otto,

> A function AP_xbrowse (), AP_recordEdit (), AP_Login() would be ideal

I fully agree with you :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Beacon table

Postby Carles » Mon Jul 19, 2021 5:24 pm

Hi,

cnavarro wrote:Yes, I have also had a function for years to make an html table from a data source (array), but for me it is essential that privacy is maintained. That is the reason for using AJAX and that when you see "Source code" on a web page, you do not see the data contained in the table


I don't undertand you :-) . When you load the data via Ajax, you can also see the data...

C.
Last edited by Carles on Mon Jul 19, 2021 6:12 pm, edited 1 time in total.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: Beacon table

Postby Carles » Mon Jul 19, 2021 6:06 pm

Hi,

Antonio Linares wrote:
> A function AP_xbrowse (), AP_recordEdit (), AP_Login() would be ideal

I fully agree with you :-)


About xBrowse...

Code: Select all  Expand view
//  {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}

#include {% TWebInclude() %}

function main()

    local o, oCol, oBrw
    local aRows     := {}   
    local cLoren    := "Lorem Ipsum is simply dummy text of the printing and typesetting industry." 
       
    Aadd( aRows, { 'id' => 'A1', 'name' => 'Charly Aubia' , 'married' => .T., 'qty' => 12, 'date' => '2020-01-01', 'memory' => 'Hola' } )
    Aadd( aRows, { 'id' => 'ZZ', 'name' => 'Only name defined !'})
    Aadd( aRows, { 'id' => 'A2', 'name' => 'Maria de la O', 'married' => .F., 'qty' =>  7, 'date' => '2020-01-02', 'memory' => cLoren } )
    Aadd( aRows, { 'id' => 'A3', 'name' => 'John Kocinsky', 'married' => .F., 'qty' => 23, 'date' => '2020-01-03', 'memory' => '' } )   
    Aadd( aRows, { 'id' => 'A4', 'name' => 'Anne Clark'   , 'married' => .T., 'qty' =>100, 'date' => '2020-01-04', 'memory' => 'Test memory' } )   
    Aadd( aRows, { 'id' => 'A5', 'name' => 'Daniel Clark' , 'married' => .T., 'qty' =>  0, 'date' => '2020-01-05', 'memory' => 'Ep!' } )   
    Aadd( aRows, { 'id' => 'A6', 'name' => 'Rod Steward'  , 'married' => .F., 'qty' => 98, 'date' => '2020-01-06', 'memory' => 'Baby Jean' } ) 
    Aadd( aRows, { 'id' => 'A7', 'name' => 'Ally McPerson', 'married' => .F., 'qty' => 72, 'date' => '2020-01-07', 'memory' => '' } )   
    Aadd( aRows, { 'id' => 'A8', 'name' => 'Bruce Polest' , 'married' => .F., 'qty' => 13, 'date' => '2020-01-08', 'memory' => 'Memory...' } ) 
    Aadd( aRows, { 'id' => 'A9', 'name' => 'James Stewart', 'married' => .T., 'qty' => 84, 'date' => '2020-01-09', 'memory' => '' } )   
    Aadd( aRows, { 'id' => 'A10','name' => 'Sens Lange'   , 'married' => .F., 'qty' => 53, 'date' => '2020-01-10', 'memory' => '' } )   

    DEFINE WEB oWeb TITLE 'xBrowse' TABLES INIT
   
    DEFINE FORM o

        HTML o INLINE '<h3>Basic xBrowse</h3><hr>'     
       
    INIT FORM o        
       
        DEFINE BROWSE ID 'ringo' DATA aRows OF o
   
    END FORM o 
   
retu nil


Image

Instead of command you can use function xBrowse()

Code: Select all  Expand view
    INIT FORM o        
       
        xBrowse( o, 'ringo', aRows )
   
    END FORM o


You don't need much more ...

The power of modHarbour ! :wink:

C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1090
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 6 guests