Tengo la version licenciada y cuando tengo mas de 32 METHOD
Sale pantalla Blanca y me indica este error y ya no deja seguir trabajando.
xaWeb error (1.0.0)
Error on /index.cgi: DEMO limits crossed. Consider buying the commercial version at www.ozs.es
Por ahí parece que algo se quedo.
WITH OBJECT WButton():New( oCol5 )
:cText := "Ver Detalle "
:cId := "misdatos"
:cName := "misdatos"
:OnDblClick:="SolicitudDetalles"
:AddStyle( "height: 20px" )
:Create()
END WITH
He estado usando este metodo para revisar que me parece seria de gran utilidad para ir haciendo un debug
METHOD SolicitudDetalles( hParam ) CLASS WDocMain
LOCAL cDebug := "<h4>Valores recibidos:</h4><ul>"
AEVAL( HB_HKeys( hParam ), {|k| cDebug += "<li><b>" + k + "</b>: " + hParam[ k ] + "</li>" } )
WITH OBJECT oGrupo := WMain():New(Self)
:AddClass("container")
cDebug += "</ul>"
WText():New(SO):cText := cDebug
WITH OBJECT WButton():New( oGrupo )
:OnClick:= "Solicitud5"
:cText := "Regresar "
:Create()
END WITH
END WITH
RETURN NIL
Este es el resultado en el boton del ejemplo
Valores recibidos:
action: wdocmain-SolicitudDetalles
Seria interesante se envíe también el el id del botón
En un submit solo se envian los id de los Wedit y Select , y tampoco el ID del boton seria interesante que lo añadieras
Otro problema No me funciona WITH OBJECT oPdfPack := wPdf():New( Self )
Muestro el codigo completo
Previo hago mi consulta con MariaDB y se ve correctamente
WITH OBJECT oMain := WMain():New( Self )
:cId := "main"
:AddClass( "container" )
WITH OBJECT ::oTabla := WTable():New( oMain )
:cId := "Listado"
:cTitle:=ctitulo
:LoadData( aTitulos ) // Los encabezados
:LoadData(oRs) // Los Datos
:nHeader := 1 // Para los ecabezados
//:nFooter :=nFinal // Para el tratamiento de sumato
:oStyle:Width := "100%"
:cHeaderBkColor := ::oContext:PrimaryColor()
:cHeaderColor := ::oContext:PrimaryTextColor()
:cMaxHeight := "650px"
:lResponsive := .T.
:cFooterBkColor := "white"//::oContext:PrimaryColor()
:lContentEditable:=.t.
:lShowID := .t.
:lCanSort := .t.
:lCanFilter := .f.
:Create()
END WITH
WITH OBJECT oPdfPack := wPdf():New( Self )
WITH OBJECT :oAutoTable
:oTable := ::oTabla
:oStyle:font = "times"
:oStyle:CellWidth = "auto"
:cTitle := ctitulo
:cSubTitle := ctitulo
END WITH
END WITH
WITH OBJECT WButton():New( oMain )
:OnClick:= oPdfPack:oAutoTable
:cText := "Exportando a Pdf "
:cId := "imprime"
:Create()
END WITH
END WITH
En la consola de errores tengo esto
index.cgi?action=wdocmain-MostrarForm1:1738 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'style')
at xa_pdfAutoTable (index.cgi?action=wdocmain-MostrarForm1
at HTMLAnchorElement.onclick (index.cgi?action=wdocmain-MostrarForm1
Atentemente
Michael Pavlich