jsf

JSF Render a SelectOneRadio with a PanelGrid

Hi, I need to render the following form: One Radio must be followed by Data (in panel grid). SelectOneRadio is rendered using an html table, and PanelGrid is also redered using owned html table. Can somebody help me to build this form using JSF ...

IntelliJ navigation

I'm using IntelliJ to do Java Development for an application where we use JSF in a few places. In the .jsp file I have defined my backing class and the code runs properly. My question is: How do I set up my environment so that when I center click on the method names, which use EL format, IntelliJ navigates to the proper method in the pr...

Include non-Facelet content in a Facelet template

Is there a way to have the content of an html file inserted into a Facelet template? The Facelets tag will not work since it is only for including Facelet content. To put it another way, I am looking for the Facelets equivalent to the JSP include directive (<%@ include file="..." %>). ...

JSF Myfaces NullPointerException: serialFactory

Hi Guys, Im a bit at my wits end here. Im getting the following in my logs when I try to render a JSF page: java.lang.NullPointerException: serialFactory at org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtils.java:182) at org.apache.myfaces.shared_impl.util.StateUtils.construct(StateUtils.java:149) at org.apache.myf...

JSF password confimation validation using ADF 11

How can I create a validator that validates if the user inputed the same values in the password field and the password confirmation field? I did it in the managed bean, but I prefer to do it using a JSF validator... The real question is, how to create a validator that access other JSF components other than the component being validated...

JSF CSS panelGrid - how to make its contained elements all constant width

For instance, right now I am trying to add a panelGrid to my page that contains X buttons. Each button has different lengths depending on how long the text is associated with it. I want to be able to specify at the panelGrid level to make sure every component stretches to meet the width of the panelGrid itself - instead of having to ma...

how to get jsf clientid of a component in datatable ?

hi there, i am trying to get the client id of a component in a datatable. the problem is that jsf puts row index before the component id automatically, i.e. <a id="mappedidentifier_table:1:mappedidentifier_Update" href="#">Update</a> for a link in the second row (index=1). i am using the following methods to get the clientId ...

JSF - calling FacesContext.getCurrentInstance() in a static context

Am I right in thinking that this may not be the best idea: private static Application app = FacesContext.getCurrentInstance() .getApplication(); ... or any other call to FacesContext.getCurrentInstance() when you can't be sure that the current thread of execution is due to a servlet request? The way I understand it, FacesCont...

how do i invalidate a session in jsf

I have a session scoped bean. WHen logging out i do the following final HttpSession session = (HttpSession)ctx.getExternalContext().getSession(false); Map map = ctx.getExternalContext().getSessionMap(); map.clear(); if(session != null) { session.invalidate(); } and then redirect to login page. but when signing back in i the ...

Facelet Custom Component - prevent rendering ui:insert content in custom component

Hi, this is my custom component definition: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions"...

ADF Faces 11g ignores the template when it navigates to the same page

Hi, I'm using ADF Faces 11g\JDeveloper 11g to develop a web application and using Weblogic 10.3 to deploy it. I'm having some issues when I navigate to the same JSP page. Example: I have a page using a template: <f:view> <af:document id="d1"> <af:form id="f1"> <af:pageTemplate viewId="/base/te...

Auto-logout in JSF Application

I have a JSF app and would like to have the user auto logout after a period of inactivity. Is there an standard way to do this? ...

JSF button to reset the session

Is there a way to reset (clear) the session for a user, when he clicks on a button? ...

After session timeout where does JBoss redirect users to?

After this is reached in JBoss: <session-config> <session-timeout>30</session-timeout> </session-config> where does it redirect users to? Can I change the page it redirects to? ...

JSF, writeAttribute("value", str, null) fails with strings obtained through ValueExpression.getValue()

Hello, I'm having a somewhat weird problem with custom JSF component. Here's my renderer code: public class Test extends Renderer { public void encodeBegin(final FacesContext context, final UIComponent component) throws IOException { ResponseWriter writer = context.getResponseWriter(); write...

In JSF, what's the difference between from-view-id and from-tree-id?

In JSF, in a typical faces-config.xml configuration, what's exactly the difference between from-view-id and from-tree-id tag? And when was the best time to use either? Any example would be much appreciated. ...

DOES jsf:commandLink does not supports Partial Refresh feature of Jboss portlets?

I am using jsf:commandLink in my xhtml. While configuring Partial Refresh feature in Jboss portlets, I am facing problem with commandLink. These are not supporting the partial Refresh. Any Workarounds? ...

Binding an Object Array to a Front-End in Java Server Faces

I have a Servlet which is called upon an Action and this Servlet is suppose to return a List of Objects. Now by having the Data Structure at the end of my Post my Servlet calls the Person.fetch() which returns an list/array of Persons. I want my Java Server Face to iterate through this list and call the getPresentation method on each ob...

Which Presentation Pattern would you choose to design a jsf-based app ?

Pros and cons of : Supervising Controller / Passive View / Presentation Model ... ...

Creating an "Edit my Item"-page in Java Server Faces with Facelets

Let's say that you have the following Facelet ( Using Facelets 1.1.12 ): edit_item.xhtml which i access with edit_item.jsf Now i have another page sending me to edit_item.jsf with the GET-paremeter ID the uri looks like this: http://mysite.com/edit_item.jsf?ID=200 How do you access a Bean and fetch the Information, and display this o...