GithubHelp home page GithubHelp logo

Comments (19)

melloware avatar melloware commented on June 9, 2024 1

@gesker confirmed removing this setting fixes your issue.

	<context-param>
		<param-name>jakarta.faces.FACELETS_REFRESH_PERIOD</param-name>
		<param-value>-1</param-value>
	</context-param>

You can do this if you want to set it for Production Mode only.

	<context-param>
		<param-name>jakarta.faces.FACELETS_REFRESH_PERIOD</param-name>
		<param-value>#{facesContext.application.projectStage eq 'Development' ? 2 : -1}</param-value>
	</context-param>

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

interesting. I was pretty sure all loading of resources was handled by Quarkus for any resources found under /META-INF/resources.

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

Also are you running mvn quarkus:dev from the root project or from the www project?

from quarkus-primefaces.

gesker avatar gesker commented on June 9, 2024

Always from root.

Right now I'm looking for a an old branch in my current project that was on Quarkus 2.x.

I don't think this was an issue on 2.x but I wouldn't bet the farm on it.

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

When I changed the html file I see this..

2023-06-13 16:45:24,879 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-6) Files changed but restart not needed - notified extensions in: 0.004s

But not when I touch your XHTML file. So in RuntimeUpdatesProcessor it doesn't think this file is changed or needs to be watched but I am not sure why.

Code: https://github.com/quarkusio/quarkus/blob/5c2df5112331ef170c0b0ad83c84c6f853c2d5d6/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java#L565

from quarkus-primefaces.

gesker avatar gesker commented on June 9, 2024

Before you deep dive... I'm not 100% sure the web.xml is correct. I did comment out all the CACHE configuration items

  • trying to get back to default config - but I had been wondering traffic/filter was in the way or controlling the session in a way that I didn't understand - somehow determined the xhtml files didn't need to be reread -- and I simply hosed the configuration.

It was only after I was sure this wasn't happening in a known good project (quarkus-faces) that I figured I'd better file an issue.

I think my web.xml might be close but I've created complex problems from simple config mistakes before. Hopefully, my stare and compare was good enough to rule the the web.xml out a contributor.

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

Actually I am seeing this message now but still not updating the XHTML page.

2023-06-13 17:26:38,354 INFO [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-1) Files changed but restart not needed - notified extensions in: 0.004s

from quarkus-primefaces.

tandraschko avatar tandraschko commented on June 9, 2024

in general not a primefaces thing, more related to myfaces-core <> quarkus

myfaces should reload all xhtml files in ProjectStage.Dev from classpath
so i think either quarkus does not replace/reload the classloader stuff or MyFaces is not in Development stage or cache configured somehsow

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

@tandraschko what is weird is it reloads fine if the the projcet is a standalone project. But not if it is a submodule. You can see it with the MyFaces Quarkus Showcase project. If you run mvn quarkus:dev you will see it won't get hot updates of XHTML pages but Quarkus Faces does as its not a submodule project. It is very strange!

from quarkus-primefaces.

tandraschko avatar tandraschko commented on June 9, 2024

jakarta.faces.FACELETS_REFRESH_PERIOD — When a page is requested, what interval in seconds should the compiler check for changes. If you don’t want the compiler to check for changes once the page is compiled, then use a value of -1. Setting a low refresh period helps during development to be able to edit pages in a running application.The runtime must also consider the facelets.REFRESH_PERIOD param name as an alias to this param name for backwards compatibility with existing facelets tag libraries.

from quarkus-primefaces.

tandraschko avatar tandraschko commented on June 9, 2024

thats the problem

this setting should actually be not active in ProjectStage=Dev IMO

@melloware would you like to check if Mojarra ignores this flag in dev stage?
Otherwise, we should fix it in MyFaces anyway

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

Yep let me look!

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

This is what Mojarra does it forces -1 in production mode but in Dev mode if its set in web.xml it uses it but if NOT found it defaults to 2.

 // refresh period
        boolean isProduction = applicationImpl.getProjectStage() == Production;
        String refreshPeriod;
        if (webConfig.isSet(FaceletsDefaultRefreshPeriod)) {
            refreshPeriod = webConfig.getOptionValue(FaceletsDefaultRefreshPeriod);
        } else if (isProduction) {
            refreshPeriod = "-1";
        } else {
            refreshPeriod = FaceletsDefaultRefreshPeriod.getDefaultValue();
        }

from quarkus-primefaces.

tandraschko avatar tandraschko commented on June 9, 2024

IMO we should fix it in MyFaces

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

ok let me look at MyFaces

from quarkus-primefaces.

tandraschko avatar tandraschko commented on June 9, 2024

there is just no need to cache in dev mode IMO
but lets create a myfaces issue and a small vote

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

ok i will create an issue

from quarkus-primefaces.

tandraschko avatar tandraschko commented on June 9, 2024

also i dont know if EL is supported in this param
at least we have to support it or just ignore it in dev mode

from quarkus-primefaces.

melloware avatar melloware commented on June 9, 2024

https://issues.apache.org/jira/browse/MYFACES-4608

from quarkus-primefaces.

Related Issues (20)

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.