jsf

JSF Customize validation message for h:selectOneMenu (if nothing selected)

I have a h:selectOneMenu thats filled with enum values, which works fine. The only problem is that i don't know how to overwrite the standard JSF error message, when no valid value is selected. The error message is always bv:title: 'Choose' must be convertible to an enum from the enum that contains the constant 'Choose'. Although i have ...

Implementing subtables in JSF 1.1

We're looking for a way to implement subtables in JSF 1.1. We cannot use Rich Faces due to the fact that out target server is WebSphere 6.1. I've tried JSTL and Tomahawk to no avail. Also, our project is using JSP's and not facelets. ...

JSF Back Link with Javascript

What is the best way to have a back link? I tried the following: <ice:commandLink onclick="history.back();"> <ice:graphicImage value="/images/btn_back.gif" title="Back"/> </ice:commandLink> However, this doesnt seem to be exactly the same as clicking the back button on the browser. Specifically I get some problems with managed...

displaying sql exception in JSF

I was wondering how would I be able to show SQL errors generated during update, delete, select * etc in JSF. Any help would be appreciated. ...

JSF 2.0 webdevelopment in Intellij 9 for JBoss 6

Hi *, I was wondering what would be the most practical approach to JSF 2.0 web development using IntelliJ 9, targetting JBoss 6. My project has a Maven Structure, though I would like to shortcut the build/deployment cycle as much as possible. How can I exploit the flexibility of an exploded WAR? Can somebody point me into the right d...

how to settle JSF combobox with values depending on another combobox if both are set to required

Hi, everybody! Can anyone tell me how to automatically set <h:selectOneMenu> (or any other component) with values depending on another <h:selectOneMenu> if there empty elements with 'required' set to 'true' on the form? If to set <a4j:support event="onchange" reRender="anotherElement" immediate="true"/> then nothing is changed because ch...

Interrupt a JSF Ajax request

Hello I have a JSF application, in which a RichFaces modal panel is shown using a4j:status while an ajax request is being handled by my backing bean. I want to put a cancel button on the modal panel so a user can interrupt the request. What is the best way to do this? I'm thinking of something like having the cancel a4j:commandButton...

Has anyone seen this h:commandLink behavior?

I have a very simple JSF form: <h:form id="simpleSearch"> <h:inputText id="surname" value="#{myBean.surname}" required="true" /> <h:commandLink>Search</h:commandLink> </h:form> When this page is rendered, the anchor that is generated looks like this (for brevity, I stripped out the generated onclick code): Search<a href="#" o...

Richfaces extendeddatatable sorting problem

Hi all, I am developing a web app using JSF, RichFaces, EJB3, Hibernate and Seam. I have an extended data table and showing a list (say userList) which has multi columns in it. Moreover, because of that this datatable is selectable, I want to keep the selected row indexes even if the sorting is changed by the user. In other words of w...

RichFaces Drop down menu links to work in target panel.

Hello There, I new to RichFaces and have been tinkering with it for a few days, I was playing around with drop down menus and i can only see examples of rendering text when a tab is clicked, what i am looking for is to renderer a page when clicking a link in the drop down menu. Any pointers or help would be much appreciated. Cheers ...

Give me a JSF 2.0 tutorial

I am a novice of web developping (And my English is poor,too =_=). Now, I want to study JSF 2.0, hoping to find a step by step tutorial, who can help me? Thanks! ...

JSF 2.0 and MyFaces Tomahawk

I have been investigating a JSF upgrade on our existing web apps that are using JSF 1.2 & tomahawk 1.1.9 & no facelets , to use JSF 2.0 & tomahawk 1.1.9 This is my findings sofar : All the tomahawk components worked except for t:dataTable used with a t:dataScroller – BUT ONLY IF preserveDataModel="true" on t:dataTable. The workaround ...

How to embed and call a javascript script in a RichFaces/JSF page

Hello I've been looking around for a method to embed and call javascript functions in JSF pages. I'm also using RichFaces. To define the function, it appears I can do this in a cross-browser supported fashion: <a4j:outputPanel ajaxRendered="true"> <f:verbatim> <script type="text/javascript"> ...

expression not working in f:facet? JSF

Hello, This expression is not working :- <f:facet name="header"> Search Results for #{SearchResultsBean.searchPhrase} </f:facet> But if i just remove that line from outside f:facet, it works. Why is this happening? Is this the intended behavior? Thanks in advance :) ...

CDI timeout results in an NPE

Is there a way (in JSF 2) to catch a Conversation timeout and redirect a user to a new page? I'm getting nasty NullPointerExceptions when the conversation times out. I could redirect the user on all NPE's, but that seems like too big a net. ...

RichFaces Toolbargroup centering a group

Hello there I am trying use a toolbar so that it has three parts part A is aligned left part B is aligned Center part C is aligned right both the right and left i can use the location attribute ... but since there is no center attribute i am not able to center part b. I can use a rich:spacer but this makes the toolbar rigid and w...

JSF: Cannot catch ViewExpiredException

I'm developing a JSF 2.0 application on Glassfish v3 and i'm trying to handle the ViewExpiredException. But whatever i do, i always get a Glassfish error report instead of my own error page. To simulate the occurrence of the VEE, i inserted the following function into my backing bean, which fires the VEE. I'm triggering this function fr...

SelectOneMenu + CommmandButton

Hi I have the follonwing selectOneMenu <h:selectOneMenu value="#{modelsController.selected.idBrands}"> <f:selectItems value="{brandsController.itemsAvailableSelectOne}" /> </h:selectOneMenu> <br/> which is populated with all available brands in the bean. And I would like to create a button that retrives the brand ...

Setting initial state of a JSF component to invalid

Hi there I have a small JSF application where the user is required to enter some data about themselves. For each component on the page that has required="true" I want to show an icon depending if there is data in the field or not. My problem is that when the page is initially shown all fields are valid, even if they do not have any dat...

JSF Template Designing in SUN RI_1.101

Hi everyone We are using JSF in UI.We need to develop Templates for designing.Can we develop templates in SUN RI1.1_01.If so,can any one tell me how to start? ...