function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ales.pales.p 

Apex repeat tag strange issue

For testing purposes I'm trying to use an apex:repeat tag. It seems that a rerender action from a command button do NOT apply the rendering of this tag. While the same action work successfully with a dataList o a dataTable.
 
Here is my simple apex repeat tag from page editor:
<apex:pageBlock title="Contacts search result">
<apex:repeat id="searchResultsRepeat" value="{!resultContacts}" var="cContact">
{!cContact.Name} - {!cContact.Phone}<br/>
</apex:repeat>
</apex:pageBlock>

And here is the simple controller rerender function:
public Contact[] getResultContacts() {
    return [SELECT Id, Name, Account.Name, Phone FROM Contact WHERE Name = :searchKey ORDER BY Name]; 
}

I used this one also:
public List<Contact> getResultContacts() {
  return [SELECT Id, Name, Account.Name, Phone FROM Contact WHERE Name = :searchKey ORDER BY Name]; 
}

Is there something wrong?
I believe that all syntax is OK but it seems to be an issue.

Thanks

P.S.: there are no error messages, simply the repeat tag section is not re-rendered.



Message Edited by Ales.p on 01-15-2008 10:48 AM
Ron HessRon Hess
i don't see the command button that triggers the re-render, can you post the whole page?

normally i would use an outputPanel id=someid , and rerender that tag rather than the repeat tag itself.  put the repeat tag inside the outputpanel tag.