Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Hello Everyone,
Thanks for the amazing work on Genie!
introduce-yourself, I came here as from julia discourse forum, Pere advised to go to the discord forum, from the message → https://discourse.julialang.org/t/admin-panel-front-end-with-julia/106720/2
I am trying to reproduce the example from Genie documentation from here --> https://learn.genieframework.com/docs/guides/adding-reactive-pages and the Multiple app modules paragraph.
First, Julia returns some minor issues, there are ending ',' on the code ending and I had to modify the StatisticAnalysis with Statistics.
But major issues is that I did not succeed in adding reactive code on a sub-module as presented :
module App
using GenieFramework
module Index
using GenieFramework
@app begin
@out name = "John"
end
function ui()
h1("Welcome {{name}}!")
end
end
module Form
using GenieFramework
using Statistics
@app begin
@in N = 0
@out m = 0.0
@onchange N begin
m = mean(rand(N))
end
end
function ui()
cell([
textfield("How many numbers?", :N)
p("The average of {{N}} random numbers is {{m}}")
])
end
end
using .Index using .Form
@page("/", Main.App.Index.ui, DEFAULT_LAYOUT(), Main.App.Index) @page("/form", Main.App.Form.ui, DEFAULT_LAYOUT(), Main.App.Form)
end
However, if reactive parts are adding on the App module rather than sub-module, it works.
Is there possibility to keep reactive part on the sub-module and working properly ?
Warmest Regards
![](https://cdn.discordapp.com/attachments/1190632011715584120/1190632012642533436/image_not_work.png?ex=65b4f678&is=65a28178&hm=499d0a9519cd417be33d858e7c71ceead79a9558ca76ee815b7a851e307a4175&)
![](https://cdn.discordapp.com/attachments/1190632011715584120/1190632012982263829/image_works.png?ex=65b4f678&is=65a28178&hm=b4fb4786663e0111ab9089e632eee88b8cfafab980da03b86652506abd9774b4&)
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
Welcome to the server @bienpierre ! And thanks for reporting this. It seems that some of the recent changes to the @page
macro broke this example. To fix it, you need to specify the model
keyword like this
@page("/", Main.App.Index.ui, model= Main.App.Index)
@page("/form", Main.App.Form.ui, model= Main.App.Form)
Note that specifying the layout is no longer needed. I tried with the code you posted and it worked. I'll fix the docs right away!
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
Oh and the StatisticAnalysis module the example is referring to is this one https://learn.genieframework.com/docs/guides/first-dashboard I'll change it to just use Statistic
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Thanks for answering. I tested it with Julia 1.9.4 and it works but with Julia 1.10 it doesn't work and nothing is displayed.
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Same issue here. Nothing is displayed on the browser and also no error appear in the console. Using Ubuntu and Julia 1.10.
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
by the way, is not the only example which fails, https://github.com/GenieFramework/Genie.jl/issues/696, https://github.com/GenieFramework/Genie.jl/issues/697
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I just tested with Julia 1.9.4 and it still does not work
![Author Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
I did some tests, also the most recent updates of Genie are causing problems in Julia 1.9.4: https://github.com/GenieFramework/Genie.jl/issues/698
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
thanks for reporting @marius.drulea , I'll take a look and follow up