jsf

JSF - custom component, problem with expression for attribute

I want to create custom component with attribute "title" that can have expression but I get this error: Unable to convert string "#{myBean.text}" to class "javax.el.ValueExpression" for attribute "title": Property Editor not registered with the PropertyEditorManager Caused by: org.apache.jasper.JasperException - Unable to convert strin...

Enter Key Press behave like Submit in JSF

How to make Enter Key Press behave like Submit in JSF. It works with InputBoxes; but not with inputSecret boxes ...

Drag and drop the inside of a modalPanel

Using Richfaces 3.3.0GA, jsf 1.2_14 and facelets. I have a richfaces ModalPanel with an image inside as follows: <ui:composition> <a4j:outputPanel id="#{prefix}_a4jImagePanel"> <rich:modalPanel id="#{prefix}_imagePanel" autosized="true" domElementAttachment="body" rendered="#{examinationPanel.render}"> <f:f...

JSF RuntimeException: Cannot find FacesContext

When I write <h:outputText value="Login Name"/> tag in my JSP, I get the following exception message: Cannot find FacesContext Without that my JSP works fine. Here is my JSP: <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <%@ taglib uri="...

Dynamic navigation in JSF

I have a footer link "Privacy Policy" in my application. When user clicks this link we display some information on the page along with a "Back" link. Now requirement is when user click on the Back link I need to display the previous page from which he had opened Privacy policy page. For example User is on page A clicks "Privacy Poli...

Ajax render attribute don't work in a h:dataTable in JSF2

Hello everybody, I have some problem's with a simple application in JSF 2.0. I try to build a ToDo List with ajax support. I have some todo strings which I display using a datatable. Inside this datatable I have a commandLink to delete a task. The problem is now that the datatable don't get re-rendered. <h:dataTable id="todoList" ...

Difference in behaviour between javascript click() and user click on a button using JSF

I have a form which, when the button gets clicked by a user, redirects to another page, but when I simulate the click with javascript, the redirect fails. Tha ajax calls are exactly the same (except for the javax.faces.ViewState, but have different results. The form looks something like: <h:form id="form" onkeypress="trapEnter(event);"...

Non-existing values evaluate to some random value in facelets custom component

I have written a custom facelet component which looks like this: <ice:inputText styleClass="datepicker" required="#{required}" id="#{cid}" disabled="#{disabled }" validator="notnull" value="#{value}" rendered="#{empty binding }"> </ice:inputText...

OpenEntityManagerInViewFilter and testing the presence of an EntityManager

I posted a question a few days ago mentionning Spring's OpenEntityManagerInViewFilter: http://stackoverflow.com/questions/2385858/uirepeat-inside-a-uirepeat-and-lazyinitexception What I'd like to know is of a way to test if an EntityManager is available during a request. What is a good way of doing this? ...

When do browsers send application/octet-stream as Content-Type?

Hi! I'm developing a file upload with JSF. The application saves three dates about the file: Filename Bytes Content-Type as submitted by the browser. My problem is that some files are saved with content type = application/octet-stream even if they are *.doc files oder *.pdf. When does the browser submits such a content type? I woul...

Anobody succeeded in using ICEFaces with jQuery?

Basically jquery is usable with IceFaces. Then only problem arises when partial updates of the page are used. For example you have a panelgroup where a jquery datepicker element (jquery UI datepicker plugin) is used. If the panelGroup is visible from the beginning it's no problem. The jquery call to jQuery(".datepicker").datepick...

JSF selectItem question

Hi, Is there a way to dynamically create a selectItem list? I dont really want to have to create lots of bean code to make my lists return List<SelectItem>... I tried this: <ice:selectManyCheckbox> <ui:repeat var="product" value="#{productListingService.list}"> <f:selectItem itemLabel="#{product.description}" value="#{product...

JSF required field validation-need help

Hi, I am Rashmi.I have two forms in a single JSP page which are developed using JSF.Each form has one required field input and a submit button.On click of any of the button from any form,both forms should get validated and display required message.Please need help.......... sample code: <body> <f:view> <h:form id="form1"> <h:...

JSF in jetty-equinox, Cannot find Bean classes in other bundles!

Hi I have problems running JSF in an OSGi environment. I am using jetty web container and equinox to provide the OSGi functionality. The structure of my application is as follows: The first bundle has all the JSF libs, web.xml and a config.xml. It looks as the following: bundle1 ----src/mai...

How do I set the value of HtmlOutputTag in JSF?

Hello, I want to dynamically create controls in my bean. I am using JSF 2.0 HtmlOutputTag objHtmlOutputTag = new HtmlOutputTag(); Now which property of HtmlOutputTag should I set to set the content of HtmlOutputTag? ...

JSF Navigation issue Facelets and Beans

Hi, I have an issue with navigation in my simple jsf system. I have MainBean that has two methods: public String register() and public String login(). I have played with faces-config.xml for several hours and I feel like I miss something very important because I think like I have tried all simple solutions so far :). I have added the...

Streaming content to JSF UI

Hello, I was quite happy with my JSF app which read the contents of MQ messages received and supplied them to the UI like this: <rich:panel> <snip> <rich:panelMenuItem label="mylabel" action="#{MyBacking.updateCurrent}"> <f:param name="current" value="mylog.log" /> </rich:panelMenuItem> </snip> </rich:panel> <rich:panel>...

JBoss Seam: In ScopeType.PAGE I get: java.lang.IllegalStateException: No conversation context active

Hi all, I have a page-scoped component, which has an instance variable List with data, which I display in a datatable. This datatable has pagination, sorting and filtering. The first time gate into the page, I get this appended in my URL: ?conversationId=97. The page works correctly, and when I change datatable pages no now component i...

NullpointerException Binding not working JSF managed bean.

Hello, I created a simple HtmlInputText <h:inputText binding="#{IndexBean.objUIInput}" /> Then in my managed bean, it is :- private UIInput objUIInput; public UIInput getObjUIInput() { objUIInput.setValue("laala"); return objUIInput; } public void setObjUIInput(UIInput objUIInput) { System...

How to read a parameter passed to a facelet from a backing bean

Hi, I've written a facelet, and a corresponding backing bean, that implements user management (addition, deletion and so on). I'd want to be able to perform some custom processing when, for instance, a new user is added. There is a "create" button in the facelet, whose click event is handled by its backing bean. At the end of ...