Dale Chapman

Greenhorn
+ Follow
since Oct 26, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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?

Thanks.
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 -->
value="#{courseUI.course.offering}"
var="offering">

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

Thanks!!
Dale.


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