myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John" <>
Subject RE: [Tobago] Problems with Tobago.reloadComponent with onclick
Date Fri, 12 Jan 2007 21:09:12 GMT
Hi Volker,

There was already a Panel surrounding the tx:in, so I modified as
follows, and still get the error.

onclick="Tobago.reloadComponent(mainPage:quarantineInfoPanel, '@autoId')

The source from the page expands it as so:


What is the preferred way to add this to my toolBarCommand?

-----Original Message-----
From: Volker Weber [] 
Sent: Friday, January 12, 2007 12:40 PM
To: MyFaces Discussion
Subject: Re: [Tobago] Problems with Tobago.reloadComponent with onclick

Hi John,

which version of tobago?

the onclick="Tobago.reloadComponent(<clientId>, '@autoId')"/> should
work (afaik), but is not the intended way to code ajax reload (this was
a interim solution).

anyway, the 'messageCount' is not a valid clientId, and tc:in is not
ajax reloadable.

the clientId is build from ids of namingcontainers, at least tc:page,
and the id of the component, so a valid clientId has at last on colon.

to reload the content of a tx:in you can surround it by a tc:panel e.g
(in the intended way):

<tc:page id="page"/>

  <tc:panel id="panel">
    <tx:in .../>

  <tc:button ...>
    <tc:attribute name="renderedPartially" value=":page:panel"/>


see the colon before 'page:panel' to make the clientId absolute.



2007/1/12, John <>:
> When I use the onclick as follows (per a previous message from 
> Volker), I get the following error in IE.
> <t:toolBarCommand label="Refresh" action="#{quarantine.refresh}"
> image="images/view-refresh.jpg" tip="Refresh list of quarantined
> id="quarantineCmdRefresh" 
> onclick="Tobago.reloadComponent('messageCount',
> '@autoId')"/>
> Line: 582
> Char: 7
> Error: Object doesn't support this property or method Code:0
> If I remove the onclick part it works fine (but of course I can't use
> AJAX dynamic updating of my tx:in  component
> Thanks,
> John

View raw message