You need to sign in to do that
Don't have an account?
swain 10
How to put two parameter in rendered in visualforce ,its little different situation then AND OR condition.
One is a condition another one is Apex function, how to put them in one rendered:-
1. rendered="{!massEdit}"
2.rendered="{!IF(selectedProductLine.item.RecordTypeId = ICRecTypeId),true,false )}"
This Syntax not working:-
rendered="{!IF(((selectedProductLine.item.RecordTypeId = ICRecTypeId)&&(!massEdit)),true,false )}"
Even I tried with AND OR Operator not working. I need to render a section on picklist value change for the same, so i have to put the two condition in one rendered.
1. rendered="{!massEdit}"
2.rendered="{!IF(selectedProductLine.item.RecordTypeId = ICRecTypeId),true,false )}"
This Syntax not working:-
rendered="{!IF(((selectedProductLine.item.RecordTypeId = ICRecTypeId)&&(!massEdit)),true,false )}"
Even I tried with AND OR Operator not working. I need to render a section on picklist value change for the same, so i have to put the two condition in one rendered.
try this
All Answers
try this
Thanks for your response sachin.
But I tried this you can how the page looks. I need to hide the input field after save . All input fields are hidden and output fields are displaying , but only for this both showing. If I will use only single condition that is massEdit its working fine but not rendering. But I need both.
<apex:pageBlockSection rendered="{!selectedProductLine.item.RecordTypeId = ICRecTypeId}">
<apex:pageBlockSectionItem helpText="{!$ObjectType.ProductLineItem__c.fields.CBG_Pricing_Strategy__c.InlineHelpText}" dataStyleClass="wrapperClass" >
<apex:outputLabel value="{!$ObjectType.ProductLineItem__c.fields.CBG_Pricing_Strategy__c.Label}" for="PricingStrategy"/>
<apex:outputPanel styleClass="requiredInput" layout="block">
<apex:outputPanel styleClass="requiredBlock" layout="block"/>
<apex:outputField id="PricingStrategy" value="{!selectedProductLine.item.CBG_Pricing_Strategy__c}" title="{!$ObjectType.ProductLineItem__c.fields.CBG_Pricing_Strategy__c.InlineHelpText}" rendered="{!!massEdit}">
<apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton,cancelButton"/>
</apex:outputField>
<apex:inputField id="PricingStrategyInput" value="{!selectedProductLine.item.CBG_Pricing_Strategy__c}" rendered="{!IF(AND(selectedProductLine.item.RecordTypeId = ICRecTypeId, massEdit) , true,false)}" onkeypress="return fireSave(event);">
<apex:actionSupport event="onchange" rerender="Priceless"/>
</apex:inputField>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" rendered="{!IF(selectedProductLine.item.CBG_Pricing_Strategy__c== 'Price Less',true,false )}" collapsible="false" >
<apex:pageBlockSectionItem >
<apex:outputLabel value="{!$ObjectType.ProductLineItem__c.fields.CBG_ManufacturingCostsM__c.Label}" for="manCost"/>
<apex:outputPanel styleClass="requiredInput" layout="block" >
<apex:outputPanel styleClass="requiredBlock" layout="block"/>
<apex:outputField id="manCost" value="{!selectedProductLine.item.CBG_ManufacturingCostsM__c}" rendered="{!!massEdit}">
<apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton,cancelButton" />
</apex:outputField>
<apex:inputField id="manCostInput" value="{!selectedProductLine.item.CBG_ManufacturingCostsM__c}" rendered="{!massEdit}" onkeypress="return fireSave(event);"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>