You need to sign in to do that
Don't have an account?
Erik Rodgers
dynamically selected apex:inputCheckbox from an expression visualforce
I have a visualforce page with a pageBlockTable. I would like one of the columns to be a dynamically selected (checked or unchecked) apex:inputCheckbox driven by a String value from my object array. Here is the line I am using:
<apex:inputCheckbox selected="{!IF(orderHeaderData.has_order_hold == 'Y',true,false)}" disabled="true" />
I am getting the following error:
Syntax error. Missing ')'
I am not able to use a true boolean, so I am trying to use an expression to return a boolean based on my String value. I would appreciate any help with why this won't work.
Thanks.
<apex:inputCheckbox selected="{!IF(orderHeaderData.has_order_hold == 'Y',true,false)}" disabled="true" />
I am getting the following error:
Syntax error. Missing ')'
I am not able to use a true boolean, so I am trying to use an expression to return a boolean based on my String value. I would appreciate any help with why this won't work.
Thanks.
Please try with below it will work .
Thanks
Manoj
I tried your code and it is giving me the same error.
The work around for this is to create a formulae field say "CheckBoxVal__c" and use the logic there and on the page use the following code
Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
How you are parsing the data from wen services.
Have you created any apex structure or wrapper.
if you have any of these then add anothe property there and set it as per your data.
Then use that property on the page.
Donot forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help