+ Start a Discussion
pallam krushnaveni 18pallam krushnaveni 18 

Hi , I am working on visualforce custom components not able to hide account field based on opportunity picklist value

<apex:component >
<apex:attribute description="Acc" name="Acc" type="Account" required="true"/>                   
<apex:inputField value="{!Acc.No_of_depenents__c}" styleClass="form-control" required="true" rendered="{!IF($ObjectType.Opportunity.Fields.Interested_in__c=='Home Purchase Plan Premier', false,true)}" /> />
</apex:component >  
I am not getting any error but not hiding the field.
Please suggest me on the same  
pallam krushnaveni 18pallam krushnaveni 18
I dont want to display opportunity details in custom component , this opportunity values comming in vf page.

 
Ajay K DubediAjay K Dubedi
Hi Pallam,

I achieved the task of Hiding the fields by putting the fields in the output panel and hiding that output panel
as,
<apex:outputPanel style="display:none">
                    <apex:outputField value="{!opportunity.StageName}"/>
</apex:outputPanel>

Thanks,
Ajay Dubedi
pallam krushnaveni 18pallam krushnaveni 18
pallam krushnaveni (Customer)
thanks a lot for your reply. The problem hear is in custom component page i was trying to display all account details and this component calling in the vf page. VF page contains opportunity details. hear my doubt was. 
I need to hide field based on: opprtunity field fielcklist value (which is in vf page) i need to hide custom component field.