Questions tagged [jsf-2]

JavaServer Faces (JSF) is a model-view-presenter framework typically used to create web applications. Version 2.x is a major step ahead compared to JSF 1.x, significantly expanding the standard set of components and component libraries.

jsf-2
4,541 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
1 answer
2k views

JSF composite components in JAR not recognised in NetBeans

I have added a common JAR to my project. The jar looks something like... CommonWeb.jar |-- META-INF | |-- resources | | `-- common | | |-- css | | | `-- my.css ...
Daniel Loiterton's user avatar
9 votes
1 answer
404 views

Wrong JSF 2 ID Chaining

Situation JavaServer Faces Version: 2.1.6 I got a parent composite component with two nested cc. One of them contains a HtmlPanelGroup, which has a component binding. I use that binding to ...
FeHe's user avatar
  • 156
8 votes
0 answers
2k views

why facelet html validator in eclipse is taking endless time

I am using Eclipse Luna to implement JSF2.1 web application, and each time i open the project the facelet HTML validator starts, I am used to eclipse Helios and it was faster than luna in validation, ...
Marwa Dosoky's user avatar
8 votes
1 answer
6k views

JSF1027: [null] The ELResolvers for JSF were not registered with the JSP container

i am using javax.faces-2.0.10.jar on websphere 8.5 and i am using jboss-el-2.0.0.GA.jar and in my web.xml i have the following configuration for el: <context-param> <param-name>com....
Mahmoud Saleh's user avatar
8 votes
1 answer
863 views

Getting an EL in a Javascript file, loaded by @ResourceDependency

I'm using @ResourceDependency annotation in a JSF component to add Javascript and CSS files into my JSF page. In my Javascript file, I need to reference another resource file (a .swf file, which ...
Yonatan's user avatar
  • 2,541
8 votes
1 answer
2k views

Cross Field Validation with inline messaging in JSF with JSR 303

What's the best way to invoke class level JSR-303 constraints that do cross field validation from JSF and have the resulting messages get translated to a FacesMessage and be tied to a particular JSF ...
ghilton's user avatar
  • 81
7 votes
0 answers
267 views

Using JSF Composite Component with JBoss EAP 6.2 Modules

How can I expose composite components to JBoss through modules? The component works correctly in the same project, the project can correctly refer to other classes within the depended on module, but ...
Evan Knowles's user avatar
  • 7,475
7 votes
0 answers
2k views

Export Dynamic HTML to PDF in JSF , PrimeFaces?

I want to convert a HTMl file into a PDF file using Primefaces. I am familiar with JavaScript Exports. Is there a way to have the same in JSF,Primefaces. Need reference document or links which ...
09Q71AO534's user avatar
  • 4,360
7 votes
2 answers
2k views

JSF 2.0. Unable to get POST parameters and cookies in preRenderView event handler

I am trying to develop a service. The point is that my index.xhtml should get parameters (either POST and GET) and cookies from HTTP Request. I tried combination with <f:metadata> and <f:...
Jerome's user avatar
  • 2,427
7 votes
3 answers
2k views

Issue with JSF ui:composition and composite component

I'm trying to find out if this is a JSF/EL issue or something wrong here. Basically, I wanted to pass an item object as a ui:param to a ui:composition and have a button inside (i.e. bootstrap buttons ...
Jordan's user avatar
  • 370
7 votes
1 answer
3k views

How can I dynamically generate a CSS for a JSF custom component

I am developping a JSF custom component performing "responsive" multi-columns display. It uses the "CSS Multi-column Layout Module" ( http://www.w3.org/TR/css3-multicol/ ) (tutorial in French : ...
Ludovic Pénet's user avatar
7 votes
1 answer
2k views

Refreshing URL with JSF ajax request

I'm using JSF 2 with PrettyFaces and also the <h:link> and <f:param> tags extensively to get bookmarkable pages (It's great to finally forget about all those POST request in a JSF ...
apcuk's user avatar
  • 194
6 votes
0 answers
2k views

Use the browser local storage with JSF2 and Primefaces

Hi this is not strictly a question, I would like to share my solution to use the browser local storage with JSF2 and Primefaces. I found very little information on using local storage with jsf2 and ...
iljkr's user avatar
  • 161
6 votes
0 answers
896 views

How to add comment in h:panelGrid without causing it to generate empty TD

I've found that if I add comment inside panelgrid tag, it will generate an empty <td> for it. I've found this link about this issue: https://java.net/jira/browse/JAVASERVERFACES-1768. ...
HockChai Lim's user avatar
  • 1,695
6 votes
1 answer
1k views

Composite Components with Composite Children mixing up values when used with ui:repeat

I am trying to make two composite componenets play well together by nesting one as a child. The setup consists of a lightbox and a input both with an attribute called "Value". This works fine, until i ...
Rune Klein's user avatar
6 votes
1 answer
197 views

Migrate composite-component to custom-component

I have to migrate a composite-component to a custom-component. This example is rather simplified, but demonstrates the problem: the childs of my component (my:test) need to be rendered in another ...
Thor's user avatar
  • 6,627
6 votes
2 answers
4k views

JSF2 h:selectOneMenu shows old value when Validation Failed

I have a form with few input fields & a select one menu. All fields are required="true", firstName, lastName, emailAddress, password, country. Test Case # 1: 1) Enter values in all input fields, ...
uday's user avatar
  • 315
6 votes
0 answers
2k views

CDI @Conversation not propagated with handleNavigation()

I have a problem with the propagation of a long running conversation when I redirect the view by the handleNavigation() method. Here is my test code: I have a conversationscoped bean and two views: ...
Thomas Kernstock's user avatar
5 votes
0 answers
492 views

poll interval get change when the page get refresh in JSF

I used JSF poll tag to reload a data table in my JSP. And there is another JSP in the footer. It has a button to reload the page with new data. When I click on the button on the footer, it get change ...
Harsha's user avatar
  • 400
5 votes
0 answers
2k views

Validate cell editing in Primefaces using a Validator

I have a datatable as following : <p:dataTable id="dataTablePlanningSalleAppareil" styleClass="dataTablePlanningSalleAppareil" editable="true" editMode="cell" ...
Renaud is Not Bill Gates's user avatar
5 votes
0 answers
986 views

Filter for JSF table

I would like to add filter for JSF table and limit the values based on filter value. <h:inputText id="search" value="#{accounts.searchString}"></h:inputText> <h:commandButton value="...
Peter Penzov's user avatar
  • 1,254
5 votes
0 answers
649 views

JSF: How programmatically force clearing of the Facelets cache (so can trigger from a button) in a Glassfish web app

This question is spawned from Mac: JSF: why are development stage JSF web apps not always catching composite component changes?. If I can answer the question here, I will have a brute-force strategy ...
Webel IT Australia - upvoter's user avatar
5 votes
2 answers
4k views

Facing Critical Performance issue in Primefaces 4 & 5

I am working on a project which deal with heavy data sets. I am using Primefaces 4 & 5, spring and hibernate. I have to to display a very huge datasets such as min 3000 rows with 100 columns with ...
arvin_codeHunk's user avatar
5 votes
2 answers
3k views

Running jsf 2.2 on jboss eap 6.0

When I am trying to update the jboss 6.0 eap to work with jsf 2.2 i am getting the following error. I have updated the jars and the appropriate module.xml files in javax/faces/api/main and com/sun/jsf-...
user19999111's user avatar
5 votes
1 answer
2k views

How to express 'null' value from web service as real null or empty string instead of 'null' string

In my application, I am using JSF and Java Web Services. When any of my web-service functions return a null value, it is always expressed as a "null" string. As a consequence, I cannot use EL ...
Mr.J4mes's user avatar
  • 9,238
5 votes
0 answers
2k views

Clear Client Side SSL State on Logout (using two-way SSL)

I'm working on a project that requires two-way authentication to identify the user to the server. The server then shows information and options available to that user based on their identity. I put ...
AceFunk's user avatar
  • 682
5 votes
0 answers
723 views

Compiling JSF 2 facelets within a unit test for correctness

I am trying to use the Mojarra JSF 2 compiler programatically with a view to checking the correctness of the xhtml of any pages. I have got so far but the compiler is not erroring for tags that don't ...
user1557979's user avatar
5 votes
2 answers
1k views

How to sort by JSF label in sortable datatable

I am showing a (language specific) label for values in a column. The column is sortable and the JSF label is different from the database value. I am using a primefaces datatable with pagination. How ...
jonnie119's user avatar
  • 421
5 votes
0 answers
2k views

How to limit to store the no of views in session for prime faces application

We are using primefaces 2.2.1 version in our application. We would like to restrict to store the no of views storing in session to 3. I have configured my web.xml like as : <context-param> &...
Sydaiah's user avatar
  • 205
5 votes
2 answers
2k views

JSF 2.0: POST/Redirect/GET pattern when action method return null (stay on the same page)

I need to avoid double POST on refresh. So I'm using POST/Redirect/GET pattern (faces-redirect=true) and navigation handler (by @BalusC) like in this post. How to use that pattern in JSF 2.0 when ...
marioosh's user avatar
  • 28k
5 votes
1 answer
1k views

Drag and drop between different layouts

I have a page with p:layout tags ( left & center ) . In the left layout i have a list of elements which are draggable.In the center layout i have a panel which is droppable.The problem is that the ...
PunithaN's user avatar
5 votes
1 answer
1k views

"URI is not registered" when use http://xmlns.jcp.org/jsf/html" in XHTML page

pom.xml file <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-impl</artifactId> <version>2.2.0-m08</version> <scope>...
darshakat's user avatar
  • 689
4 votes
0 answers
1k views

@Resource annotation not working while injecting DataSource in Tomcat Web Container

I'm developing a small Web App and using a lightweight Tomcat Web Container 8.5.4, JSF 2.2.9, and MySql. In OrdersBean class, I am trying to use @Resource annotation to inject DataSource @...
Mahesh Kakade's user avatar
4 votes
0 answers
1k views

Dynamic images with StreamedContent

I have implemented two StreamedContent beans to dynamic load a graphic image, following the solution found here 1) With the first one I display images in a contentFlow (EVERYTHING OK) <p:...
Neo's user avatar
  • 1,337
4 votes
0 answers
317 views

Composite component with action attribute conditional validation check throws ClassCastException during restore view phase

I have a JSF composite component(Name Panel). In that component I am using customValidator like below: <h:inputHidden id="nameValidator" value="true"> <f:validator validatorId="...
Gaurav Jeswani's user avatar
4 votes
0 answers
712 views

Is there in JSF a standard way to add an HTTP header to all queries?

Is there a standard mechanism in JSF 2.2 allowing me to include an HTTP header in all HTTP requests, regular or partial ? I am looking for a solution to have the content of the "Authentication" ...
Ludovic Pénet's user avatar
4 votes
1 answer
1k views

Add facet to primefaces panel from bean

<h:form> <p:dashboard id="board" binding="#{fundamentFormCreatorBean.dashboard}"> </p:dashboard> </h:form> FacesContext fc = FacesContext.getCurrentInstance();...
sitaram chikkala's user avatar
4 votes
1 answer
301 views

Add PrimeFaces componets in pe:dynaform from bean

I would like to add PrimeFaces components like inputText, calendar etc dynamically from bean. I have tried in several possible ways, but I couldn't add PrimeFaces components dynamically from bean. ...
asif md's user avatar
  • 41
4 votes
1 answer
1k views

RowEditEvent not sending new values primefaces

When I add a new row to the list it will be added just fine. However trying to edit the row will open it in editmode. But no new values that I have entered will be passed to the backing bean. Crash ...
user2130951's user avatar
  • 2,701
4 votes
0 answers
2k views

c:forEach items not updated from backing bean

I cannot update the list in a <c:forEach> by a backing bean. I am working with PrimeFaces 5.0 and JSF 2.0. This is my simplified JSF code: <c:forEach var="i" items="#{dataset....
Ago's user avatar
  • 41
4 votes
0 answers
6k views

primefaces fileupload required attribute not working

I have a JSF form which contains a Primefaces fileupload component. The required attribute of the fileupload component is not working; When I hit the form's send button without file attachments, the ...
NotGaeL's user avatar
  • 8,434
4 votes
0 answers
1k views

Handle ViewExpiredExceptions from AJAX requests with Primefaces 5.1

I have a JSF 2.1 + Primefaces 5.1 web application and I want to handle ViewExpiredExceptions. Besides the configuration in web.xml (mapping the exception to a location via <error-page>), I read ...
Baderous's user avatar
  • 1,069
4 votes
0 answers
563 views

p:media PDF data content disappears after any ajax event on the same view in IE

PrimeFaces media tag displayed the PDF content properly on the page load. But when I click download link on the same page the report content on the object tag has disappeared. The Object tag is ...
Senthil's user avatar
  • 41
4 votes
0 answers
2k views

How to avoid sharing of values stored in StateHelper of composite components placed inside PrimeFaces datatable?

My composite components share values stored in StateHelper when placed inside PrimeFaces DataTable. The most of examples about keeping component state that I've seen suggest to use getStateHelper()....
toxich's user avatar
  • 41
4 votes
0 answers
3k views

How to pass values from p:selectOneMenu to managed bean and get it back into view using p:ajax

xhtml code: <p:selectOneMenu id="destinationCountryId" style="width:150px" value="#{trafficMBean.traffic.destinationCountryId}" required="true" requiredMessage="Destination Country is required" &...
user3877167's user avatar
4 votes
1 answer
160 views

How to protect XHTML files from editing

I am developing a JSF application and the archive (war) will be given to multiple customers and will be separately deployed on their own Tomcat servers. This is just a front end application and it ...
prageeth's user avatar
  • 7,307
4 votes
0 answers
5k views

primefaces datatable row select not working after filtering or sorting

I have a problem with primefaces datatable which implements filtering and sorting and select rows (like complex datatable in primefaces showcases), when I sort or filter in datatable, SelectedElement ...
user3656541's user avatar
4 votes
0 answers
520 views

Primefaces f:setPropertyActionListener inside p:dataGrid is only working on first register

I'm using primefaces-4.0 and getting a really strange behavior. There's a collection of layouts layoutMateriaMB.listaLayouts and I iterate on it creating a p:dataGrid where each column represents a ...
wintermute's user avatar
4 votes
0 answers
772 views

Keeping @ViewScoped property states in composite component backings

This question is related with my previous one about initializing composite components. Providing I've got a homegrown composite component and a @ViewScoped managed bean, I want certain properties of ...
Aritz's user avatar
  • 31.2k
4 votes
1 answer
3k views

Primefaces 4.0 resource compression

I have Primefaces 4.0 running on top of JBoss 7.1.1.Final. I am using google webutilities (https://code.google.com/p/webutilities/) to compress and combine my javascript and CSS files. When I run ...
drodil's user avatar
  • 2,302

1
2 3 4 5
91