jsf

can't get html td element using javascript in jsf application

Hi, <table> <tr><td id="myId"> <input type="text"> </td></tr></table> and in JavaScript document.getElementById('myId'); This is not working in JSF application. However, the same is working if I save the generated HTML in my system and open it . Any Help ? ...

JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

Hi all, I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages: A <--> B <--> C where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I cl...

Should i use JSTL in JSF 2 xhtml pages?

Hi, I would like to bind a backing bean's field to the selected value of a selectOneListbox. This value could be null, so i want to convert this to 0. This will set the selected value to the "default" selectItem. I'm using JSF2 I'm planning to do this with the http://java.sun.com/jstl/core taglib (using <c:if test="#{empty...}>) My q...

How do I display a message if a jsf datatable is empty?

Using JSF1.2, if my datatable binding returns no rows I want to display a message saying so. How do I do that? And for extra points - how do I hide the table completly if it's empty? Thanks. ...

JSF adding query parameters

I am using JSF and I have a backing bean method which does some processing and sets a variable 'outcome' which then decides the next page to navigate to depending on the faces-config.xml navigation rules. What I want to do is add parameters to the URL (in the backing bean?) when the next page is navigated to. However in the Handler wh...

What exactly is java server faces?

In comparison with asp.net webforms and asp.net mvc frameworks. ...

javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20

Hi, I have created simple Java Dynamic Web project in Eclipse. I host my project on Glassfish 2.1.1. When I try open p1.jsf page in browser I got following error: javax.servlet.ServletException: PWC1232: Exceeded maximum depth for nested request dispatches: 20. I have no idea how to correct this error... Here is may p1.jsf definitio...

How do I place an error message in the corresponding row of a JSF DataTable?

Say I have a editable datatable, with a custom converter that throws an exception if the edited field is somehow wrong, how would I display the error message in the corresponding row of the datatable? here's some code, as simple as I can make it. <h:messages /> <h:datatable> <h:column> <h:inputText value="#{bean.property}">...

how to enable selectManyListBox scrollerbar when readonly attribute is true in JSF?

Hi, I am using <h:selectManyListBox> in my project. In view mode my component was disabled including the scrollbar of that component.But i want to enable the scrollbar of that component in view mode and values should be in non-editable mode I have used readOnly attribute in <h:selectManyListBox>, Please Help me.... ...

Stackoverflow when running JSF

Hi, I am currently reading about Java Server Faces. I wanted to do my first little expriment with it. I out the API and implementation JARs into the tomcat/lib folder. I created a new "Dynamic Web Project" inside Eclipse. I created a new HTML file with the following content: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transiti...

populate drop-down values dynamically using Ajax

Hi, I have 3 drop-downs. 1st drop-down contains some values when the page loads. I need to populate 2 nd drop-down based on the value selected in 1st dropdown. Similarly, I need to populate 3 nd drop-down based on the value selected in 1st and 2nd dropdown. Initially I tried like this. <h:selectOneMenu value="#{stu.country}" > <f:s...

what is data.foo syntax in JSF/Rich Faces

Hi, what is data.foo syntax in JSF/Rich Faces? Say for example, <a4j:support event="onchange" action="#{bean.retrieveStates}" reRender="states_dropDown" data="#{student}"></a4j:support> i am passing student object in data attribute. can I access in managed bean? Documentation says this "Serialized (on default with JSON) data...

JSF Form and German Umlauts

Hi there, I'm facing a strange problem in one of my JSF (which is a facelet). I'm using Richfaces and on one page I got a normal form <h:form></h:form> My problem is when I submit the form all UTF-8 chars - like german umlauts (äöü) - are recieved encrypted. If I change the page to ISO-8859-1 on my browser it works. If I expand the ...

How to insert <br /> tags into a java String

I am trying to insert line break tags into some text and displaying it on a web page. The < and > signs are being translated into &lt; and &gt; and the tags are showing up as text on the web page. The text looks like this when I select it from the database (I've output it to SYSOUT): version 12.4 service timestamps debug datetime ser...

How to change the width of h:outputLabel

Hi, I am having a hard time trying to change the width of my h:outputLabel, but I still could not get it changed. By using CSS, I can change the color, font, frame, anything but NOT the WIDTH. Thank you so much. ...

jQuery event binding

Environment: JSF 1.2 RI, RichFaces 3.3.2 We utilize jQuery for is to change CSS classes when items gain or lose focus. This is pretty straight forward, however when our partial renders are completed we are not seeing these focus and blur events bound to the newly rendered form elements. This is to be expected, as these events are not ...

JSF - Accessing a SessionScoped managed bean

I'm quite new in JSF and I'm doing some basic things to get a feeling of how one should work with it. In my one of the projects I have a ManagedBean, SessionScoped like below @ManagedBean(name="user") @SessionScoped public class User implements Serializable // Having a couple of String properties (with setters and getters). Now, in on...

JSF Custom Image Component Problem to display multiple Image

Created a Tag Library Descriptor File: <?xml version="1.0" encoding="UTF-8"?> <taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd"> <tlib-version>1.0</tlib-version> <short-name>im...

Using JBoss EL with Websphere

Hey, I'm doing a project which is going to run on Websphere. I'm using JSF/Facelets/Richfaces for this project. I want to use the JBoss EL implementation as it allows calling methods with parameters from EL etc. ... usually this is accomplished by getting the JBoss EL jar and then putting this in the web.xml: <context-param> <par...

JSF - Populating a drop down depending on value in other drop down

Hi guys, I need to populate a drop down based on the selected value in another drop down. I can use AJAX requests to do that but I am searching for a solution using JSF only. The values to populate the drop down need to come from a table every time user changes his selection. Thanks ...