jsf

Why are Managed Beans not loaded in Tomcat?

Hi, I created a JSF 2 web application with facelets. The libs for JSF where stored at tomcat/lib, to share it between several applications. I thought maybe it would be better to store the libs inside the WEB-INF/lib folder of the application, to get the application more independent from server configurations. Now when I start tomcat vi...

in JSF - How to rerender a component on button press. (The smart way?)

Hi, I have a simple HTMLCommandButton that I want to cause a rerender to another component. I know of a simple way to do that - add an ajax support object and have it run on "onclick" event and rerender. <h:commandButton value="Submit" action="#{actions.submitToDB}"> <a4j:support event="onclick" reRender="Button0" /> </h:commandButto...

Creating dynamic controls in jsf managed bean?

Hello, I want to dynamically create object of HtmlDivElement in my jsf managed bean and add it to panel but it seems that HtmlDivElement is interface. So, how can i do it? ...

JSF Convert dates for title attribute

I need to put a date into the title attribute of an image so that it displays when the user puts the mouse over. Problem is I would like to change the date format. Any ideas? <ice:graphicImage value="bean.image" title="#{bean.date}"/> ...

JSF: How to invalidate an user session when he logs twice with the same credentials

I'm using JSF 1.2 with Richfaces and Facelets. I have an application with many session-scoped beans and some application beans. The user logs in with, let's say, Firefox. A session is created with ID="A"; Then he opens Chrome and logs in again with the same credentials. A session is created with ID="B". When the session "B" is created...

Are there any production quality JSF 2 implementations yet?

Are there any production quality JSF 2 implementations yet? If so what are they? ...

Large JSF dataTable backed by database that can handle paging/sorting

If have a large amount tabular data that I'm trying to display in a JSF datatable. Are there any any implementations or components out there that can handle database paging and sorting? I currently have to pull all the rows in the table back and handle paging and sorting client side in JSF. Unfortunately this is not very performant and ...

How do you use JSTL?

Trying to use JSTL but have the following problem: Index.xhtml page: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:fmt="http://java.sun.com/jsp/jstl/...

Facelets tab lib not recognised by Eclipse/Tomcat 6

Hello I included this in my index.jsp JSF file: <%@ taglib prefix="ui" uri="http://java.sun.com/jsf/facelets"%&gt; and Eclipse underlines the URL, hovering gives this: Cannot find the tag library descriptor for "http://java.sun.com/jsf/facelets" Deploying and trying to start Tomcat 6 using the Tomcat plugin causes this: |STDOUT| ...

How to define an onLoad function in JSF template that will be defined elsewhere

I'm designing the view for my site, which has a standard login and landing page, and I want to have an onLoad function called for my login page, but not for my other pages (yet). I've got a template.xhtml file, which has this insert: <div id="content"> <ui:insert name="content"/> </div> Then in login.xhtml I have: ...

Should I use Bean Validation with EJB 3.1, JSF2.0 and JPA?

I have a JSF 2.0 application that I would like to start adding validators for. A basic overview of the architecture of the app is as follows. I have Managed Backing Beans that contain instances of my JPA annotated classes and EJB's. The EJB's are responsible for accessing the database transactionally. The JPA annotated classes are value...

How to invoke ajax, so that it should refresh the table and update the column

Hi, In my application,i have four columns in my datatable.Initially, except second column all the other columns displays the value. The second column values should be displayed by automatic refresh. like Initially table looks like ID type Name Color 1 Benz White 2 Maruti Grey 3 Renault orange 4 VW pink Aft...

Facelets and JSTL (Converting a Date to a String for use in a field)

I need to convert a Date to a String within a page (I dont want to add loads of toStrings to my domain model so adding to the bean is not an option). <ice:graphicImage value="bean.image" title="#{bean.date}"/> The above code works but formats the Date in the default format...I would like to change the format. I have tried using JSTL ...

strange "String index out of range: 0" error

Hi, I have a huge application and at some point, when a redirect is involved i received this strange error: Caused by java.lang.StringIndexOutOfBoundsException with message: "String index out of range: 0" java.lang.String.charAt(String.java:687) com.sun.faces.application.ViewHandlerImpl.getActionURL(ViewHandlerImpl.java:652) org.jbo...

Request for code review of JEE authentication and authorization filter

Hi, I know it's a good idea to use well implemented standard software for authorization and authentication. But this time I wrote it on my own. It is used in a intranet only application, so security requirements are low. But I, as the developer, would like to know, how secure it really is. I would please you to review the code and give ...

Spring bean initialized on web app starts up

This is probably due to my ignorance of the Spring framewok but i am building a JSF+Facelets+Spring web app, i have a bean that whose init method i want to get called at the time the application is started. My problem is getting the bean initialized. I can reference the bean on a page, and when I go to the page, the bean is initialized,...

MyFaces 1.2.8 causes Tomcat 6 to crash on deployment

Hello I've got a JSF app built with MyFaces 1.2.8, Facelets 1.1.14 and building it with Tomcat 6 through it's plugin in Eclipse Ganymede. I've just installed the latest versions of the above libs and on build, the app deploys ok and the server goes to start and immediately I get this: javax.servlet.ServletException: javax.crypto.BadPa...

File Uploading in Icefaces

I have a little problem if someone can help. Actually it is relating to file uploading conflict behavior that when I browse and upload a valid file in icefaces (by using ajax push) and before clicking the save button of the form if I rename or remove the parent file, system is still saving the uploaded file. The question is that why it i...

ui:repeat inside a ui:repeat and LazyInitException

I'm currently experiencing a LazyInitException with a page containing code like the following: <h:form> <ui:repeat value="#{searchBean.storiesByTag}" var="iStory"> <ui:repeat value="{iStory.tags}"var="iTag"> <!-- Lazy init exception here --> #{iTag.content} </ui:repeat> </ui:repeat> </h:form> storiesByTag() is a bean method that...

Looking for good book for JSF 2.0

Hello, I'm looking for a good book to learn JSF 2.0. I have very good understanding of servlets, but little experience with JSF. I also want the book to include new JSF (2.0) features. ...