Dale Chapman

+ Follow
since Oct 26, 2004
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dale Chapman

I use JSF as my primary user interface framework. I have played around a bit with AJAX and have found many issues related to integrating AJAX and JSF. There are some JSF tag libraries specifically for AJAX and I was wondering if your book addresses any of these types of libraries. Also, I have some experience using Direct Web Remoting (DWR) as an AJAX framework. I am wondering if your book addresses frameworks like DWR and if so, do you do a comparison among the different frameworks?

Dale Chapman
Here is my situation:
We have written a custom component to do validation. This component includes a parameter called fieldLabel. This parameter is used to display the name of the field that validated incorrectly. So far, so good. The problem comes from using this validator within an <h ataTable> tag, with the value to be added to the fieldLabel being one of the properties of the dataTable variable. Whenever this occurs, the fieldLabel entry is evaluated to null when I create a ValueBinding on the expression.

--- JSP Snippet ---
<h ataTable>
<!-- unimportant stuff snipped -->

<!-- more snippage -->
<h:inputText value="#{offering.endDate}">
<f:convertDateTime pattern="#{commonProps.default_date_format}"/>
<ui:validateDate fieldLabel="#{offering.dateTypeString}"/>
<!-- more snippage -->

I know the above example is contrived, but it is the testcase that I wrote to recreate the problem. No matter what I do, I cannot get the #{offering.dateTypeString} to evaluate to anything other than null on the server.

--- Java code ---
// the following was the original code to obtain the value binding
public static String evaluator(String expression){
if (expression != null && UIComponentTag.isValueReference(expression)) {
FacesContext context = FacesContext.getCurrentInstance();
Application app = context.getApplication();
return "" + app.createValueBinding(expression).getValue(context);
else return expression;

The above code works fine until you hit this situation. Any help would be greatly appreciated.


Any suggestions as to what I need to do to get a proper resolution of the variable?
18 years ago