jsf

JSF2: navigation flow question

I am not sure if what I want is possible, but it worth a try to ask. Let say, I have 2 pages: List.jsf and CreateNew.jsf. List.jsf display data from datasource as <p:dataTable>. CreateNew.jsf insert a new entry into the datasource. What I want is from CreateNew.jsf, when I click create, it create a new entry in a database, then return ba...

Display single record from database in JSP page through Java Servlet based on GET parameter, how?

I have a servlet that correctly returns the data I want from the database when it's doGet() method is called. I would like the doGet() to populate a java bean, which we then reference in the product.jsf page. I'd like call a URL like http://example.com/product.jsf?id=XXX And have the single record returned based on the ID based in the...

Render HTML table with JSF.

I need to render an HTML table from a Servlet, in response to an AJAX request. I'm wondering what the best way to go about this is? I've explored using an javax.faces.component.html.HtmlDataTable. One of the questions I have regarding this method is how to render the HTML once the table has been populated. From the looks of it, a Fac...

Dyanamic Graphs using jsf.....

My requirement is I need to populate dyanamic graphs in a jsp page. I am using jsf for my project. I planning to use "jfreecharts" but dont know how to bind my jsp page with the back bean. I have some drop downs on the basis of the selection I my BackBean is fetching the data from the DB. Can you please suggest me some procedure to that ...

c:when and c:if don't work

I can access my variable stored in a backing bean from my JSF2 page, so things like <h:outputText value="#{myBean.myValue}"/> work, and the value (which is an int btw.) prints okay. However, when trying to use this value in conditional expressions within c:if and/or c:when tags it never equals anything... so: <c:if test="#{myBean.myV...

Dynamic ui:include inside ui:repeat. Is there a simple solution?

I want to dynamically pick a facelet to render some item in my data list. The first try would be: <ui:repeat value="#{panels}" var="panel"> <ui:include src="#{panel.facelet}"> </ui:repeat> But it won't work since src of ui:include is evaluated too early. The facelet information is truly dynamic, so I cannot use c:forEach (not reall...

Paginated datatable with gmap markers in primefaces

Hi There, I have a paginated datatable and would like to add all the items in the current page as markers in a gmap. The iterable item in the datatable has getters for longitude and latitude. Is there an easy way doing this in prime faces? Thanks, Dwayne ...

jquery with jsf

Hi I have a problem integrating JQuery with JSF. I use Spin. and I have in my code: <script type="text/javascript" src="#{request.contextPath}/scripts/jquery.selectbox-0.5.js"></script> jQuery(document).ready(function($){ $.spin.imageBasePath = '../images/spin1/'; $('#spin1').spin(); $('#spin2').spin(); $('...

How to handle Code Error 500 in Richfaces

Hello, I'm using Richfaces 3.2.2 and need to show the user the 500 error page when there is Exception. The issue is that when I use ajax event I can't show the user the 500 error when there is an Exception. I've already defined the error page on web.xml. Excuse My English. Any suggestion please ? ...

JSF: h:dataTable vs h:panelGrid

In JSF, h:dataTable and h:panelGrid both create html table-tags. What is the difference between both? When to use one or the other? ...

<h:dataTable> and SessionScoped beans

Hi all! Problem: searching for some more suitable design . Goal: I want to have table of some user information and with button "change password" in column for each user, after click : "change password" button disappeared (rendered ="false") and a inputSecreat field appeared - user entering the password and submitting it (by clicking ...

JSF2.0+RichFaces3.3.3 suggestionBox inside a modalPanel

Following this example http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable&amp;cid=101317 I created a modal panel used for editing an entry. The difference is that one of my inputText fields has a suggestion box: <h:inputText id="entryName" value="#{controller.currentItem.name}" validator="#{controller.en...

JSF not rendered when the url has a parameter

My problem is that when I for example do this <h:outputLink value="changeinfo.jsf"> Change name <f:param name="change" value="name"/> </h:outputLink> then the requested url is http://localhost:45054/WMC/user/changeinfo.jsf?change=name My url pattern for the faces servlet look like this <servlet-mapp...

Send data to JSF welcome page

I am just getting started using JavaServer Faces and am having a bit of trouble wrapping my mind around how parts of the navigation work. What I want to do is have my application hit a java method before loading the welcome page in order for that data to be available on the welcome page. I know how to do this on other pages by creating...

JSF backing bean should be serializable?

I'm getting these messages: [#|2010-07-30T11:28:32.723+0000|WARNING|glassfish3.0.1|javax.faces|_ThreadID=37;_ThreadName=Thread-1;|Setting non-serializable attribute value into ViewMap: (key: MyBackingBean, value class: foo.bar.org.jsf.MyBackingBean)|#] Do these mean that my JSF backing beans should implement Serializable? ...

Using an animated GIF in a Dialog loading screen. JSF 1.1

This problem is the result of IE7 not displaying animated GIF's that are hidden. for reference: http://crunchlife.com/articles/2008/06/11/ie7s-inanimate-gif These 2 solutions involve the use of the setTimeout function and innerHTML. These examples use absolute URL's to the images. Since I'm using JSF, I would like to use relative UR...

Session timeout and re-direction on login

On session timeout we re-direct to the login page and if the user logs back into the portal he gets re-directed to the page he was trying to navigate in the first place. In our case, the re-directed page tries to fetch values from the session and it fails badly with exceptions and it works just fine when there is no dependency on pages ...

Are JSF/Seam/Spring suited for non-enterprise work? (website, not "web application")

I'm starting work on a new website (sort of an e-commerce product comparison thing) and I'm trying to choose what technologies to build it on. I've ruled out PHP and I don't think I want to use Python or Ruby. I really like Java and Hibernate so I started looking into Java-based web technologies. My problem is that all of the documentat...

richfaces how to detect mouse events

Hi, sorry if the answer to this is obvious but I couldn't find it. How do I detect if the user has clicked, dragged etc. on an image (or other element)? Thanks in advance! ...

jsf dynamic tag from string

hi all i want to show some data to the user the data maybe represented to user by different JSF tags based on a configuration for example some times it may represented by text and sometimes it may represented by graphical symbol or even chart also i want that this representation be customizable. how could i do this? ...