users@jsf-extensions.java.net

How to refresh the execute component with fireAjaxTransaction

From: Stefan Bley <stefan.bley_at_saxsys.de>
Date: Fri, 18 Jul 2008 02:54:08 -0700 (PDT)

I use DynaFaces.fireAjaxTransaction to update fields based on other input
field values. This is invoked using onBlur() and a valueChangeListener Java
method is executed.

However, I can't update the changed field itself!
This is what I tried:

// myform.js
function handleDescriptionChange(element) {
        DynaFaces.fireAjaxTransaction(element, {
            execute: 'form1:txtDescription',
            render: 'form1:txtDescription'});
    }
}

// myform.jsp
<webuijsf:textField id="txtDescription"
   onBlur="handleDescriptionNachChange(this);"
   text="#{MyBean.description}"
   valueChangeListenerExpression="#MyBean.handleDescriptionChange}"/>
                            

// MyBean.java
public void handleDescriptionChange(ValueChangeEvent event) {
        String shortDesc = (String)event.getNewValue());
        String longDesc = this.mgr.getLongDescription(shortDesc);
        this.setDescription(longDesc);
        getFacesContext().renderResponse();
}

But the value of field txtDescription is not updated to the long
description.

Any ideas, guys?
-- 
View this message in context: http://www.nabble.com/How-to-refresh-the-execute-component-with-fireAjaxTransaction-tp18525614p18525614.html
Sent from the jsf-extensions users mailing list archive at Nabble.com.