managed-bean Questions
1
Solved
Suppose we have a package foos containing classes, which all of them implements some IFoo.
We also have a class, Baz which contains a data-member, List<IFoo> fooList.
Is it possible to injec...
Rajewski asked 13/2, 2016 at 16:17
11
Solved
I came across the terms "managed bean" and "backing bean" in several forums. Many people think both are the same. But, there seems to be a slight difference. Can any one help me to understand the e...
Hirohito asked 17/1, 2011 at 13:9
1
Solved
I'm using Mojarra 2.2.12 and in our project we've got a few @ApplicationScoped beans. For instance:
@ManagedBean
@ApplicationScoped
public class AppScopedBean{
private int commonValueForClients;...
Biomedicine asked 26/1, 2016 at 8:48
4
Solved
I can't seem to find a way to force an application-scoped managed bean to be instantiated/initialized when the web app is started. It seems that application-scoped beans get lazy-instantiated the f...
Mobilize asked 30/8, 2010 at 12:57
5
Solved
I'd like to register/add a Managed Bean class programmatically (from within a Servlet init()) into application scope.
How can I do that with JSF 1.2?
Delora asked 19/7, 2011 at 11:5
1
I'm using mojarra JSF 2.2.
The beans that we have defined are anotation based eg.
@ManagedBean(name = "codeBean")
@ViewScoped
public class CodeRuleBean implements Serializable
I am using tomcat...
Tamathatamaulipas asked 27/5, 2014 at 14:48
2
Solved
I have the below CDI managed bean:
@Named
@SessionScoped
public class InfoPageController implements Serializable {
@Inject
private InfoPageMapper mapper;
}
It throws the below exception duri...
Quinonez asked 28/8, 2015 at 13:41
1
Solved
A method in a managed bean is protected by JSF? See the code:
Managed Bean
@ManagedBean
public class My {
public void test() {
System.out.println("called");
}
}
XHTML
<h:form>
<h:...
Irons asked 13/8, 2015 at 1:35
2
Solved
I have a JSF managedbean
I am getting the error when a managed bean is referred from from JSF page in WebSphere AppServer.
<h:inputText value=#{bean}/>
The bean is defined in the faces-c...
Sula asked 31/5, 2011 at 19:9
6
I am trying to get a simple JSF 2 tutorial example to work.
I am using the dynamic web project in Eclipse and publishing to a Glassfish 3 server (run -> run on server). The first index.xhtml...
Chesty asked 21/3, 2012 at 17:11
1
Solved
I have 2 JSF managed beans A and B and I need to expire/destruct/destroy A after 2 minutes and B after 5 minutes. I checked this related question Timing out from a bean, but it is expiring whole se...
Higdon asked 10/6, 2015 at 6:32
1
Solved
The Question
Given that the archive we deploy is an "implicit bean archive" (see below), using @javax.inject.Inject to inject a @javax.annotation.ManagedBean into another managed bean work in Wild...
Lelalelah asked 15/8, 2014 at 13:14
3
Solved
I am just testing out this JSF page, so I don't set the action attribute in the <h:commandButton/>. This is a very simple form with 3 input boxes for First Name, Last Name, and Email, a...
Hurff asked 16/4, 2015 at 7:9
1
Solved
can I pass expressions to JSF 2 passthrough-attributes?
the following code is not working. expression #{country.isoCode} is not evaluated.
<h:selectOneMenu value="#{bean.selectedCountry}" style...
Laster asked 16/4, 2015 at 9:57
2
I am trying to access the values of some fields from the backing bean of a JSF page via reflection. The problem is that when I use the getter I get the correct value but when I use the get(obj) met...
Jelks asked 15/4, 2015 at 13:2
1
Solved
I have EJB stateless bean.
How can I inject it to JSF managed bean by programmatic instead of @EJB annotation?
Valli asked 26/3, 2015 at 5:39
1
Solved
I'm using <ui:include> to load a data table (I'm using Primefaces). I want use <ui:param> in the listener into the tag <p:ajax>. I tested the code that is down, but not trigger th...
Maser asked 17/3, 2015 at 16:40
1
Solved
I'd like to invoke a managed bean action method in an on* attribute. In my particular case I need to logout an user if the user is idle for 3 minutes as below:
<p:idleMonitor onidle="#{mybean.p...
Gyno asked 17/3, 2015 at 10:23
4
Solved
I have a managed bean (SessionScope as follow)
@ManagedBean(name="login")
@SessionScoped
public class Login implements Serializable {
private String userSession;
public Login(){
}
}
In this ...
Pompei asked 10/9, 2012 at 17:53
2
Solved
I have some legacy code that put objects as http session attributes using code like this:
MyObject object = new MyObject();
Map<String, Object> sessionMap = FacesContext.getCurrentInstance()...
Schumacher asked 4/3, 2015 at 12:57
3
Solved
I would like to be able to retrieve a string from a message bundle from inside a JSF 2 managed bean. This would be done in situations where the string is used as the summary or details parameter in...
Anglaangle asked 8/6, 2011 at 0:8
3
Solved
I figured that there are two general ways to obtain an auto-created CDI managed bean instance via BeanManager when having solely a Bean<T> to start with (which is created based on Class<T&...
Orban asked 18/11, 2013 at 12:58
3
Solved
I have a problem with JSF 2.2 and CDI, my managerbean is not solved and this error appear
"value="#{userBean.user.name}": Target Unreachable, identifier 'userBean' resolved to null"
This...
Dopey asked 10/12, 2013 at 20:32
1
Solved
I am reading through this example in JBoss where a @RequestScoped bean backing up JSF page is used to pass the user credential information which is then saved in a @sessionScoped bean.
Here is the ...
Lempira asked 10/10, 2014 at 17:54
1
Solved
I read some post hear (specially BalusC post) and googled for the reason (not deep) but i couldn't find why shouldn't use entity bean as a managed bean. what's the reason? (I'm learning from "Pro J...
Homerhomere asked 21/8, 2014 at 16:28
© 2022 - 2024 — McMap. All rights reserved.