Articles avec le mot clé « JSF » :
Custom BigDecimalConverter for JSF to prevent java.lang.ClassCastException
Using the
<f:convertNumber/>
together with It seems that the BigDecimal results in a java.lang.IllegalArgumentException: java.lang.ClassCastException. To get around this, either use
<f:converter converterId="javax.faces.BigDecimal"/>
or use your own converter, eg:
import java.math.BigDecimal;
import javax.faces.component.UIComponent;
import javax.faces …Display Status Message For AJAX Request With Richfaces
Sometimes an AJAX request takes some time. Because of the asynchronous of AJAX the user does not note that there is something happening on the server. So it is a nice thing to display the status of the request.
Using Richfaces/A4J you can use the tag to display such …
Duplicate Id Error Message with JSF 1.1 and 1.2
Today I spent quite some time to figure out why the following piece of code causes a Duplicate Id Error Message.
...
<rich:columns value="#{myBean.listWithFields}" var="field" index="myIndex">
<h:inputText id="#{field.identifier}" value="#{field.value}" rendered="#{field.inputField}"/>
<h:outputText id="#{field.identifier}" value="#{field.value}" rendered …Property Files containing HTML encoded messages with JSF 1.1 and 1.2
Just use the escape attribute to avoid HTML code to be encoded again.\
For example with the following JSF fragment
...
<h:outputText value="#{messages['TITEL']}" escape="false"/>
...
this part of the message.properties is displayed correct
TITEL=About Ü and Ö
Wrong Accessibility Of Inner Class Members in Bean Class Causes PropertyNotFoundException with JSF 1.1 and 1.2
If you get the Exception
...
javax.faces.el.PropertyNotFoundException
...
the specified property cannot be found in the bean.
First thing is to check the accessors and their accessibility. In my case I had all needed accessors and their accessibility, but they were specified in an Inner Class within the bean …
How To Use HTML Comments in JSF Files with JSF 1.1 and 1.2
Using in comments in JSF web pages seems to be a kind of a problem. At least using Apache MyFaces (http://myfaces.apache.org) / Apache MyFaces Tomahawk (http://myfaces.apache.org/tomahawk/) or JBoss Seam (http://www.seamframework.org), because these two implementation just don’t interpret comments as comments …