Hi Bernd,

I see that you have:
1) removed the outer Panel (maybe due to having to convert to a page,
since this is a tag file)
2) Substituted placeholder backing bean calls (I know you had to do this
for testing)
3) Removed bindings

Other than that, I'm not finding any changes to implement. Of course, I
can't remove the backing bean calls. Do you think the bindings are the
problem? Am I missing some significant change?

Thanks,
John

-----Original Message-----
From: Bernd Bohmann [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 13, 2007 12:04 PM
To: MyFaces Discussion
Subject: Re: [Tobago] Problems with Tobago.reloadComponent with onclick

Hello John,

I modify your example jsp a little bit. The partial refresh works for
me. Here is my modified example jsp:

<[EMAIL PROTECTED] uri="http://myfaces.apache.org/tobago/component"; prefix="t"%>
<[EMAIL PROTECTED] uri="http://myfaces.apache.org/tobago/extension"; 
prefix="tx"%>
<[EMAIL PROTECTED] uri="http://java.sun.com/jsf/core"; prefix="f"%> <f:view>
<t:page id="page">
   <f:facet name="layout">
     <t:gridLayout columns="1000px"  id="quarantineGridLayout"/>
   </f:facet>
   <t:box id="quarantineBox">
     <f:facet name="layout">
       <t:gridLayout />
     </f:facet>
     <f:facet name="toolBar">
       <t:toolBar labelPosition="left" id="quarantineToolbar">
         <t:toolBarCommand label="Delete All"
                           tip="Delete all messages in quarantine" 
id="QuarantineCmdDelAll">
           <f:facet name="confirmation">
             <t:out value="Delete every message in quarantine?"/>
           </f:facet>
         </t:toolBarCommand>
         <t:toolBarCommand label="Delete" tip="Delete selected
messages(s)"/>
         <t:toolBarCommand disabled="true"/>
         <t:toolBarCommand label="Deliver"
                           tip="Deliver selected messages to
recipient(s)" />
         <t:toolBarCommand label="Deliver Always"
                           tip="Whitelist and then Deliver selected
message(s) in one step" />
         <t:toolBarCommand label="WhiteList"
                           tip="Record sender of all selected messages -
future messages from this sender will bypass filtering" />
         <t:toolBarCommand disabled="true"/>
         <t:toolBarCommand label="View Message"
                           tip="View message source in Message Display
area" />
         <t:toolBarCommand disabled="true"/>
         <t:toolBarCommand label="Refresh" action="#{test.refresh}"
                           tip="Refresh list of quarantined messages" 
id="quarantineCmdRefresh" >
           <t:attribute name="renderedPartially" 
value=":page:quarantineInfoPanel"/>
         </t:toolBarCommand>
       </t:toolBar>
     </f:facet>
     <t:panel id="quarantinePanel1">
       <f:facet name="layout">
         <t:gridLayout rows="fixed;fixed;1*"
id="quarantineGridLayout1"/>
       </f:facet>
       <t:panel id="quarantineInfoPanel">
         <f:facet name="layout">
           <t:gridLayout columns="fixed;fixed;1*" 
rows="fixed;fixed;fixed" id="quarantineGridLayout2"/>
         </f:facet>
         <tx:in label="Total messages" readonly="true" id="messageCount"
                value="#{test.rows}"/>
         <tx:in label="Messages / page" value="#{test.count}" 
id="messagesPerPage"
                tip="Maximum messages displayed per page"/>
         <t:cell/>
       </t:panel>
       <t:panel>
         <f:facet name="layout">
           <t:gridLayout id="sheetLayout" rows="400px"/>
         </f:facet>
         <t:sheet id="quarantineSheet" columns="3*;1*;1*;1*;1*"
                  var="quarantineRec" showPageRange="right" rows="0">
           <t:column label="From" id="From" sortable="true">
             <t:out value="#{quarantineRec}" id="quarantineSheetOut0"/>
           </t:column>
           <t:column label="To" id="To" sortable="true">
             <t:out value="#{quarantineRec.recipient}" 
id="quarantineSheetOut1"/>
           </t:column>
           <t:column label="Subject" id="Subject" sortable="true">
             <t:out value="#{quarantineRec.subject}" 
id="quarantineSheetOut2"/>
           </t:column>
           <t:column label="Match text" id="Matchtext" sortable="true">
             <t:out value="#{quarantineRec.matchtext}" 
id="quarantineSheetOut3"/>
           </t:column>
           <t:column label="Filtered by" id="Filteredby"
sortable="true">
             <t:out value="#{quarantineRec.filteredby}" 
id="quarantineSheetOut4"/>
           </t:column>
         </t:sheet>
       </t:panel>
       <t:tabGroup switchType="reloadTab" id="quarantineTabGroup2">
         <t:tab label="Message Display off" tip="Don't display content
of selected message" >
           <f:facet name="layout">
             <t:gridLayout rows="0px" id="viewOffLayout"/>
           </f:facet>
           <t:panel/>
         </t:tab>
         <t:tab label="Message Display on" tip="Display content of 1st
selected message" >
           <f:facet name="layout">
             <t:gridLayout rows="fixed" id="viewOnLayout"/>
           </f:facet>
            <t:textarea readonly="true" height="300">
            </t:textarea>
         </t:tab>
       </t:tabGroup>
     </t:panel>
   </t:box>
</t:page>
</f:view>

Regards

Bernd

John wrote:
> I get exactly the same error with the code below as before.
> I did verify in the view source that the qualified Ids were correct. 
> 
> -----Original Message-----
> From: Volker Weber [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 12, 2007 1:28 PM
> To: MyFaces Discussion
> Subject: Re: [Tobago] Problems with Tobago.reloadComponent with 
> onclick
> 
> 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
>>
> 
> 

Reply via email to