You need to sign in to do that
Don't have an account?
Ramana123
The page is continuosly refreshing ,when i use rerender the pageblock table is not coming .can anyone help me in this ..?
How to stop the page from refreshing continuously...?
apex page :
<apex:page controller="searchClass">
<script>
window.onload = function()
{
some();
}
</script>
<apex:form >
<apex:pageBlock>
<apex:pageBlockSection >
<apex:actionfunction action="{!searchContact}" name="some">
<apex:pageBlockTable value="{!Listcontacts}" var="con" id="abc">
<apex:column value="{!con.Name}"/>
</apex:pageBlockTable>
</apex:actionfunction>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
apex class :
public class searchClass
{
public List<Contact> result{get;set;}
public List<Contact> Listcontacts {get;set;}
public searchClass()
{
Listcontacts = new List<Contact>();
}
public void searchContact()
{
Listcontacts = [ SELECT Name from Contact];
System.debug('aaaaaaaaaaaaaaaaaaaaa'+Listcontacts);
}
}
apex page :
<apex:page controller="searchClass">
<script>
window.onload = function()
{
some();
}
</script>
<apex:form >
<apex:pageBlock>
<apex:pageBlockSection >
<apex:actionfunction action="{!searchContact}" name="some">
<apex:pageBlockTable value="{!Listcontacts}" var="con" id="abc">
<apex:column value="{!con.Name}"/>
</apex:pageBlockTable>
</apex:actionfunction>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
apex class :
public class searchClass
{
public List<Contact> result{get;set;}
public List<Contact> Listcontacts {get;set;}
public searchClass()
{
Listcontacts = new List<Contact>();
}
public void searchContact()
{
Listcontacts = [ SELECT Name from Contact];
System.debug('aaaaaaaaaaaaaaaaaaaaa'+Listcontacts);
}
}
Thar will prevent the page from reloading when the some() function completes.
Thanks,
Matt
The table should not be inside the actionfunction element. The actionfunction tag should be inside the form, but not the pageBlock.
Matt