jsf

Using JSF, JPA and DAO. Without Spring?

Hi, till now i still worked with JSF and JPA without DAOs. Now i'd like to use DAOs. But how can i initialize the EntityManager in the DAO-Classes? public class AdresseHome { @PersistenceContext private EntityManager entityManager; public void persist(Adresse transientInstance) { log.debug("persisting Adresse inst...

JSF 1.2: valueChangeListener event not returning newly selected value

I have this backing bean: public class PageBean { private List<SelectItem> selectPages; private List<SelectItem> selectRowsPerPage; private String selectedPage; private String selectedRowsPerPage; private int pages = 0; // getter methods public boolean getRender() { boolean rendered = pages > 0? true: false; retu...

Using Post when doing a sendRedirect

Hi All, I have a requirement that a jsf page needs to be launched from a custom thin client in user browser (thin client does a http post). Since the jsf page may be invoked multiple times, I use a jsp to redirect to the jsf page with params on url. In jsp I do a session invalidation. The jsp code is below: <!DOCTYPE HTML PUBLIC "-//W3...

JSF + RichFaces gives me an HTTP Status 404 in my pages

Hi friends, probably this is a lack of attention issue, if so, forgive me, but I can't see what I'm doing wrong, it took me all the afternoon, I need you help. I'm doing a JSF + JPA + RichFaces app, it's pretty simple. I did the JPA project, tested, then the JSF project, tested, everything is working fine, but then when I pasted the Ric...

Spring MVC and JSF navigation rules together

I am trying to develop a sample application using both Spring Framework and JSF. Q #1. The big doubt I have is whether I should use Spring Controllers and view resolvers to perform page navigations? OR whether I have to use standard JSF navigation rules (in faces-config.xml) to handle page navigation? How can I evaluate which one is bet...

jQuery - want to hide row from rich:dataTable

Hi Guys, I have a rich:dataTable. I want to hide a row with this code: <c:if test="#{not empty documents &amp;&amp; documents.size!=0}"> <rich:jQuery selector="#_inboxTable_ tr" query="ready(function() { jQuery.noConflict(); if ( jQuery(this).find('checkboxStatus').attr('checked', true)) { ...

Is it possible to use JSF to build clean CSS layouts without using tables?

I want to look at using JSF but I'm put off by what appears to be the liberal use of html tables for layout by many components. How do you go about using JSF to develop css-based layouts? [edit] I seem to be labouring under a misaprehension here, but every JSF tutorial I've seen ends up producing table-based html layouts. I've also lo...

JSF Navigation Rules with Relative Paths

Say I am on a page at www.foo.com/foo/bar/page.jsf and want to define a navigation rule to go to www.foo.com/foo/ how would I define the <to-view-id> of the navigation rule. I thought it would be something like this: <navigation-case> <from-outcome>goToFoo</from-outcome> <to-view-id>/../</to-view-id> </navigation-case> but...

jQuery strange behaviour

Hi guys, I have a rich:dataTable and there i have a rich column with a span. When the page is loading this span takes some values like: true+false or true+true etc. Depending on this value, i hide the tr containing this span with jQuery like: <rich:jQuery query="ready(function() { jQuery('#inbox:_inboxTable_').find('span[title=test]')....

JavaServer Pages: How to get a value into an attribute from code without Expression Language?

I am using the MyFaces 1.1 ValidateRegExpr tag to validate the input from a user against a regular expression. I would like to be able to dynamically assign the regex pattern via code, but according to http://myfaces.apache.org/commons11/myfaces-validators11/tagdoc/mcv_validateRegExpr.html the attribute pattern does not support Expressi...

How do i get custom post-processing after binding to a backing bean ? Java Server Faces

Hi, What the best way to get custom post-processing after binding to a backing bean, similar to onBind event when using a Spring MVC controller ? I suppose i need a PhaseListener (after phase Update Model Values) as follows new PhaseListener() { public void beforePhase(PhaseEvent event) {} public void afterPhase(PhaseEvent e...

JSF components libs generate awful html-code. It's not OK but is it acceptable?

When I was developing web-apps with jsp/jstl and jQuery, I used to write nice html-code, separated from styles and scripts. JSP inserted some odd spaces and blank lines but nothing else. Now I'm trying to develop with jsf. JSF has lots of libs for creating RIA with numerous components so it should be much faster to develop web-apps wi...

Netbeans 6.5 Jsf use bean

Hi: I'm making an application for school, but i'm new to jsf, what i need is to ask the name of a student in one jsf page, and display it on a label in the jsf that appears after you select submit in the first jsf page. I think i need to use beans to send the parameters, but when I try to add one, it appears me an error that the class is...

Removing MyFaces Orchestra's "conversationContext" GET parameter from static resources (css, images)

MyFaces Orchestra adds a ?conversationContext=x to each resource on a page. Since I'm not using the conversation scope for the public part of my project (only for the admin part), I'd like to get rid of that parameter for two reasons: it breaks the browser caching of static resources it's ugly :) I'm now going to take a look at Orche...

JSF multiple backing beans on one page

I have done some reading and playing and I still have some questions I was hoping someone might answer: So, can I use two or more backing beans in a single JSF page? <h:intputText value="#{myFirstBean.firstProperty}" /> <h:intputText value="#{mySecondBean.secondProperty}" /> If I can, why should I not do it? (I assume I should not, b...

Accessing FacesContext in Util jar from multiple portlets

We have several JSF portlets running in a websphere portal environment. A developer wants to create a Utility jar which would live in the shared library, so all portlets could access it. In this jar he wants a faces utility class which would have a static method; this method would access the current FacesContext instance and return that ...

how to add a pager to dynamic datatable in jsf 1.1

Hi, i've been trying to add a pager to a dynamic datatable. I am using the BalusC code at :http://balusc.blogspot.com/2006/06/using-datatables.html Dynamic columns are working great, but now i need to programatically add a simple pager to allow the user to scroll through the records. I'm using jsf-ibm components, where there exists a...

problem completing renderResponse phase after redirecting to a servlet from a JSF page in portal environment

I have a commandLink in a JSF page in a portal environment. On clicking it, I redirect to a servlet (by calling facesContext.getExternalcontext().sendRedirect(//Servlet URL//)). the servlet is created for downloading an excel file from the server. A Save As File dialog opens up with the JSF Portal page in the background. This works f...

question to extendedDataTable, sortBy

Hello everybody, I use ExtendedDataTable and try use sortyBy and GroupByColumn. I want to implement following behavior: If I click on the header to sort the column, then this column should be taken for GroupByColumn. I didnt found anywhere what listener is called, if I sort the column in UI. Can anybody help me? thank you. <rich:ext...

rich:tabPanel has a strange Behaviour: it does not select the correct tab

Hello everyone. I've found a strange behaviour using rich:tabPanel in RichFaces 3.3.0.GA and Facelets 1.1.14 The problem occurs when I try to nest a tabPanel in a rich:panel, simpleTogglePanel, or h:panelGrid. The panel is in sever mode. It suddenly switch to first tab. It's not that easy to reproduce: If I've got three tabs: click...