managed-bean

Primefaces DataTable filtering and RowSelection not working

大憨熊 提交于 2019-12-08 08:43:05
问题 I'am new to PrimeFaces. I'am using it to code the front end of a Saas Application. I' am using a primefaces datatable to display a list of customers. I need to sort and filter the values. Also I need to populate another widget when a row is selected on the datatable. Sorting works but filtering and selection don't work. Below are the code snippets of the bean and the faces page. I'am using PrimeFaces 2.2.1 and JSF 2.0.2. <html xmlns="http://www.w3c.org/1999/xhtml" xmlns:h="http://java.sun.com

Help me to understand JSF managed bean scope from concurrency view

痴心易碎 提交于 2019-12-08 06:58:28
Can anyone help me to understand the JSF managed bean scope from a concurrency perspective ? My Understanding: Once i have a bean scoped in a session scope that's mean : there is only one user can access this managed bean so there is no possibility to concurrency occur. Also, once i use a bean in a request scope then this bean will be created once a request had initiated and that bean will be removed once a response returned. (each clients have different copy of this bean) Also, once i use a bean in a none scope then once the user call the bean it will be created and after finish the call the

Help me to understand JSF managed bean scope from concurrency view

╄→尐↘猪︶ㄣ 提交于 2019-12-08 05:40:02
问题 Can anyone help me to understand the JSF managed bean scope from a concurrency perspective ? My Understanding: Once i have a bean scoped in a session scope that's mean : there is only one user can access this managed bean so there is no possibility to concurrency occur. Also, once i use a bean in a request scope then this bean will be created once a request had initiated and that bean will be removed once a response returned. (each clients have different copy of this bean) Also, once i use a

@Injected @ManagedBean gets reinitialized despite of @ApplicationScoped annotation

只谈情不闲聊 提交于 2019-12-08 05:11:10
问题 I am writing a simple JSF application for converting currencies. There is a Rates class which holds the data, Currencies class for managing requests and Manage class for adding new currencies. My problem is: I want the currencies to be persisted as a property of Rates class hence my use of @ApplicationScoped . However I can see that Rates keeps getting reinitialized with every single request . Here's my code of Rates : @ManagedBean @ApplicationScoped public class Rates { private Map<String,

javax.el.PropertyNotFoundException : Target Unreachable, identifier 'login' resolved to null Spring + JSF [duplicate]

本小妞迷上赌 提交于 2019-12-08 03:05:50
问题 This question already has answers here : Identifying and solving javax.el.PropertyNotFoundException: Target Unreachable (14 answers) Closed 3 years ago . I can't resolve my problem for getting null with my @Autowired service. Here's my code. My configuration file applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema

JSF managed bean redirect with parameters without viewing URL

旧城冷巷雨未停 提交于 2019-12-08 01:57:16
问题 I'm trying to redirect from one jsf to another by redirecting from the managed bean as folows: return "page2?faces-redirect=true&parameter1=a&parameter2=b"; but I can see the parameters in the url. Is it possible to redirect to page2 but without viewing the passed parameters? Thank's In Advance. 回答1: Store them in a cookie or the session. 来源: https://stackoverflow.com/questions/11718542/jsf-managed-bean-redirect-with-parameters-without-viewing-url

Which scope to use for a series of pages, each dependent on the previous page?

删除回忆录丶 提交于 2019-12-07 12:01:28
Currently I have four pages that are each backed by their own RequestScoped managed bean. An example of this would be the following... backing search.xhtml @RequestScoped SearchBean backing result.xhtml @RequestScoped ResultBean backing detail.xhtml @RequestScoped DetailBean backing action.xhtml @RequestScoped ActionBean In each page (except for the search page), I inject the bean from the previous page to access the input parameters. For instance... @RequestScoped public class Result { @ManagedProperty("#{search}") private Search search; private ResultData resultData; private Service service;

Integrating JSF managed bean annotations with Spring Boot

ぐ巨炮叔叔 提交于 2019-12-06 16:23:42
I use Spring boot with JSF 2.2. My problem is that I can create @ManagedBean from javax.annotation.ManagedBean and it is working in my index.xhtml when I run the app, but when I want to use javax.faces.bean.ManagedBean is not displaying the value. What's the difference between those two? Why I can't use the javax.faces.bean.ManagedBean ? ( I don't have web.xml file, all is configured in classes) Xtreme Biker reinstate Monica The javax.annotation.* annotations are meant to be a move from the classic JSF annotations to a CDI approach. The Spring Framework has the ability to read some CDI

Primefaces DataTable filtering and RowSelection not working

耗尽温柔 提交于 2019-12-06 16:01:30
I'am new to PrimeFaces. I'am using it to code the front end of a Saas Application. I' am using a primefaces datatable to display a list of customers. I need to sort and filter the values. Also I need to populate another widget when a row is selected on the datatable. Sorting works but filtering and selection don't work. Below are the code snippets of the bean and the faces page. I'am using PrimeFaces 2.2.1 and JSF 2.0.2. <html xmlns="http://www.w3c.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head>

@Injected @ManagedBean gets reinitialized despite of @ApplicationScoped annotation

倖福魔咒の 提交于 2019-12-06 15:45:51
I am writing a simple JSF application for converting currencies. There is a Rates class which holds the data, Currencies class for managing requests and Manage class for adding new currencies. My problem is: I want the currencies to be persisted as a property of Rates class hence my use of @ApplicationScoped . However I can see that Rates keeps getting reinitialized with every single request . Here's my code of Rates : @ManagedBean @ApplicationScoped public class Rates { private Map<String, Double> rates = new HashMap<String, Double>(); private Set<String> currencies = new HashSet<String>(){ {