jsf

jsf databinding does not work

I am trying to create a page using richfaces, I created the following field <h:inputText value="#{petTest.pet.name}"/> faces-config: <managed-bean> <managed-bean-name>petTest</managed-bean-name> <managed-bean-class>petstore.PetTest</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> man...

Get the <f:param> value in a jsf page?

I'm trying to pass a <f:param name="id" value="{someValue.id}" /> and retrieve it in the next page (so I can put it in an output link). This is what I tried: <h:outputLink value="#{linkController.clientEdit}?id={id}">#{linkController.clientEdit}?id={id}</h:outputLink> The problem is, the part that is between the tag prints what I want...

JSF 2.0 and hibernate adding new objects to a postgresql database

Hi, I'm writing a JSF 2.0 application with Hibernate and Postgresql database. My problem is quite poor understanding on how to handle session with Hibernate when inserting data into more than one table at a time. I have a method savePerson. The method is called as many times as there are addresses submitted by a user but the object Pers...

JSF - Session-scoped managed bean does not have dependencies re-injected on session deserialization

I'm not sure if what I'm doing is wrong, or if I just missed an annotation or configuration item somewhere. Here's the situation: I have a JSF application with a session-scoped bean named SessionData. This bean has an application-scoped bean reference (of type ApplicationData) injected into it at creation time. This works ok when the...

JSF mobile web version. What technology to use?

We have currently developed a trading platform using glassfish and primefaces. The company is looking to expand the application and provide a mobile web version. What technology can I use that is stable and fast. I know there is touchfaces from Primefaces and Apache Trinidad. I have tried the touchfaces demo but it does not seem to w...

Jsf form action

Hi! I have simple JSF form: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:t="http://myfaces.apache.org/tomahawk" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"&gt; <ui:composition template="layout.jsp"> <ui:define name="title">Редактирование шаблона<...

Building a mobile web site

We are in the process of looking at allowing mobile devices to view our site. We have targeted 3 phones - BlackBerry, iPhone and Android. Being new to all this I have several questions. I am going to assume that what we are really looking at here is the browser capabilities of the devices and not so much the device itself (the device ...

Failed to get the test results for JSFUnit

I am trying to configure JSFUnit to run in my application. We are an ICEFaces app deployed on WAS 6.1. When I create my TestCase and access it from the following URL: localhost:9085/smagui/ServletTestRunner?suite=com.sma.gui.product.JSFUnitTest&xsl=cactus-report.xsl I get a report that says: testInitialPage Error Failed to get the...

Unable to instantiate class...because it's looking for the wrong one

I'm using IBM RAD with a WAS 7.0 application server. I'm developing a JSF project using RichFaces components and I'm having some trouble with one of the classes. Whenever I start my server, I'm getting this error in the console: [9/23/10 15:38:13:182 EDT] 00000016 annotation W com.ibm.ws.webcontainer.annotation.WASAnnotationHelper co...

Unicode characters are being saved incorrectly.

I have a mysql database with unicode text strings in it. My JSF application (running on tomcat 6) can read these unicode strings out and display them correctly in the browser. All the html charsets are set to UTF-8. When I save my object, even having made no changes, Hibernate persists it back to the database. If I look directly in the ...

JSF : how to force creating a new managed bean instance for every browse instance

Hi , I am using . and my managed bean is defined in session scope. when I open a new browser , the constructor of the managed bean is getting called for the first time. but after that, when I open another browser instance, I see directly the method is getting called instead of going thru the constructor of the managed bean. Is there a ...

Sorting datatable columns - data disappears

I have a jsp page which I'm using to display a datatable. If I look at the page in Google Chrome it displays fine, but If I click on the header to sort the column. All the data disappears and all I'm left with is the column headers and sorting icons. Sorting works fine in both Internet Explorer and Firefox. Has anyone seen this before? ...

JSF 2.0 NullPointerException exception after submitting commandButton

After mifrating JSF from 1.2 to 2.0 I begin to receive exception after submitting commandButton: javax.faces.FacesException: java.lang.NullPointerException at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.hand...

How can server push changes to an HTML page created using JSF?

When we create a JSF page, a client request allows generation of HTML dynamically using a combination of java code and HTML. Can we introduce hooks in the HTML page using JSF framework, that allow server to update the HTML page based on events occurring at the server? ...

Richfaces Datatable - Sort specific column on load

Is it possible to sort a datatable by a specific column when it first loads? Or does it need to be done using the DAO? When I put on ORDER BY in my SQL in my DAO, no data at all is returned in the datatable ...

How to specify &mdash; as an attribute value in JSF?

When I tried the next code: <o:weekSwitcher splitter="&mdash;"/> I received error "unresolved entity reference mdash". How can I work around this issue? ...

Seam Page Action Not Being Called

I've got a page that displays an entity, but before rendering the page I need to perform a lookup of the entity based on a parameter that is passed in. To do this, I'm trying to use a Seam Page Action declared in my pages.xml file to call the lookup action before rendering the page. My setup looks like this: pages.xml: <page view-id=...

JSF 2.0 h:inputText inside ui:repeat

Hello everybody! How I should change following example that after changes values in inputText not disappears after commandButton was submitted? I'm understanding why it happens, but I don't know how to fix it. <h:form> <h:selectOneMenu valueChangeListener="#{foo.selectChanges}" onchange="submit()" > <f:selectItem itemValue="...

jsf component with render attribute failing validation

Hi, all I have couple of panel grids with rendered attribute, on value change event of a drop down list, I make one of the panel grids visible, this works fine. But after the panel is displayed all the conversions and validations attached to components inside panel grid fail. Even if the component is single and outside the grid it fail...

where to find a open source project which uses one of more of (spring,struts2,hibernate,JSF)

Hi everyone, I would like to involve in a open source project, since I prefer web development and frameworks such as spring, struts2, Hibernate and JSF, I'd like to find such a project to get involved. Can someone point me to right direction or correct me if I'm search something that didn't exists? Thank in advance, Nuwan ...