You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sw...@wlp-systems.de on 2006/11/16 16:16:12 UTC

[Tobago] Dynamic reload of component data

Hi!

I want to reload some portions (a whole tc:panel or a tc:out) of a Tobago 
JSP page dynamicly, triggered by a selection of one row in a tc:sheet or 
by a modification of a tc:in, without reloading the whole page.
I know, Tobago uses Ajax internally and I know the tc:reload tag,
which reloads a components data in recurrent intervals. Is there a simple
way to use the Tobago Ajax features in a JSP page via Javascript?

Thanks for any help!
Regards
Helmut

Re: [Tobago] Dynamic reload of component data

Posted by Volker Weber <we...@googlemail.com>.
Hi,

>  Is there a simple
> way to use the Tobago Ajax features in a JSP page via Javascript?

yes there is.

tobago provides javascript functions for easy reloading the ajax
capable tobago components.

which are currently: sheet, tabgroup, panel, box

you can use it like this:
  Tobago.reloadComponent(clientId, actionId);
where
  clientId: the clientId (html id) of the component to reload
  actionId: the clientId of a commandComponent or null

If you want a tobago command component which triggers the reload e.g. a button:

<tc:button action="#{bean.action}"
                script="Tobago.reloadComponent('<ajaxId>', '@autoId')"/>

where <ajaxId> is the clientId of the component to reload.
@autoId is replaced by the buttons clientId

Regards
   Volker