You need to sign in to do that
Don't have an account?
Rerender VF page when View Selection is changed (currently renders the User list for that profile.)
On my VF page I want to be able to only show select fields for USER for editing purposes. I have created this VF page and have the VIEW option at the top with the dropdown based on User Profile. Once I select a different profile and hit the GO button it takes me to the USER page and I want it to rerender my VF page with the type User Profile I selected in the View.
My theory is that this line of code is what needs to be updated but not positive.
<apex:actionSupport event="onchange" rerender="user_table"/>
Here is my code.
<apex:page standardController="User" recordSetVar="users" tabStyle="User">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlock >
<apex:panelGrid columns="2">
<apex:outputlabel value="View:"/>
<apex:selectList value="{!filterId}" size="1">
<apex:actionSupport event="onchange" rerender="user_table"/>
<apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>
<apex:commandButton value="Go" action="{!list}"/>
</apex:panelGrid>
</apex:pageBlock>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!quicksave}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="Previous" action="{!previous}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!users}" var="u" id="u_table">
<apex:column value="{!u.name}"/>
<apex:column value="{!u.Profile__c}"/>
<apex:column headerValue="Signature Name">
<apex:inputField value="{!u.Signature_Name__c}"/>
</apex:column>
<apex:column headerValue="Email">
<apex:inputField value="{!u.Signature_Email__c}"/>
</apex:column>
<apex:column headerValue="Title">
<apex:inputField value="{!u.Signature_Title__c}"/>
</apex:column>
<apex:column headerValue="Phone">
<apex:inputField value="{!u.Signature_Phone__c}"/>
</apex:column>
<apex:column headerValue="Mobile">
<apex:inputField value="{!u.Signature_Mobile__c}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Hi,
You have wrongly mapped the reRender on apex:acionSupport tag.
It should be u_table instead of user_table.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Regards,
Arun.
All Answers
Hi,
You have wrongly mapped the reRender on apex:acionSupport tag.
It should be u_table instead of user_table.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Regards,
Arun.
Thank you so much Arun for your time. That worked like a charm. You Rock.