myfaces

Undefined component type javax.faces.ViewRoot in JSF 2.3 startup

流过昼夜 提交于 2020-01-06 05:37:07
问题 This is a new twist from my earlier issues found here. I'm upgrading from MyFaces 2.1 to 2.3.5, and from PrimeFaces 6.1 to 7. This has also included migrating from managed beans to CDI. At this point, the server starts up and it appears that MyFaces, PrimeFaces, and CDI are being initialized. However, when I attempt to load my first page I get " Undefined component type javax.faces.ViewRoot ". Note, this is a "component type" not a class. Tracing into the MyFaces code, I can see that the

How can I check if an object stored with @WindowScoped is stored correctly?

╄→尐↘猪︶ㄣ 提交于 2020-01-05 07:44:32
问题 Two days ago I wrote this question: How can I retrieve an object on @WindowScoped? and BalusC answered with some suggestions, now I have some problem to understand if my problem is that the object in WindowScoped is stored properly or my code to retrieve it is wrong! Well, as I said, I have an object that I stored in @WindowScoped annotation but I can retrive this object only the first time! Why? I just have a doubt: the CODI extension of MyFaces could be configured in some manner? Or I can

How can I check if an object stored with @WindowScoped is stored correctly?

跟風遠走 提交于 2020-01-05 07:44:08
问题 Two days ago I wrote this question: How can I retrieve an object on @WindowScoped? and BalusC answered with some suggestions, now I have some problem to understand if my problem is that the object in WindowScoped is stored properly or my code to retrieve it is wrong! Well, as I said, I have an object that I stored in @WindowScoped annotation but I can retrive this object only the first time! Why? I just have a doubt: the CODI extension of MyFaces could be configured in some manner? Or I can

PrimeFaces ViewExpiredException after page reload

我的未来我决定 提交于 2020-01-04 03:00:11
问题 I have wrapper PrimeFaces.ajax.AjaxResponse to handle ViewExpiredException (reloading the page): var handleViewExpired = function (viewId) { window.alert('${msg.ajax.viewExpired}'); window.location.reload(); }; However, sometimes I got that error over and over again after trying to click anything invoking AJAX requests on the site: javax.faces.application.ViewExpiredException: /tree.xhtmlNo saved view state could be found for the view identifier: /tree.xhtml at org.apache.myfaces.lifecycle

Redirect after logout fails with java.lang.IllegalStateException: Cannot create a session after the response has been committed

回眸只為那壹抹淺笑 提交于 2020-01-02 14:47:15
问题 I have a JSF2 application. I have a login bean which is session scoped and a logout bean which is view scoped. When I login I use redirect and it works fine. However the logout fails with redirect. If I logout without redirect it works. @ManagedBean @ViewScoped public class MbLogout extends BaseJsf { private static final long serialVersionUID = 2992671241358926373L; public String logout() throws DfException { getFacesContext().getExternalContext().invalidateSession(); //return "login?faces

How can a custom-validator know which commandButton was clicked

此生再无相见时 提交于 2020-01-02 10:26:08
问题 my form has several "submit" buttons, and the validation of some of the fields depends on which was pressed. How can I find that out in my custom validator? 回答1: The button's client ID get also generated as name of the <input type="submit"> . The name=value of the pressed <input type="submit"> get also sent as request parameters. So you could just check for that in the request parameter map. E.g. <h:form id="formId"> ... <h:commandButton id="button1" ... /> <h:commandButton id="button2" ... /

What is the default for FACELETS_REFRESH_PERIOD?

ⅰ亾dé卋堺 提交于 2020-01-01 08:04:01
问题 In a JSF application, the parameter javax.faces.FACELETS_REFRESH_PERIOD can be used to enable/disable automatic reloading of XHTML files. I am currently researching the right configuration for production deployments, and accidentally found out that we currently run with FACELETS_REFRESH_PERIOD=1 even in production, which is obviously not a good idea. This lead to the question: What is the default value for this parameter? Ideally, I'd like to just omit FACELETS_REFRESH_PERIOD from our

What is the default for FACELETS_REFRESH_PERIOD?

徘徊边缘 提交于 2020-01-01 08:03:50
问题 In a JSF application, the parameter javax.faces.FACELETS_REFRESH_PERIOD can be used to enable/disable automatic reloading of XHTML files. I am currently researching the right configuration for production deployments, and accidentally found out that we currently run with FACELETS_REFRESH_PERIOD=1 even in production, which is obviously not a good idea. This lead to the question: What is the default value for this parameter? Ideally, I'd like to just omit FACELETS_REFRESH_PERIOD from our

dynamic ui:include with ui:fragment: component with rendered false still make inside component tree

与世无争的帅哥 提交于 2020-01-01 07:20:24
问题 I am force to use a very old version of MyFaces 2.0.5 I think, and dynamic include with EL cause so much problem, so I switch to static include with ui:fragment <ui:fragment rendered="#{filtersPopup.filterFileName == 'checkBoxFilters'}"> checkBoxFilters <ui:include src="/analytics/checkBoxFilters.xhtml" rendered="#{filtersPopup.filter != null}"/> </ui:fragment> <ui:fragment rendered="#{filtersPopup.filterFileName == 'DateRelativeFilter'}"> DateRelativeFilter <ui:include src="/analytics

My EL Expressions are not being evaluated under a MyFaces 2.3 and Spring Boot 2.0.3 application

为君一笑 提交于 2019-12-31 06:20:28
问题 I have a MyFaces application running under Spring Boot 2.0.3 , all Servlets and Context Listeners are properly registered and configured, and apparently working. Even my index.jsf page is being rendered. The tags are processed correctly on the .xhtml file. The problem is that all the EL expressions of index.jsf page are not being processed/evaluated. No error is thrown but where I put #{myBean.property} is always being rendered as an empty String . Debugging it I see that the server code of