You need to sign in to do that
Don't have an account?
Why would outputPanel rendered = false render after a rerender.
I have a pageBlockTable with this code following as a column. Because its for a search page and Ive got the option for both an SOQL and a SOSL query in the same page I had to modify the results returned. I do not know how to including child relationships into activityhistories into an SOSL query so I wanted to block out the part asking for the activityhistory that I have included in the SOQL query. I made an outputPanel that would render based on the type of query being run. The SOSL query will display correctly on the first load, but if you add a parameter and try to rerender the page based on new criteria, I get "System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Contact.OpenActivities" as an error. I then proceeded to try to turn rendered = "false" to stop it from ever loading. This did not change anything. Why would the part in the outputPanel work the first time but fail after a rerender? Is there a way I can change my code in order to allow two different queries that pull back different result sets?
<apex:column">
<apex:facet name="header">
Recent Activity
</apex:facet>
<apex:outputPanel layout="none" rendered="false">
<div style="width: 400px; height: 50px;overflow:-moz-scrollbars-vertical;overflow-y:auto;">
<TABLE>
<apex:repeat value="{!contact.con.OpenActivities}" var="task">
<TR>
<TD>
<apex:outputField value="{!task.LastModifiedDate}" style="font-weight: bold;"/>
</TD>
<TD>
<apex:outputText value="{!task.ActivityType}"/>: <apex:outputText value="{!task.Subject}"/>
</TD>
</TR>
</apex:repeat>
<apex:repeat value="{!contact.con.ActivityHistories}" var="task">
<TR>
<TD>
<apex:outputField value="{!task.LastModifiedDate}" style="font-weight: bold;"/>
</TD>
<TD>
<apex:outputText value="{!task.ActivityType}"/>: <apex:outputText value="{!task.Subject}"/>
</TD>
</TR>
</apex:repeat>
</TABLE>
</div>
</apex:outputPanel>
</apex:column>
Thank you for any help
I can't think of any reason why this would happen. I've used this in the past and can't remember hitting this type of issue.
Can you post the full page and controller?
Alot of my code comes from the search tool on your blog. Ive only been doing Salesforce stuff for 2 months now. My code is kinda long so i'm cutting it down to the relevant parts.
Controller
Page: