You need to sign in to do that
Don't have an account?
BRupholdt
Rerender confusion
I've followed a tutorial to use apex:outputPanel with apex:detail to refresh the detail based on user click. I'm trying to do the same with a pageBlockTable now without success. When I include both pieces on the page, the detail refreshes but the other data is not drawn. Obviously I'm ding it wrong.
I am new to VisualForce and honestly don't know enough to ask the right questions. Any help you can give would be great.
Here's my page code:
Code:
<apex:commandLink rerender="detail">{!user.Alias}</apex:commandLink> <apex:outputPanel id="detail"> //works <apex:detail subject="{!$CurrentPage.parameters.uid}" relatedList="false" title="false"/> //doesn't work for refresh - does work when output alone <apex:pageBlock> <apex:pageBlockTable value="{!Goals}" var="goal"> <apex:column > <apex:facet name="header">Reference</apex:facet> {!goal.Name} </apex:column> <apex:column > <apex:facet name="header">Goal</apex:facet> <apex:outputLink value="/{!goal.id}" >{!goal.Goal__c}</apex:outputLink> </apex:column> <apex:column > <apex:facet name="header">Target Date</apex:facet> <apex:outputField value="{!goal.Target_Date__c}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:outputPanel>
BRupholdt
Perhaps I should say what I'm trying to accomplish. I have a custom object names Goals__c which contains a simple list of goals for each staff member. I want to make a page showing the users at the top as clickable links (or a view-like select) to display their goals below. I can show the list for all users or the current user. I can pass params to refresh the entire page and see the appropriate list. I can't seem to figure out how to refresh just the goal lost area while staying on the same page.
Bob
TehNrd
Refreshing components can be a little finicky at times. You may want to try re-rendering components individually like this.
Code:
BRupholdt
Thank you for the help. While it turned out I'd made a simple error in my query that caused the data not to display, separating the two render sections made nicer code. I hadn't realized it could be done that way.
Bob