You need to sign in to do that
Don't have an account?
MPI
Professional Edition Workaround - Changing Record Set/Page Size
After an hour or two of frustration at the fact that there's no way to change the number of records returned by a record set (the pageSize property) without creating a Controller Extension which the Professional Edition can't do, I finally figured out a workaround.
The workaround involves linking an apex:inputHidden to the pageSize property as such:
<apex:inputHidden value='{!pageSize}' id='PageSize'/>
I then create an apex:actionFunction which will allow me to refresh my form once I've changed the size of the record set:
<apex:actionFunction name='refresh_list' rerender='myForm'/>
I then use javascript to change the value of that input field and reRender the form:
<script type='text/javascript'>
document.getElementById('myPage:myForm:PageSize').value = 50;
refresh_list();
</script>
Full Code:
<apex:page standardController='User' recordSetVar='users' id='UsersPage'>
<apex:form id='myForm'>
<apex:inputHidden value='{!pageSize}' id='PageSize'/>
<apex:actionFunction name='refresh_list' rerender='myForm'/>
<apex:pageBlock>
<apex:pageBlockTable value='{!users}' var='u' rows='50'>
<apex:column value='{!u.name}'/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<script type='text/javascript'>
document.getElementById('UsersPage:myForm:PageSize').value = 50;
refresh_list();
</script>
</apex:page>
Message Edited by YoriMPI on 12-11-2008 09:15 AM
The workaround involves linking an apex:inputHidden to the pageSize property as such:
<apex:inputHidden value='{!pageSize}' id='PageSize'/>
I then create an apex:actionFunction which will allow me to refresh my form once I've changed the size of the record set:
<apex:actionFunction name='refresh_list' rerender='myForm'/>
I then use javascript to change the value of that input field and reRender the form:
<script type='text/javascript'>
document.getElementById('myPage:myForm:PageSize').value = 50;
refresh_list();
</script>
Full Code:
<apex:page standardController='User' recordSetVar='users' id='UsersPage'>
<apex:form id='myForm'>
<apex:inputHidden value='{!pageSize}' id='PageSize'/>
<apex:actionFunction name='refresh_list' rerender='myForm'/>
<apex:pageBlock>
<apex:pageBlockTable value='{!users}' var='u' rows='50'>
<apex:column value='{!u.name}'/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<script type='text/javascript'>
document.getElementById('UsersPage:myForm:PageSize').value = 50;
refresh_list();
</script>
</apex:page>
Message Edited by YoriMPI on 12-11-2008 09:15 AM
and in your page:
Is there a listing of properties that can be changed in this way (for example pageSize and filterID) that I can look up? I've been trying for the last few hours to find a variable like this that I can use to change the subject/recordID.
This would be more or less solved immediately if we just had a way to pass the subject to an apex:include statement the way you can with an s-control.
Message Edited by YoriMPI on 12-12-2008 12:11 PM
Message Edited by YoriMPI on 12-12-2008 12:22 PM