jsf

JSF loop reRender

Hopefully the title isn't too cryptic ... The problem we have is that we generate a bunch of input controls (h:inputOneMenu, h:inputText etc) from some Java List. Works fine EXCEPT the requirement is that these inputs validate on the fly. Again not so hard except that as there controls were generated in a loop the only possible reRende...

jsf: iterate in jsp

Hi! I am using jsf framework and want to iterate a list of Integers in jsp. The result should look something like the following: 1 2 3 4. The tags datascroller and datalist does not work in my case and it seems like jsf isnt very compatible with jstl tags. It stumbled upon x:iterator and x:forEach tag but didnt get it to work (actual...

Faces on WAS 6.1

Hello, I'm running Java Facets on a IBM WebSphere 6.1. I'm getting this strange error message when I start the server: [2009-07-21 15:49:35:784 CEST] 00000015 ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet Faces Servlet: java.lang.IllegalStateException: ApplicationAssociate ctor not called in same call...

Remove Session scoped managed bean on browser close

Hey all, In a JSF application, I want to remove a session-scoped managed bean when the user closes their browser window. I've used a link before that executes the following: session.removeAttribute("<nameOfManagedBean>"); This seems to do the trick nicely. However, I'd like this same code to run even if a user clicks on the "X" on th...

JSF navigation redirect to previous page

Once the user successful login to the system, the system will redirect the user to the homepage. Now my problem is, if the user clicks on the view account page without login to the system the system will redirect user to the login page. if user login to the system now the system will redirect the user to the homepage, in this case any me...

Faces Backing Bean initializing

I have a backing bean, and I'd like to load up a few lists when the bean is instantiated, so that the list may be used in a dropdown. Is there a method that only gets called when the bean is first made? ...

Strange website navigation mechanism

I am performing UAT on someone else's web-based application. the system is quite large with tens of forms, and hundreds of seperate input fields. Overall it seems well built and usable. I have noticed one thing that seems very strange to me. Every link I click on actually performs a POST request (containing details of the page I want) t...

Basic cache question

Say I have a JSF backing bean, request scope, that has a List as a member. In the backing bean, I have a method that is bound to a button on the page. When the button is first pressed, the method uses an EJB to populate the list. Upon subsequent presses of the button, I do not want the method to call the DB. So, I added a check: if(li...

Absolute url in jsp

Hi, While including css, js and images in my jsps I am facing a problem resolving relative urls. The urls get changed on refreshing the page or clicking the back button. I suppose one solution to the problem would be to include external files by using absolute urls. But I can't find out how to use a reference to the relative url and use...

JSF: Accessing Bean from Validator via field

I have a JSF validator that checks whether a Container Number string conforms to the ISO-6346 specficiation. It works fine, however I need to add some conditional processing in based on other values in the Bean where the Container Number comes from. This Bean can be of several different types. Is there any way to access the Bean in th...

jsf enter key pressed problem

i have a xhtml popup page which has two buttons.The two buttons have actionListener methods in their backing beans. When the user clicks enter how can i ensure that the first buttons actionListener method gets called. ...

JSF Exception: /main.jsp not found in external context as a Resource

Hi, I have a User Interface built using "IceFaces". And it's deployed on a portal built using "LifeRay". The UI application is getting undeployed automatically from the portal sometimes. And the log is showing the following error message :- javax.servlet.ServletException: java.lang.Exception: javax.faces.FacesException: Problem in r...

JSF authentication and authorization

What is the best way to go about implementing authentication and authorization for a JSF web application? Preferrably I'd still want to use container-based security, as I need to call EJBs that require the principal. I realize form-based authentication is a major struggle with JSF, but can I perhaps use a PhaseListener or something simi...

Lazy data loading with rich:dataTable and rich:dataTableScroller.

I am using rich:dataTable with rich:dataTableScroller. And I don't want load all my data from DB when initialize table, because I have very many records. I want that that rich:dataTableScroller show me real page count but load page only when I switch on in. I find some solution here But I want use rich:dataTable andrich:dataTableScroller...

JAAS tomcat login module possible method to pass ip address

I've been looking into a way of passing the client ip as well as the userid and password from a JAAS login page to the JAAS login module implementation in my web code. JAAS only allows the user id and password to be passed to the login module. My idea is to have a java script code to append the ip address to the user id and then call t...

warning in faces-config.xml integrating spring with jsf

Hello, I am trying to integrate spring into a jsf application. In faces-config.xml I have included this: <application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> but it shows a weird warning which I...

How can i change the unsorted icon for a rich:column?

Hi, Is there a way to change the default unsorted icon for a rich:column? I am aware that you can add sortIcon="/images/myPic.png", but i don't want to have to add that for every single column. I tried adding an attribute selector to my CSS file to "hide" the image: img[src="/app/a4j/g/3_3_0.GAorg.richfaces.renderkit.html.iconimages....

Default action on JSF pages (ie pressing enter on input fields)

A HTML page is created using JSF and facelets (xhtml). There are 2 h:forms that goes to different places. The user enters data on one form and presses the "Enter" key. Here is where it gets tricky. On IE 6 and above, either the forms action gets submitted (which usually points to the page you are on) which then just reloads the page, or...

JSFs: commandLink as a parameter for outputFormat

Hi, I'm in the process of internationalising some JSF files so am externalising strings (and the concatenation of strings using placeholders). I have very little experience with JSF (today and yesterday) so excuse me if there is an obviuos answer to my question! I have been using the h:outputFormat tag (and the f:param tag) successfull...

How to disable redirection to login page in JBoss, when the session expires?

I'm using JBoss AS 5 and JSF+Seam for my web application. I'm using FORM authentication and have defined the login page in "login-config" tag in web.xml file. I also have a filter which will check for the session expired condition and redirect the user to a session_timed_out page. Now the issue I'm facing is that when the session expir...