hi John, the perfered way is <t:toolBarCommand label="Refresh" action="#{quarantine.refresh}" image="images/view-refresh.jpg" tip="Refresh list of quarantined messages" id="quarantineCmdRefresh" > <t:attribute name="renderedPartially" value=":mainPage:quarantineInfoPanel"/> </t:toolBarCommand>
if "mainPage:quarantineInfoPanel" is the correct id. look in the generated html for "Tobago.addAjaxComponent(<id>)", all those ids are reloadable by ajax. regards, volker 2007/1/12, John <[EMAIL PROTECTED]>:
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: onclick="Tobago.reloadComponent('mainPage:quarantineInfoPanel', 'mainPage:quarantineCmdRefresh')" What is the preferred way to add this to my toolBarCommand? -----Original Message----- From: Volker Weber [mailto:[EMAIL PROTECTED] 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 .../> </tx:panel> <tc:button ...> <tc:attribute name="renderedPartially" value=":page:panel"/> </tc:button> </tc:page> see the colon before 'page:panel' to make the clientId absolute. regards, Volker 2007/1/12, John <[EMAIL PROTECTED]>: > > > 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 messages" > 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 the > AJAX dynamic updating of my tx:in component > > Thanks, > John