jsf

How to integrate Spring ,JSF and hibernate

I'm trying to integrate spring with jsf portlet that uses hibernate.I just want to use spring DAO to get the best of spring transaction management. How could I do this in a simple way? It's worth to mention that I'm using ant. Thanks ...

i am using spring for hibernate only not as spring mvc and i am using jsf2.0 and now i need to implement AOP

Possible Duplicate: How to implement AOP with Spring i am using spring for hibernate only not as spring mvc and i am using jsf2.0 and now i need to implement AOP but I am not getting at what to do i am not following Spring MVC.. ...

h:selectBooleanCheckbox of rich:DataTable is selected except the last row when ajaxSingle=true is used for the selectAll button

Hi, I am facing issue related to ajaxSingle for a4j:CommandButton.I have a rich:Datatable with a column of checkboxes(h:selectBooleanCheckbox) and other fields such as firstname, lastname etc. There is a a4j:commandButton selectAll, when that button is clicked all check boxes should get selected.I have used ajaxSingle= true for the comm...

How to insert JSF page rendering time and response size into the page itself, at least partially?

I realize it's a chicken and egg problem and that it's not possible to accurately resolve the time it took to render a page (or the size of response) and insert that number into the page itself without affecting either measure. Nevertheless, I'm looking for a way to insert either number partially in a page of a JSF/Facelets/Seam applicat...

A very very strange error ClassCastException. PreparedStatement's setInt method.

Can anybody tell me why is this method not working? String strQuery = "Insert Into cust_subs (CustomerId,SubscriptionId) Values (?,?)"; PreparedStatement objPreparedStatement = Utils.getPreparedStatement(objConnection, strQuery); objPreparedStatement.setInt(2, currentSubscriptions.get(0) ); where currentSubscriptions is: List<Integer...

Can't access lazy annotated but initialized hibernate collection from JSF2

I have a many-to-many relationship between the two entities called events and artists, both are annotated to be lazy loaded. When I load an artist, I initialize its events because the session will be closed afterwards using Hibernate.initialize(artist.getEvents()); A test in pure Java works fine and I can access the events and its pro...

How to show alert message based on server response in JSF

I have the following link in one of my JSPs. When an user clicks on that link I'm calling an action in my backing bean. I need to show a JavaScript alert message based on the response of that action. <h:commandLink onclick="setSelectedClientAndFund();" id="next" action="#{fyeSelection.getFYEReportHome}"> <h:graphicImage value="../...

Curious problem with JSF - web bean doesn't get invoked until the second submit click

Hi, I'm having a simple form on which I want to check some basic functions - edit, delete, add. The web bean (supplier) has 4-5 attributes - id, name, surname and comment. After I load the view, I can invoke some web bean methods like add, delete and stuff. I use a simple commandButton as a submit component: <tr> <td><h:commandButton ...

How to highlight an input field with validation error with Trinidad (JSF)?

After failed client side validation of a form Trinidad shows error messages and highlights labels of failed inputs. I need to highlight the input fields themselves. Is it possible to do it somehow? The most desperate solution I can think of is attaching js event listener on DOMAttrModified event on labels, but it's really an awful hack. ...

How to Show JSF error message in between text fields when error occurs

I have a panel layout which has some text fields that require validation. What I need is to let error messages be shown between the fields (not on top or behind them): i.e I want the error message to take its own space and/or drag down the other text fields when the error occurs and everything returns to the way it was when the error van...

rendered attribute on inputText

I have a search form tied to a backing bean that contains 4 input text fields. The design i am working from indicates that the user should be able to see the search results, but they should not be editable. i decided to use the rendered attribute to show the inputs if the managed bean is empty, and to show an output text tag if it's no...

Problems with Eclipse (and m2eclipse)

Hi guys, I use Eclipse and I have serious problems :-( First I try to reconstruct my situation rudely for you: I installed Eclipse JEE Helios and JDK 1.6.0_21 and configured windows' system vaariables I installed m2eclipse I generated an archetype for a JSF Webproject I use Windows XP Professional SP3 So... now Eclipse has very bi...

problem with primefaces library (jsf)

hi all. i am new to primeface. i have tried to test an example of primefaces about tag as in its documentation, this is my jsf page code: <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%@taglib uri="http://primefaces.prime.com.tr/ui" prefix="p"%> <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <...

In JSF what is the shortest way to output List<SomeObj> as comma separated list of "name" properties of SomeObj

I have a question about outputing a list of objects as a comma separated list in JSF. Let's say: public class SomeObj { private String name; ... constructors, getters and setters ... } and List<SomeObj>: List<SomeObj> lst = new ArrayList<SomeObj>(); lst.add(new SomeObj("NameA")); lst.add(new SomeObj("NameB")); lst.add(new SomeOb...

primefaces poll tag does not work

hi all i am using primefaces library this is my jsp page source: <%@taglib uri="http://primefaces.prime.com.tr/ui" prefix="p"%> <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%> <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request...

How to use li and ul tag in JSF Framework?

How to use li and ul tag in JSF Framework? ...

how to avoid model code duplication with JSF and JPA

I'm new to JSF and am wondering if I got things right. Let's say I have a simple CMS that makes it possible to write pages. First, I define a JPA entity called Page: @Entity public class Page { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column private Long id; @Column private String title; @Column private Strin...

selectOneMenu with selectItems

Hi! I am trying to make a filter using selectOneMenu. I have two categories, when one is selectect, must filter the results shown, and also the second category. JSF code: <div id="box-categories" class="box-left"> <b>Filter by topic</b> <h:selectOneMenu id="cat1" binding="#{interfaceContainer.documentFormContai...

JSF2 Composite component tag incompatibility problem?

This code, a test case for a custom component using JSF2 Just for the record, the file: panel.xhtml , located at /resources/panels/panel.xhtml test.xhtml: <head> </head> <body> <panels:panel/> </body> </html> Returns the following html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/...

How does Java expression language resolve attributes? (in JSF 1.2)

So we all know that #{someBean.value} will try and get the content of some property on 'someBean' called 'value'. It will look for getValue(). However, what if this property is boolean? It will look for isValue(). What it won't look for is hasValue(). This got me thinking, what exactly does it do? this: http://download.oracle.com/docs/...