New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing an error when nesting forms #181

Closed
cocorossello opened this Issue Nov 14, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@cocorossello

cocorossello commented Nov 14, 2015

Nesting forms is illegal in both html or JSF. The problem is that the behaviour is unpredictable and is rather hard to see that an ajax error is produced by this mistake. I think it would be good if omnifaces could throw an error when nesting forms (or throw an error in development and log an error in production, or at least log an error).

Due to our inexperience with JSF we started with a form in the template and we are now migrating it but from time to time sometimes someone nests 2 forms and we realize a few days later...

@paulobing

This comment has been minimized.

Show comment
Hide comment
@paulobing

paulobing Nov 23, 2015

I'm also facing this issue sometimes with our template! Let me know if you guys release a new version with this feature.

Thanks

paulobing commented Nov 23, 2015

I'm also facing this issue sometimes with our template! Let me know if you guys release a new version with this feature.

Thanks

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Nov 26, 2015

Member

Reasonable.

Member

BalusC commented Nov 26, 2015

Reasonable.

@BalusC BalusC closed this in c7909c1 Jul 16, 2016

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Jul 16, 2016

Member

I added one which automatically runs during development stage.

It's available in today's latest 2.5-SNAPSHOT.

Member

BalusC commented Jul 16, 2016

I added one which automatically runs during development stage.

It's available in today's latest 2.5-SNAPSHOT.

@cocorossello

This comment has been minimized.

Show comment
Hide comment
@cocorossello

cocorossello Aug 1, 2016

Sorry for the delay, couldn't test it. Application does not boot on tomee 7.0.1 since 2.5-SNAPSHOT (it does boot with 2.4).

This is a trace of an empty webapp only with omnifaces 2.5-SNAPSHOT jar:

Caused by: java.lang.IllegalStateException: CDI BeanManager instance is not available in this environment.
at org.omnifaces.ApplicationInitializer.checkCDIImplAvailable(ApplicationInitializer.java:194) ~[na:na]
at org.omnifaces.ApplicationInitializer.checkCDI11Available(ApplicationInitializer.java:108) ~[na:na]
at org.omnifaces.ApplicationInitializer.onStartup(ApplicationInitializer.java:69) ~[na:na]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167) ~[catalina.jar:8.5.3]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) ~[catalina.jar:8.5.3]
... 10 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
at org.omnifaces.ApplicationInitializer.checkCDIImplAvailable(ApplicationInitializer.java:191) ~[na:na]
... 14 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.webbeans.container.OwbCDI.getBeanManager(OwbCDI.java:51) ~[openwebbeans-impl-1.6.3.jar:1.6.3]

I'll try to see what is wrong here, since minimum requirements should be met with tomee 7.0.1

cocorossello commented Aug 1, 2016

Sorry for the delay, couldn't test it. Application does not boot on tomee 7.0.1 since 2.5-SNAPSHOT (it does boot with 2.4).

This is a trace of an empty webapp only with omnifaces 2.5-SNAPSHOT jar:

Caused by: java.lang.IllegalStateException: CDI BeanManager instance is not available in this environment.
at org.omnifaces.ApplicationInitializer.checkCDIImplAvailable(ApplicationInitializer.java:194) ~[na:na]
at org.omnifaces.ApplicationInitializer.checkCDI11Available(ApplicationInitializer.java:108) ~[na:na]
at org.omnifaces.ApplicationInitializer.onStartup(ApplicationInitializer.java:69) ~[na:na]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167) ~[catalina.jar:8.5.3]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) ~[catalina.jar:8.5.3]
... 10 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
at org.omnifaces.ApplicationInitializer.checkCDIImplAvailable(ApplicationInitializer.java:191) ~[na:na]
... 14 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.webbeans.container.OwbCDI.getBeanManager(OwbCDI.java:51) ~[openwebbeans-impl-1.6.3.jar:1.6.3]

I'll try to see what is wrong here, since minimum requirements should be met with tomee 7.0.1

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC Aug 1, 2016

Member

Might be related to #281. The showcase app deploys fine for me on both 7.0.1 Plus and Plume though.

How does the beans.xml of your test webapp look like? The showcase app has just an empty one.

Member

BalusC commented Aug 1, 2016

Might be related to #281. The showcase app deploys fine for me on both 7.0.1 Plus and Plume though.

How does the beans.xml of your test webapp look like? The showcase app has just an empty one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment