GithubHelp home page GithubHelp logo

kopileft / galite Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 7.0 33.04 MB

Galite Framework

Home Page: https://kopileft.github.io/Galite/

License: GNU Lesser General Public License v2.1

Kotlin 83.32% Java 14.98% CSS 1.52% JavaScript 0.18%
domain-specific-language user-interface database-applications

galite's People

Contributors

h-haddad avatar hfazai avatar iyedchaabane avatar medalimarz avatar mgrati avatar sebai-dhia avatar snsir avatar zmarouani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

galite's Issues

UC and TS field is necessary to manipulate a block !!!

When we set the Java tools options to enable, ( bashrc file : export JAVA_TOOL_OPTIONS="-ea" )
we get an assertion error when we try to create a new client in the Client form or any other form that not present uc and ts field

image

Chart type trigger crashes

2 issues:

  • CHARTTYPE action should require to return a chart type, but actually it doesn't.
  • when returning a chart type it crashes:
class kotlin.Unit cannot be cast to class org.kopi.galite.chart.VChartType (kotlin.Unit and org.kopi.galite.chart.VChartType are in unnamed module of loader 'app')
java.lang.ClassCastException: class kotlin.Unit cannot be cast to class org.kopi.galite.chart.VChartType (kotlin.Unit and org.kopi.galite.chart.VChartType are in unnamed module of loader 'app')
	at org.kopi.galite.chart.VChart.getFixedType(VChart.kt:254)
	at org.kopi.galite.chart.VChart.setType$galite_core(VChart.kt:359)
	at org.kopi.galite.chart.VChart.build(VChart.kt:208)
	at org.kopi.galite.chart.VChart.initChart(VChart.kt:196)
	....

Export report to file doesn't work

Actual behaviour:
When clicking in command of Exporting report to excel I get NullPointerException

ST:

java.lang.NullPointerException
	at org.kopi.galite.report.VReport.export(VReport.kt:247)
	at org.kopi.galite.tests.report.SimpleReport$cmdXLS$1$1.invoke(ReportTests.kt:189)
	at org.kopi.galite.tests.report.SimpleReport$cmdXLS$1$1.invoke(ReportTests.kt:110)
	at org.kopi.galite.visual.VActor$performAction$1.execute(VActor.kt:56)
	at org.kopi.galite.visual.Action.run(Action.kt:32)

....

Bug when using Tasks Form in Galite demo

When we call Tasks form we get java.lang.RuntimeException:
java.lang.RuntimeException: org.kopi.galite.visual.ui.vaadin.calendar.DAbstractFullCalendar$updateEntries$1@59c491d7 Fetch entries
at org.kopi.galite.visual.ui.vaadin.visual.DWindow.performActionImpl(DWindow.kt:238)
at org.kopi.galite.visual.ui.vaadin.visual.DWindow.access$performActionImpl(DWindow.kt:72)
at org.kopi.galite.visual.ui.vaadin.visual.DWindow$performAsyncAction$1.invoke(DWindow.kt:353)
at org.kopi.galite.visual.ui.vaadin.visual.DWindow$performAsyncAction$1.invoke(DWindow.kt:352)
at org.kopi.galite.visual.ui.vaadin.base.BackgroundThreadHandler.access(BackgroundThreadHandler.kt:40)
at org.kopi.galite.visual.ui.vaadin.visual.DWindow.performAsyncAction(DWindow.kt:352)
at org.kopi.galite.visual.VWindow.performAsyncAction(VWindow.kt:159)
at org.kopi.galite.visual.ui.vaadin.calendar.DAbstractFullCalendar.updateEntries(DAbstractFullCalendar.kt:99)
at org.kopi.galite.visual.ui.vaadin.calendar.DAbstractFullCalendar.(DAbstractFullCalendar.kt:64)
at org.kopi.galite.visual.ui.vaadin.calendar.DTimeGridCalendar.(DTimeGridCalendar.kt:29)
at org.kopi.galite.visual.ui.vaadin.form.DFullCalendarBlock.createFields(DFullCalendarBlock.kt:45)
at org.kopi.galite.visual.ui.vaadin.form.DBlock.(DBlock.kt:89)
at org.kopi.galite.visual.ui.vaadin.form.DFullCalendarBlock.(DFullCalendarBlock.kt:29)
at org.kopi.galite.visual.ui.vaadin.form.DForm.createViewForBlock$galite_core(DForm.kt:88)
at org.kopi.galite.visual.ui.vaadin.form.DForm.(DForm.kt:68)
at org.kopi.galite.visual.ui.vaadin.visual.VUIFactory.createForm$galite_core(VUIFactory.kt:110)
at org.kopi.galite.visual.ui.vaadin.visual.VUIFactory.createView(VUIFactory.kt:56)
at org.kopi.galite.visual.form.VForm$Companion$1.createWindow(VForm.kt:88)
at org.kopi.galite.visual.ui.vaadin.visual.VWindowController$doNotModal$1.invoke(VWindowController.kt:70)
at org.kopi.galite.visual.ui.vaadin.visual.VWindowController$doNotModal$1.invoke(VWindowController.kt:69)

Also when we manipulate data in this form we get fatal error :
Capture d’écran du 2023-11-24 16-20-33

Unusual behaviour for applications with multiple connections

When working with Galite web application, an unusual behaviour is observed when working with multiple connections.

Here are the steps to recreate this behaviour :

  • Open the galite application in a first browser window and connect to the application with the user "user1" => Connection successful OK
  • Try to do some database operations : load, create, update some data => Operations successful OK
  • In another browser window, open the same application and try to connect with another user "user2" with the wrong password (do not close the first window) => An exception is shown "Connection Error: password authentication failed for user "user2"" : OK
  • Return to the first window which has a connected user. Try to do some database operations => An exception is shown "Connection Error: password authentication failed for user "user2"" : Unusual behaviour KO

ListDomain should display list data in a dialog when "override val table" gets a simple table definition

Example of ListDomain:

object Module: ListDomain<String>(20) {

  override val table = Modules

  init {
    "ID" keyOf Modules.id
    "KURZNAME" keyOf Modules.shortName
    "UC" keyOf Modules.uc
    "TS" keyOf Modules.ts
    "VATER" keyOf Modules.parent
    "QUELLE" keyOf Modules.sourceName
    "PRIORITAET" keyOf Modules.priority
    "OBJEKT" keyOf Modules.objectName
    "SYMBOL" keyOf Modules.symbol
  }
}

This example generates the error:

java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.kopi.galite.form.VField.evalListTable_(VField.kt:2033)
at org.kopi.galite.form.VField.selectFromList$galite_core(VField.kt:1869)
at org.kopi.galite.form.VFieldUI.fillField(VFieldUI.kt:290)
at org.kopi.galite.form.AbstractPredefinedValueHandler.selectDefaultValue(AbstractPredefinedValueHandler.kt:28)
at org.kopi.galite.form.VField.fillField(VField.kt:432)
at org.kopi.vkopi.lib.ui.swing.form.JFieldHandler.predefinedFill(JFieldHandler.java:53)
at org.kopi.galite.form.VFieldUI.autofillButton(VFieldUI.kt:305)
at org.kopi.vkopi.lib.ui.swing.form.DField$1$1.execute(DField.java:91)
at org.kopi.galite.visual.Action.run(Action.kt:32)
at org.kopi.vkopi.lib.ui.swing.visual.DWindow$ActionRunner.run(DWindow.java:740)
at java.base/java.lang.Thread.run(Thread.java:834)

Domain : Initializing field with type DATETIME does not work

When creating a field linked to a database column with type org.jetbrains.exposed.sql.javatime.datetime, I used Galite Type DATETIME :
import org.kopi.galite.visual.domain.DATETIME
...
val createdOn = skipped(DATETIME, at(11, 1)) {
...
}
...

I tried to initialize this field inside the trigger PREINS :
trigger(PREINS) {
createdOn.value = LocalDateTime.now()
}

The problem is that this initialisation does not work and the field createdOn always takes the NULL value.
This issue concerns the types :

  • java : java.time.LocalDateTime
  • jetbrains Exposed : org.jetbrains.exposed.sql.javatime.datetime
  • Galite : org.kopi.galite.visual.domain.DATETIME

The following types work as expected :

  • java : java.time.Instant
  • jetbrains Exposed : org.jetbrains.exposed.sql.javatime.timestamp
  • Galite : org.kopi.galite.visual.domain.TIMESTAMP

The method org.kopi.galite.visual.domain.Domain.buildFormFieldModel() assigns VTimestampField for the types org.joda.time.DateTime, java.time.LocalDateTime and java.time.Instant. However VTimestampField uses the type Instant as its main type. We can start by analysing this.

org.kopi.galite.visual.domain.Domain.buildFormFieldModel(formField: FormField<T>) : VField {
val model = with(formField) {
when (kClass) {
....
Instant::class, LocalDateTime::class, DateTime::class -> VTimestampField(block.buffer)
...
}
}
}

Decimal numbers are rounding automatically in generated Excel files

Steps to reproduce:

  • Create a report containing at least one decimal column
  • Give numbers with fraction part for the decimal column
  • Open the report
  • Generate xls/xlsx file
  • In the generated file we find that numbers are rounded

Expected behaviour:
Numbers shoud preserve the precise values

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.