jsf

dataTable JSF Dynamic Scrollable

I was wondering, How do I make a dynamic scrollable datatable. For eg: Scroll bar should be visible after 15 records. I have a requestRowAction attached in each row, so, clicking the row should not change the scroll bar position. Any help would be greately appreciated. ...

JSF action on page load

Hi, Is there a way to execute an action when a page is loaded? (Using JSF 1.2 with ICEFACES) Cheers. ...

Display Exceptions in JSF | JSP Page

Hi, i'am using JSF and Spring in a web application. If the Spring Controller throws exceptions i map them to special views. Now I'd like to catch all exceptions which are thrown out of scope of the Spring Context. In my web.xml i've defined an error page. <!-- handle uncaught exceptions --> <error-page> <exception-type>java.lang....

JSF templating beginner's question.

Hello, I belong to Asp.Net but just starting to learn JSF. I wanted to know whether all features of MasterPage are available in JSF templating? I mean say suppose i have a menu in template, and based on roles menu changes. If the Admin logs in, he will get to show more options and if general user logs in he will get to see less options. ...

JSF navigation on commandbutton

Hello, I want to conditionally navigate to some page. If some condition is true i want to navigate to some other page else i want to remain on the same page. I have something like :- <h:commandButton action="#{bean.navigate}"/> in bean.navigate i have something like :- public String navigate(){ if(value <= 0) return "hell...

How to find the parent element using javascript

I want to change the background color of the table cell when radio button inside the cell is clicked. <table> <tr> <c:forEach items="#{books}" var="book"> <td align="center"> <h:selectOneRadio value="#{book.price}" onclick="this.parentElement.style.background-color='red';"> ...

How do i validate two component's value are same or not? JSF

Hello, As we have comparevalidator in Asp.Net, what do we have in JSF to validate whether two field's value are same or not? I want to validate password and confirmPassword field. ...

How to pass url parameters to JSF?

Hi, I haven't managed to find a way to pass parameters to JSF/JSP web pages through url parameters. http://.../jsfApp.jsp?param1=value1&amp;param2=value2 Could someone point me at the right direction with this? Thanks! ...

Shared faces-config.xml across web project

I am trying to come up with a common UI framework for my organization. I want to know can I have something called shared faces-config.xml file which can be shared across projects. ...

How to create commandlink programmatically

Hi, We have a system built on seam/richfaces. There's this webpage where the tables are rendered from dynamic context (from multiple different datasources, and each of them uses a different layout to represent essentially the same real world concept). As a result, this table is binded to a bean, and it's columns/layout are generated fro...

JSF Conditional formatting for onmouseover and such attributes.

Hi, I'm trying to format a panelgrid according to a value in the backing bean. I'm currently trying this as the value of the onmouseover attribute: this.className=#{(actions.currentlySelectedActionButton == 0)?'actionButton actionButtonChosen':'actionButton'}; whereas the CSS looks like this: (the relevant parts): .actionButton { ...

JSF: SelectOneRadio shortcuts for options

I have the following h:selectOneRadio: <h:selectOneRadio id="#{prefix}_rating" value="#{examinationPanel.tempResult}" > <f:selectItems value="#{examinationPanel.options}"></f:selectItems> </h:selectOneRadio> And then the backing bean is loading the options based on some userpreferences: public List<SelectItem> loadOptions (Set<Result...

JSF, JSTL and EL - use c:set to set a non-string value

Whenever doing <c:set var="name" value="1" />, #{name} is always a String as evidenced by #{name.class}. Is there any way to in a JSF/Facelets context to set a scoped attribute that is an Integer or Long literal value? ...

JEE Filter is not being executed during <h:commandLink> request

Hi, I am working on a JEE application with facelets running in Tomcat 6. I wrote I Filter which works fine. Inside some facelet pages there are <h:commandLink> elements refering to another page inside the application and passing parameters to a managed bean. The refered page works on with the managed bean which got the parameter p...

Tips for resolving Hibernate/JPA EntityNotFoundException

I'm running into a problem with Hibernate where when trying to delete a group of Entities I encounter the following error: javax.persistence.EntityNotFoundException: deleted entity passed to persist: [com.locuslive.odyssey.entity.FreightInvoiceLine#<null>] These are not normally so difficult to track down as they are usually caused by ...

JSF - <h:outputText> making some of words Bold

How can we go about making some of the words in a sentence appear in BOLD for example - I'm trying to put one of the words of a sentence in BOLD i.e. sentence is "please select the amount" amount should be in BOLD, and now, when I use message = "please select the <b>amount </b>" This doesn't work. It simply shows please selec...

Rich faces and dataTable

I have the question regarding rich faces and beans. I have a jsp page that is using richfaces and inside it I have the: rich:extendedDatatable component, that takes data from my MainBean as ArrayList (this bean queries the mySQL and puts results to the ArrayList that populates the dataTable later on). There are 4 columns in datatable, fi...

IceFaces / JSF CSS parsing problem: Content is not allowed in prolog

Hi, I'm having issues with an IceFaces / JSF application. We have an IceFaces InputRichText component that is causing a lot of pain. Sometimes the page containing the component throws this exception and the page loading fails (it becomes all white): [#|2010-03-18T10:44:40.197+0100|SEVERE|sun-appserver2.1|javax.enterprise.resource.webco...

Class parameter in Faces Config

Is there a way to pass a class into a property as a Class object? i.e. <managed-property> <property-name>clazz</property-name> <value>java.lang.Double.class</value> </managed-property> ...

a4j:jsFunction with actionListener inside of h:dataTable

Hello all, I'm having problem with using a4j:jsFunction with actionListener inside of h:dataTable, when I want to invoke an action over particular row with a4j:commandLink it works flawless but when I want to invoke the action with a4j:jsFunction & actionListener it's always invoked over the last element in dataTable Let me give you an e...