users@jsf-extensions.java.net

Issues with jsf-extendions

From: Martin Dubuc <martind1111_at_gmail.com>
Date: Thu, 1 Mar 2007 10:38:46 -0500

I am performing some tests on the latest jsf-extensions
(jsf-extensions-0.1-rc2) inside Tomcat 6 and using the latest released
JSF 1.2. I was able to verify that the simpleDynamicFaces Web app is
working. I have started to modify my app to use the JSF extensions,
but I have experienced two issues with the framework.

The first one is related to the use of selectBooleanCheckbox
component. If I add the following component on a page:

     <h:selectBooleanCheckbox id="testBool"
                             value="#{someBean.testBool}"
                             valueChangeListener="#{someBean.testBoolChanged}"

onclick="DynaFaces.fireAjaxTransaction(this, { execute: 'testBool'
});"/>

I can see the testBool value updated when I click on the checkbox (the
setTestBool method is called), but if I try to click a second time,
the check in the checkbox disappears as I click in the checkbox, but
when the form is re-rendered, the check in the checkbox is redrawn. It
looks like the testBool value gets stuck on true. Can't explain why.

I have also some issues with partial rendering. Maybe because I don't
understand how it is supposed to work. But say that I define the
following components:

    <h:selectOneMenu id="test"
                     value="#{someBean.test}"
                     valueChangeListener="#{someBean.testChanged}"
                     onchange="DynaFaces.fireAjaxTransaction(this, {
execute: 'test', render: 'test', 'text' });">
      <f:selectItems value="#{someBean.testItems}"/>
    </h:selectOneMenu>
    <h:outputText id="text" value="#{someBean.text}"/>

If I define setTest as follows:
    public void setTest(String t) {
        test = t;
        text = t;
    }

I would expect my page to update the display of the text outputText
field when test component value changes. But it is not the case. In
fact, as soon as I add a second component in the render section, the
whole firing sequence does not seem to take place. Even the
selectOneMenu component value does not get updated when I change its
value. The validators on the page, the setters don't get called. Not
sure why and how to troubleshoot such problem.

Martin