I have Facelet component and I have backing bean for it. When I include my component to some page I pass bean from page to my component:
<ui:include src="./WEB-INF/templates/myTemplate.xhtml">
...
|
I have done some reading and playing and I still have some questions I was hoping someone might answer:
So, can I use two or more backing beans in a single JSF ... |
I use JSF managed beans calling EJB methods that are provide data from database. I want to use some data already on the welcome page of the application. What is the ... |
I am using facelets. I have one class:
public class foo{
public static String foofookoo() {
return "tookoofoopoo";
}
}
How ... |
I have a requested scoped managed bean, called AuthenticationBean. I am developing a smal application with a login module, user activation and deactivation.
When I click on the activate or deactivate ... |
@Named
@ConversationScoped
@Interceptors(MyInterceptor.class)
public class BeanWeb implements Serializable {
public String methodThrowException throws Exception() {
throws new Exception();
}
}
public class MyInterceptor ...
|
I am using JSF 2.0 and attempting to pass values between different pages in my App.
The setup is as follows:
I have a page called userSelect that has a backing bean userSelectBacking. ... |
|
I know that in Seam, we could write an xml file (if my jsf page is named index.jsf -> index.page.xml) that we could add there
action execute="#{loginAction.checkIfBlaBla}"
so that JUST BEFORE the ... |
I have a jsf page with a form has an outputtext in it. The value of outputtext component is called from a backing bean (or managed bean). I know when I ... |
I have a database with some images. Could anyone explain me how I could load an image in a JSF page?
I already have a managed bean that converts an Image object ... |
Is it possible to have a managed bean created only on some pages i.e. bean != null on page1.faces and bean == null on other pages?
|
How can I forward to another page inside the constructor of a backing bean? I don't want to use redirect.
|
I need to do very simple thing - pass current URL from JSF (2.0) page to the managed bean. This is needed to get URL of the login form which will ... |
I am creating a database setting jsf page which shows the value from the properties file during the page load. The users then updates the page and press submit and ... |
i have one trouble with beanscope in one page
i know if i want redisplay in one page i can use viewscope but now i want get value form datatable pass from ... |
How to call a method in the bean when a JSF page is requested?
Example I have a JSF page "MyPage.jsf" and its backend bean "MyBean" and it has a method "myMethod()".
Is ... |
I'm currently developing an additional page to an already existing website. Actually that part isn't really that important - the page performs it's own separate functions.
Anyway, originally, this "page" consisted of ... |
I'm currently learning about JSF 2.0 and i dont know how to initialize something in my CDI bean everytime a jsf page is accessed ?
For example, let's say in my case, ... |
I'm new to JSF.
What i want is to click on something and when i do i want to run a bean method AND send the request with GET so i can ... |
I want to do something similar to this (in jsf 1.2):
<html>
...
#{myObject.foreignKey(parentObject.primaryKey)}
<h:inputText value="#{myObject.myProperty}"/>
</html>
Or in other words: from the web page I want to set a value in an object when arriving ... |
I'd like to use multiple instances of the same CDI Named bean in a JSF2 page. (Imagine I have a backing bean to access a contentmanager category, but I want to ... |
I have a page with a data table. I want some of the items in the tables to be linked to a corresponding view page.
For example, right now I have ... |
Im working with JSF 2.0 and Glassfish v3. I was testing the functionality of JSR303 bean validation, so I created a validator which implements ConstraintValidator and then annotate that ... |
I'm trying to reuse a jsf page by including using facelets into another jsf page, since this page will be used by a lot of other pages. But the problem is ... |
My JSF login page doesn't set the property in my bean. This is the part of my Login.xhtml:
<h:form>
<h:outputLabel value="#{controllerBean.foutmelding}" id="foutmelding"></h:outputLabel><br />
<table width="50px" align="center">
<tr>
...
|
What is the best approach to execute a method in a bean before the JSF page using that bean is rendered?
Update: I am trying to execute a method which would populate ... |
I have a JSF page that loads a User and allows me to assign Roles to that particular User. The Backing Bean, AssignRolesBean is @RequestScoped, and I would like for ... |
How can I render JSF tags like HTML tags?
For example I have some html code in a string field:
<pre>String code = "example <br/> example";</pre>
If I use
<pre><h:outputText value="#{bean.code}" escape="false"/></pre>
I will get
<pre>example
example</pre>
Now I ... |
I have one jsf page and popup other jsf page from it.
Now i get all value reset from backing bean in popup page.
please help..
|
I have a quite complicated request scoped JSF 1.2 managed bean with various methods and properties. Some of the properties are mapped to URL request parameters so that it can populate ... |
Following this solution I made an error page like this:
In faces-config.xml
<error-page>
<error-code>500</error-code>
<location>/errore500.xhtml</location>
</error-page>
....
<managed-bean>
<managed-bean-name>errore</managed-bean-name>
<managed-bean-class>it.jlp.prometheus.modello.Errore</managed-bean-class>
...
|
In my project, I am using myfaces 1.2, rich faces 3.3.3 and spring 2.5 for backing beans. I searched over Internet for this simple need all weekend but I couldn't managed ... |
I am trying to initialize a backing bean on page load. Already looked for many solutions, but most of them are using links,buttons or not having parameters at all.
scenario:
A customer logins ... |
I have a page where I use @ViewScoped bean. On page I get data from the bean, and call action on it. Something like this:
<h:form>
<h:dataTable value="#{partyBean.foundOrganisations}" var="party">
...
|
In my JSF page I have lots of other form elements along with a commandbutton. For some reason commandbutton's action my bean's method is not getting invoked.
If I create a test ... |
I have a JSF page(page 1) which returns values from another JSF page (page 2) and values are passed to backing bean properly. In fact values are passed to bean in ... |
I'am using facelets. I have one class (no managed bean):
package User;
public class User {
public static String getHello() {
return "Hello";
...
|
I've got a little problem I'd like to solve.
I use Apache Myface 2 with Tomahawk and Trinidad.
Trinidad delivers its Dialog Framework to create Modal Dialogs...
My problem is that after the Dialog ... |
I am new for JSF. In my project am using @ManagedBean, @RequestScoped. Am using 4 pages in my project. My problem was bean values not maintain in the second, third ... |
Can anyone tell me how to get user name in session bean correctly? In our application we do it by calling this method:
@Resource
private EJBContext _context;
private String getUserName() {
...
|
I have recently started learning Java EE 6 and I could need some help. I have made a search.xhtml page that has a form, some fields and a commandbutton. The action ... |
My requirement is " Our users are Authenticated by External System using SSO".
On successful authentication the external system returns header variables viz. userId,
firstName, lastName etc to our System.
Currently I ... |
A request scoped bean collects data, from all many other request beans & business logic. This bean is used through the EL expressions in the page but before this request scoped ... |
I am to do a web application with JSF, just to get and put a value from the JSF to bean and vice versa. I think I have done everything properly ... |
|
|
|
|
|
In the world of HTTP (whether JSF or otherwise), what happens in one tab or browser window has no effect on any other tab or window. Each is in effect, a completely separate program. HTTP cannot support true MVC operation. A server cannot post back unsolicited changes to the client. Only when the client requests data can any server-side changes be ... |
zohreh, are you sure? I have jspx page : |
Hi, I have 2 tables category and product. they have one-to-many relation in them. Category : cat_id(PK),cat_name,cat_desc Product : prod_id(PK),prod_name,prod_desc,cat_id(FK) As both have one to many relation so i have declared a set in Category Table. ----------------------------------------------- class Category implements Serializable { ........ Set products; @OneToMany(mappedBy="cat_id") public void setProducts(Set prod) { this.products = prod; } public Set getProducts() { return products; ... |
|
Hi guys, I have a small issue, I want to have a page with 2 beans, i.e. a page loads up with a search function, you search waht you need (first bean) and then results have a bean associated with them i.e. accept/reject (second bean). Each bean operates inside a different form. The first bean works fine, The problem i'm encountering ... |
I was searching the JavaRanch forums and found a person running into a similar scenario as me. There were no responses, but I was hoping that perhaps we might get more insight two years later. Similarly, I have a bean that generates a picklist, which is read from a database. I want to initialize the beans properties before the page loads, ... |
|
It's actually not good practice. Manage Beans are ideally simple JavaBeans and therefore shouldn't be aware of the framework - including whether they're running under JSF or even in a web application at all. You can break out of the box by chasing uphill from the FacesContext, but as I've mentioned in other posts on this forum, javabeans are best employed ... |
Hi all I would appreciate any suggesstions on the following scenario. I have the following. Page 1: Command Button Page 2: OutputText OutputText2 PrePopulateFields() When a user presses the command button on page 1 I wish to execute PrePopulateFields() and then direct the user to that page or redirect the user then call PrePopulateFields(); I'm not fussy so long as the ... |
|
When there is exception in the backing bean, a blank page is displayed. I was expecting response with status code 500. When I debug the http response the status code is 200. I have configured the webapp to display error page on status code 500. Since it is not returning status code 500, this page is not displayed. In web.xml ... |
|
I want to edit a page, and use a same Manage Bean that i use for Save a page. But when i define Manage bean scope request in Face con-fig then all values show null on Edit Grids...........If i change it to Session scope then its working fine.......... can any body help me about that problem........why this happen in Request scope??? ... |
Hi, I Developed a JSF(1.2) Application using Sun RI Components and muy Problem is The Constructor of Backing Bean of a jsf File getting invoked twice when a JSF Page is loaded. I Placed a System.out.println("Inside the LoginBean"); My Code looks like: For login.jspx the backing bean is LoginBean.java public class LoginBean { //Constructor public LoginBean() { // To get the ... |
|
|
|
I have a page where in the bean method I'm executing has validation code and when I go in and fix the validation error in my page and click submit again I am NOT getting to the bean in the Here is my bean method that I'm calling: public void createTransaction() { // Get selected dropdown values from submitted ... |
|
|
|
|
In case of custom validator class, is it possible to use it directly in the backing bean, like jsf2 annotation ? Or do we need imperatively to call the validator in the xhtml file with the f:validator ? I would like to simplify the view. Otherwise, is it possible to create new validator annotation ? Has someone any example of backing ... |
|
Hello, As we're debugging performance issues on our ear running in glassfish v1b14, we were surprised to see that our JSF backing beans get instantiated twice, apparently as the result of the execution of our JSPs twice as well, even though it's clearly within the same _RequestID. I can't imagine that's a feature! :-O It's impacting the performance of our site ... |
|