quarkus-omnifaces icon indicating copy to clipboard operation
quarkus-omnifaces copied to clipboard

@Param CDI Extension needs to be Quarkified

Open melloware opened this issue 3 years ago • 1 comments

Currently @Param is a CDI Extension which don't work in Quarkus.

https://showcase.omnifaces.org/cdi/Param

The CDI portable extension model is very flexible. Too flexible to benefit from the build time boot promoted by Quarkus. Most extension we have seen do not make use of these extreme flexibility capabilities. The way to port a CDI extension to Quarkus is to rewrite it as a Quarkus extension which will define the various beans at build time (deployment time in extension parlance).

melloware avatar Aug 27 '22 13:08 melloware

I think we would need the BeanDiscoveryFinishedBuildItem beans like in this example below to accomplish this. Not sure how easy it is still.

Example code: https://github.com/quarkusio/quarkus/blob/main/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/WiringProcessor.java

melloware avatar Aug 28 '22 11:08 melloware

Hi, when will this be fixed? Is there a workaround? Thanks

svenhaag avatar Sep 13 '24 07:09 svenhaag

@svenhaag admittedly i think i would need @BalusC help on this one since this is core functionality of OmniFaces. It needs to be written as not a CDI extension. I will open a ticket on OmniFaces.

https://github.com/omnifaces/omnifaces/issues/859

melloware avatar Sep 13 '24 11:09 melloware

@svenhaag we got this working!

melloware avatar Sep 17 '24 12:09 melloware

Awesome. Thank you very much guys. However, I don't understand why the release is 4 digits instead of 4.5.2? Also, the warning regarding @Param should be removed I guess: https://github.com/quarkiverse/quarkus-omnifaces/blob/4.5.1.1/README.md?plain=1#L45 Cheers

svenhaag avatar Sep 18 '24 05:09 svenhaag

4.5.1 is the OmniFaces version I stay in sync with. But since this was a fix without changing the OmniFaces version I made it 4.5.1.1. Next version will be 4.5.2 to match OmniFaces release.

As for that warning it remains true. param works in JVM mode but not in Native GraalVM compilation.

melloware avatar Sep 18 '24 09:09 melloware

@svenhaag let me know how your testing goes OK?

melloware avatar Sep 18 '24 19:09 melloware

@all-contributors add @svenhaag for testing

melloware avatar Sep 19 '24 18:09 melloware

@melloware

I've put up a pull request to add @svenhaag! :tada:

allcontributors[bot] avatar Sep 19 '24 18:09 allcontributors[bot]

Thank you guys! It works indeed. Awesome.

svenhaag avatar Sep 20 '24 08:09 svenhaag