jsf-2

JSF2 logs with tomcat

女生的网名这么多〃 提交于 2019-12-28 12:09:32
问题 I'm having a project using JSF2 (2.1.2), Richfaces4 (4.0.0.Final) on tomcat6 (6.0.28). In order to manage portability between Tomcat and WebSphere7 for my EARs, I have the following jars inside my tomcat lib: el-api-2.2.jar, jsf-api-2.1.2.jar, jsf-impl-2.1.2.jar, validation-api-1.0.0.GA.jar. My problem is that I never managed to change the log levels of JSF or Richfaces and except from the initialization ones, I don't see any inside my console. Even when I get exceptions in my server response

Primefaces datatable date range filter with filterFunction

≯℡__Kan透↙ 提交于 2019-12-28 11:57:47
问题 I use filterFunction method of datatable on primefaces 5.0. I want to filter birthday by date range on column header. On browser console I receive this error: <?xml version="1.0" encoding="utf-8"?><partial-response><error><error-name>java.lang.ClassCastException</error-name><error-message><![CDATA[javax.faces.component.UIPanel cannot be cast to javax.faces.component.ValueHolder]]></error-message></error></partial-response> Datatable : <p:dataTable var="person" value="#{testDateRange.persons}"

JSTL xmlns namespace differences between JSF 1.2 and JSF 2.x?

雨燕双飞 提交于 2019-12-28 08:08:15
问题 I have a JSF 1.2 based webapp from which I copied the JSTL import xmlns:c="http://java.sun.com/jstl/core" You can also find this import in many places on the Internet. I can't remember whether the above worked in my former web project or not, in any case, it does not work in my current JSF 2.0 based webapp. I got a warning from the container saying: Warning: This page calls for XML namespace http://java.sun.com/jstl/core declared with prefix c but no taglibrary exists for that namespace. I

h:commandbutton, how to redirect to external site?(JSF 2) [duplicate]

北慕城南 提交于 2019-12-28 06:49:08
问题 This question already has an answer here : Redirect to external URL in JSF (1 answer) Closed 4 years ago . When i use command button to redirect to pages, inside my project, u just need to give the name of the page with no extention, followed by ?faces-redirect=true in the action attribute and i will get redirected. But what if i want to get redirected to an external page(example:www.google.com)? I tried in many ways: www.google.com, google.com, http://google.com but i failed. This is what i

Creating and populating a DataTable dynamically in JSF2.0

南笙酒味 提交于 2019-12-28 06:35:17
问题 I've a little problem right there. When I want to populate DataTable in JSF I have to create a model first, then use it in my view. Like on Primefaces sample here. And now, I have to create DataTable that will display data, that came from webservice. I don't know how many columns there will be, and I don't know their names... Could you recommend some wise solution ? PS. I don't know also how to returned data from webservice - it is still to determine. EDIT public Bean() { columns = new

Passing parameters between managed beans with request scope

二次信任 提交于 2019-12-28 06:26:27
问题 Im working on a web application using JSF2 . I want to pass parameters from a managed bean in backing bean action and I want to retrive the same parametrs in an other managed bean the both with a request scope. Thanks in advance. 回答1: Use <f:param> in the command link/button and use @ManagedProperty or <f:viewParam> in the target bean or view. E.g. <h:commandButton value="Submit" action="#{otherBean.submit}"> <f:param name="foo" value="#{oneBean.foo}" /> </h:commandButton> with in OtherBean

JSF 2 - Bean Validation: validation failed -> empty values are replaced with last valid values from managed bean

懵懂的女人 提交于 2019-12-28 05:35:29
问题 I do not understand the behaviour of JSF2 during valdation. Hope someone can help me. I have a form where the fields are validated after (ajax) submit - ok If the validation failed a error message is shown - ok For my example when I enter a valid birthday and the field name is empty an errormessage for name is shown after submit. Now when I enter a valid name and delete the input from the birthday field an errormessage is show for birthday (that's ok) but now the old 'valid' birthday stands

Bookmarkability via View Parameters feature

爷,独闯天下 提交于 2019-12-28 03:00:13
问题 Is bookmarkability achievable though using the includeViewParams=true query parameter with JSF implicit navigation ? If yes, then how ? 回答1: First we need to understand what exactly "bookmarkability" is and what exactly includeViewParams does. This way the effect of the combination of both can be better understood. Bookmarkability concerns the HTTP request URL in its exact form as you see in the browser's address bar. It's exactly the URL as the enduser would store in its bookmarks and/or

Getting backing bean value with Javascript

≯℡__Kan透↙ 提交于 2019-12-28 02:05:08
问题 JSF 2.0, Mojarra 2.0.1, PrimeFaces 3.4.1 There are similar questions but I need sth. else; javascript function has to wait for the backing bean method, which is filling the variable that wanted to be pulled from js function. What I want to say is: <p:commandLink action="#{statusBean.getStatuses}" oncomplete="afterLoad()"/> Assuming js function just getting the value and printing it to the screen. function afterLoad() { alert("#{statusBean.size}"); } And here is the birthday kid: @ManagedBean

JSF View scope in Spring

筅森魡賤 提交于 2019-12-28 02:04:45
问题 Is there any scope like JSF @ViewScoped in Spring 3.0? I have an application using JSF+Spring where backing beans are managed by Spring. I didn't find any scope like JSF wiew scope in Spring. I saw the blog Porting JSF 2.0’s ViewScope to Spring 3.0, but it didn't work for me. Here's my attempt on the custom Spring scope: import java.util.Map; import javax.faces.context.FacesContext; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.config.Scope;