jsf-1.2

java.util.MissingResourceException: Can't find bundle for base name messages, locale en_US

一世执手 提交于 2019-12-07 06:36:47
问题 I am new to JSF an was trying out this piece of code.. This is my faces-config.xml: <application> <resource-bundle> <base-name>messages</base-name> <var>msg</var> </resource-bundle> </application> messages is a file that stores a few properties and messages file is not placed under any directory, it is placed directly under the application. Why cant i access this file? Thank you in advance.. please do let me know if you need any additional information.. 回答1: looks like your file placed in

session handling in JSF 1.2

荒凉一梦 提交于 2019-12-06 15:17:43
How do we handle session variables (add/fetch) in JSF 1.2? A scenario: Consider a login screen where the user logs in successfully, the user model is stored in session. The user modes contains the user role. Next time onwards, for every user action, check the user role from the user model and display the form accordingly. In such a case how to add the user odel in session and how to etrieve it every time from the session? Previously I have worked in Struts 1.2 where in the execute method, we have a request e=which is used to get the session and access the session variables also. But I am not

How to pass a parameter to an included page with JSF 1.2

天涯浪子 提交于 2019-12-06 14:55:59
Is this possible to pass a parameter to an included page in JSF1.2 environment? I have a page a.jsp in which b.jsp is included twice (I tested all jsp:include, a4j:include, c:import) once at top of the page and once at the bottom. I want to figure out in b.jsp if it's now including in top or in bottom of a.jsp. BTW, I do not have facelets. There the <jsp:param> tag is for. E.g. <jsp:include page="/WEB-INF/include.jsp"> <jsp:param name="position" value="top" /> </jsp:include> ... <jsp:include page="/WEB-INF/include.jsp"> <jsp:param name="position" value="bottom" /> </jsp:include> With the above

Backing bean property that should return a string with html code returns empty string

空扰寡人 提交于 2019-12-06 13:33:58
I have a property in my backing bean that returns html code: public String getHtmlPrevisualizar() { return "<html><head><title></title></head><body>Hello world.</body></html>"; } What I want to do is show this html code in a iframe. I do this with javascript. This is the xhtml page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:f="http://java.sun.com/jsf

Integrating Flash File Upload with JSF

杀马特。学长 韩版系。学妹 提交于 2019-12-06 06:09:45
问题 I have seen that we can upload multiple files by flash file upload. Like SWFUpload or YUI Uploader. Is it possible to integrate these upload component with JSF? What I want is to choose multiple file at once. Primefaces file uploader has this feature, but that don't work in IE7 as IE7 don't have any support for HTML5. I need to create a Form with various fields, like dropdown menu, text input etc and also need to add a file uploader for choosing multiple file. When the JSF submit button will

Navigation from managed bean constructor in ADF Faces JSF 1.2

落爺英雄遲暮 提交于 2019-12-05 15:23:04
Is it possible to navigate to another page/view from the constructor of the managed bean? I want this redirection if any exception occurred. I have tried many ways: Try-1: getFacesContext().responseComplete(); getFacesContext().getApplication().getNavigationHandler().handleNavigation(getFacesContext(), null, "gotoPartError"); getFacesContext().renderResponse(); Try-2: getServletResponse().sendRedirect("partError.jspx") Try-3: getFacesContext().responseComplete(); getFacesContext().getExternalContext().redirect(getServletRequest().getContextPath() + "/pages/partError.jspx"); Try-4:

java.util.MissingResourceException: Can't find bundle for base name messages, locale en_US

*爱你&永不变心* 提交于 2019-12-05 13:17:30
I am new to JSF an was trying out this piece of code.. This is my faces-config.xml: <application> <resource-bundle> <base-name>messages</base-name> <var>msg</var> </resource-bundle> </application> messages is a file that stores a few properties and messages file is not placed under any directory, it is placed directly under the application. Why cant i access this file? Thank you in advance.. please do let me know if you need any additional information.. looks like your file placed in some package inside your src folder <base-name>some.package.name.Messages</base-name> also make sure the file

Rich TabPanel's getters invoked when tab content not rendered

此生再无相见时 提交于 2019-12-05 02:45:12
问题 I have a question about RichFace's (3.3.3) TabPanel. I have worked on two projects that have used the TabPanel. On each project, I have noticed that components that are on tabs that are not visible still have their "getter" methods called. For example, the first tab has a datatable on in and any time requests are made from any of the other tabs (including ajax requests) the bean that is bound to the datatable on the first tab still has its getter called. I assume this happens (even though the

Integrating Flash File Upload with JSF

一曲冷凌霜 提交于 2019-12-04 09:35:18
I have seen that we can upload multiple files by flash file upload. Like SWFUpload or YUI Uploader . Is it possible to integrate these upload component with JSF? What I want is to choose multiple file at once. Primefaces file uploader has this feature, but that don't work in IE7 as IE7 don't have any support for HTML5. I need to create a Form with various fields, like dropdown menu, text input etc and also need to add a file uploader for choosing multiple file. When the JSF submit button will be clicked the Form will be validated and it will proceed after. I have created a page for uploading

ToolTip for each SelectOneMenu Items in jsf

久未见 提交于 2019-12-04 04:55:49
问题 My requirement is to provide a tooltip for every option in the SelectOneMenu because label of option is so large that it's not possible to provide such a large size SelectOneMenu .So the label is cutting. Thats why i need tooltip to show the whole value on mouse over of the options in the SelectOneMenu . Any ideas will be appreciated. 回答1: You can use javascript . Assume your selectOneMenu as below. <h:form id="form1"> <h:selectOneMenu id="combo1"> <f:selectItem itemLabel="First Label"/> <f