Skip to main content

String method contains giving error on visulvisual force page

I have a multiselect picklist called transport. I need to render two other picklistpicklists depending on the value selected in multislelect picklist 'Transport'.

I am using following code to render that otherthose two picklistpicklists :

<apex:outputPanel rendered="{!opp.Optional_Transport__c.contains('Train')}" >

but theBut above line through following error" Unknown function opp.Optional_Addenda__c.contains. Check spelling. "error :

Unknown function opp.Optional_Addenda__c.contains. Check spelling.

I have also tried using this way but that againit gives another error :

<apex:outputPanel rendered="{!IF(CONTAINS({!opp.Optional_Transport__c}, "Train "),True, False)}" >

Error "Element type "apex:outputPanel" must be followed by either attribute specifications, ">" or "/>"."

Error "Element type "apex:outputPanel" must be followed by either attribute specifications, ">" or "/>"."

Can someone please help me if you know what to do for Multiselect list in this case?

String method contains giving error on visul force page

I have a multiselect picklist called transport. I need to render two other picklist depending on the value selected in multislelect picklist 'Transport'

I am using following code to render that other two picklist

<apex:outputPanel rendered="{!opp.Optional_Transport__c.contains('Train')}" >

but the above line through following error" Unknown function opp.Optional_Addenda__c.contains. Check spelling. "

I have also tried using this way but that again gives another error

<apex:outputPanel rendered="{!IF(CONTAINS({!opp.Optional_Transport__c}, "Train "),True, False)}" >

Error "Element type "apex:outputPanel" must be followed by either attribute specifications, ">" or "/>"."

Can someone please help me if you know what to do for Multiselect list in this case?

String method contains giving error on visual force page

I have a multiselect picklist called transport. I need to render two other picklists depending on the value selected in multislelect picklist 'Transport'.

I am using following code to render those two picklists :

<apex:outputPanel rendered="{!opp.Optional_Transport__c.contains('Train')}" >

But above line through following error :

Unknown function opp.Optional_Addenda__c.contains. Check spelling.

I have also tried using this way but it gives another error :

<apex:outputPanel rendered="{!IF(CONTAINS({!opp.Optional_Transport__c}, "Train "),True, False)}" >

Error "Element type "apex:outputPanel" must be followed by either attribute specifications, ">" or "/>"."

Can someone please help me if you know what to do for Multiselect list in this case?

Source Link
Ricky
  • 883
  • 1
  • 16
  • 47

String method contains giving error on visul force page

I have a multiselect picklist called transport. I need to render two other picklist depending on the value selected in multislelect picklist 'Transport'

I am using following code to render that other two picklist

<apex:outputPanel rendered="{!opp.Optional_Transport__c.contains('Train')}" >

but the above line through following error" Unknown function opp.Optional_Addenda__c.contains. Check spelling. "

I have also tried using this way but that again gives another error

<apex:outputPanel rendered="{!IF(CONTAINS({!opp.Optional_Transport__c}, "Train "),True, False)}" >

Error "Element type "apex:outputPanel" must be followed by either attribute specifications, ">" or "/>"."

Can someone please help me if you know what to do for Multiselect list in this case?