myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "HtmlSelectOneRadioAjax" by TravisReeder
Date Fri, 18 Nov 2005 20:01:41 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by TravisReeder:
http://wiki.apache.org/myfaces/HtmlSelectOneRadioAjax

New page:
= Overview =

Updates the backend data model through ajax so no form submit button is required.  

''Tip:'' Works nice in combination with AutoUpdateDataTable to have a dynamically updating
list based on some search parameters.

= Usage =

{{{
<s:selectOneRadioAjax
   value="#{inputAjaxBean.radioValue}">
   id="selMany"
   forceId="true"
     [onSuccess="successful"
      onFailure="failure"
      onStart="starting"]
  >
    <f:selectItems value="#{inputAjaxBean.radioItems}"/>
</s:selectOneRadioAjax>
}}}

 * onSuccess - called when an update is completely successful.  
 * onFailure - called when an update fails 
 * onStart - called when the update starts

'''Note:''' Do not include the brackets in these function callbacks.  
'''Note 2:''' These functions accept two values (elementName, elementValue), for example:

{{{
function successful(elname, elvalue)
    {
        // do something here
    }
}}}

Note - This component is different to others, it uses Ajax mechanisms to fetch data from the
server, thus the backend binding can and will be used outside of the standard JSF lifecycle
to deliver the data.

Use always within a form tag.

see examples/sandbox/inputAjax.jsp for an example.

Mime
View raw message