You need to sign in to do that
Don't have an account?
ales.p
Message Edited by Ales.p on 01-15-2008 10:48 AM
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 id="searchResultsRepeat" value="{!resultContacts}" var="cContact">
{!cContact.Name} - {!cContact.Phone}<br/>
</apex:repeat>
</apex:pageBlock>
</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
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.