jsf

how to give colspan and rowspan in JSF panelgrid?

how to give colspan and rowspan in JSF panelgrid? ...

The CSS selector for an element that its id is in the "foo:bar" form

When using the JSF Web application framework, ID of the elements inside a form can be automatically generated by the framework and when a component resides in a form that its ID is form1, the framework automatically generates an ID in the form of form1:foo for that element. While this can be turned off, I was wondering if it's possible t...

Updating a component outside of the <f:ajax> component's context

Is it possible to have the JSF update a component that's placed outside the component's context? Currently the following page is not working: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="...

What is the correct way to bind input value to JSF managed bean property?

I am new to JSF and managed beans. I have a managed bean with some private property with public setter and getter methods. Now when I add the managed bean's properties to JSF forms, should I add the private methods directly or should I use call the property by getter methods? For example: <h:inputText value="#{BeanName.userName}"/> <h...

JSF link results in plain XHTML file instead of generated JSF page

I have some JSF xhtml pages like below. ROOT | |--index.xhtml | |--register.xhtml | |--<templates> (Directory) | | | |--userForm.xhtml | | | |--banner.xhtml both pages are using the templates from templates directory. My index file is getting the templates well and works fine. I have a link from index.xhtml file to register.x...

JSF2: limiting cc:attribute to a given object type within a List

If I had a managed bean as follows: @ManagedBean @RequestSchoped public class Example { private List<String> stringList; private List<Long> longList; // getters, setters, etc. down here } and had a custom component which accepted a List as an attribute: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W...

Doubt in <rich:listshuttle>?

In my application i am using <rich:listshuttle> component and I had provided a blank space for the Label. My doubt is when i keep the mouse pointer in the Copy,Remove,Up and Down button i am getting a tool tip namely copyControl,removeControl,upControl and downControl, when checked the HTML source code these are the ALT name provided in ...

tr:inputText submitting value 0 instead of null

We are using a tr:inputText in a JSP page and when there is no value written in the inputText the form is submitting a 0 instead of null. We are using Trinidad 1.2.2 and Tomcat 6.0.20 (we also tried with Tomcat 6.0.14 as we read that this could happen with certains Tomcat versions). we reproduced this problem with an h:inputText too. Th...

create a unordered list in jsf (ul)

Hi I need to implement a unordered list in jsf - just wondering if I have to create a custom tag for this ? I have tried using but it is currently falling outside of the jsf component tree. Cheers ...

Color the rows of datatable based on the condition in JSF1.0?

How to color the rows of HTMLdatatable based on the condition in JSF 1.0? ...

Facelets custom tag not rendering

Hi! I am trying to create a custom tag with Facelets but it isn't rendering (i.e. the tag appears unreplaced in the response). The tag (/WEB-INF/facelets/tags/inputThumbnailSelector.xhtml): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="ht...

Jsf default textbox value

I would like to find out how to set the default value for the textbox field in JSF, the field will be empty onFocus. If the user does not enter any value it will again show the default value. I was able to find the solution using JS with regular html textbox but could not find anything Using JSF. <h:inputText id="DT_INPUT" value="#{exa...

JSF + HashMap and its key

I have a database with 2 tables CD and Song. Session bean access then entity classes of those two tables. In my backing bean, I just have a String cd and HashMap<CDName, CDName> cds that will hold the list of CD return back from my sessionbean, so in JSF I would do something like this. <h:selectOneMenu id="cd" value="#{backingBean.cd}"...

is it possible to do this in jsf?

I have a / group of radio buttons , and a CommandButton Two cases 1)When one of the button is clicked + The command Button is clicked, I should display some other section(say a DIV) and the execution stops. means, The Command Button should not submit the form to the server 1)When NONE of the button is clicked + The command Button is ...

How to disable mouse left click?

Hi, I want to disable mouse left click. I use the following script but not work. <h:form> <a4j:commandButton value="TestButton" onclick="alert('button cliked')"/> </h:form> JavaScript is : <script type="text/javascript"> document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.CLICK); document.onmous...

how to avoid mouse click after open modalPanel?

Hi, here i prevent to mouse click after open the modalPanel.(Not allow to click buttons, link after open modalpanel etc). But i need to use the following css : rich-mpnl-mask-div <rich:modalPanel id="test_ModalPanel" style="height:200px;width:200px"> <a4j:commandLink value="Hide Me" onclick="javascript:Richfaces....

JSF: Validation for Special characters

hi,all I want to apply validation for Special characters like (,/'#~@[]}{+_)(*&^%$£"!\|<>) using the jsf validator. i have implemented the validator for number but now i want to make validator for Special characters. value.toString().trim().matches(); What will be the regular expression inside the matches() method in java class? i w...

Any simple JSF commandButton samples available?

I've been struggling with trying to get my commandButtons to perform an action (yet oddly, I have no problem pulling data from beans to include in my page). Have even posted up my code elsewhere and had it reviewed by others. So far, no luck. So, I'm thinking perhaps a different tact is in order. Can anyone point me to some very simp...

How do I get annotations working for JSF2 in Netbeans?

I added and have been using the faces-config.xml in my Netbeans 6.9/JSF2.0 project due to annotations not working. Not sure what I'm doing wrong, but when I use annotations, my beans are completely inaccessible. Properties for the project show that it is indeed JSF 2.0 (and not 1.1). ...

How to display two different types of components based on a boolean variable in jsf?

I have thought about this for a while - not getting a good idea. This is the problem. I will have to display a text either in a text box or as an output text. How do I do this using a boolean variable in JSF? I do not want to make an h:inputText and disable/make read only, it based on the boolean , I want to display a clean label or a...