You need to sign in to do that
Don't have an account?
Akhil Tyagi
I am getting an error: Syntax error. Missing ')' due to the bold text in the code.
Here is my code:
PassQuery is a string which contains the record ids
<apex:pageBlockTable value="{! retrieveRecords }" var="row">
<apex:column id="checkboxcolumn" >
<apex:facet name="header">
<apex:inputCheckbox id="headerCheckbox" value="{! checked}" >
<apex:actionSupport event="onchange" action="{! headerCheckboxMethod}" reRender="pgblock"/>
</apex:inputCheckbox>
</apex:facet>
<apex:inputCheckbox value="{!If(contains(passQuery, row.Id),true,false)}" id="childCheckBox" >
<apex:actionSupport event="onchange" action="{! checkboxStateMethod}" reRender="headerCheckbox">
<apex:param name="checkboxId" value="{! row.Id}" assignTo="{! recordId}" />
</apex:actionSupport>
</apex:inputCheckbox>
</apex:column>
<apex:column headerValue="Action" title="Action">
<apex:outputLink title="Edit Record" value="/{! row.Id}/e?retURL=/apex/DescribeCallAssignment" >Edit</apex:outputLink>|
<apex:commandLink title="Delete Record" action="{! deleteRecord}" reRender="pgblock">Del
<apex:param name="recordToBeDeleted" value="{! row.Id}" assignTo="{! RecordToDelete}" />
</apex:commandLink>
</apex:column>
<apex:repeat value="{! retrieveColumns}" var="col">
<apex:column value="{! row[col]}" />
</apex:repeat>
</apex:pageBlockTable>
PassQuery is a string which contains the record ids
<apex:pageBlockTable value="{! retrieveRecords }" var="row">
<apex:column id="checkboxcolumn" >
<apex:facet name="header">
<apex:inputCheckbox id="headerCheckbox" value="{! checked}" >
<apex:actionSupport event="onchange" action="{! headerCheckboxMethod}" reRender="pgblock"/>
</apex:inputCheckbox>
</apex:facet>
<apex:inputCheckbox value="{!If(contains(passQuery, row.Id),true,false)}" id="childCheckBox" >
<apex:actionSupport event="onchange" action="{! checkboxStateMethod}" reRender="headerCheckbox">
<apex:param name="checkboxId" value="{! row.Id}" assignTo="{! recordId}" />
</apex:actionSupport>
</apex:inputCheckbox>
</apex:column>
<apex:column headerValue="Action" title="Action">
<apex:outputLink title="Edit Record" value="/{! row.Id}/e?retURL=/apex/DescribeCallAssignment" >Edit</apex:outputLink>|
<apex:commandLink title="Delete Record" action="{! deleteRecord}" reRender="pgblock">Del
<apex:param name="recordToBeDeleted" value="{! row.Id}" assignTo="{! RecordToDelete}" />
</apex:commandLink>
</apex:column>
<apex:repeat value="{! retrieveColumns}" var="col">
<apex:column value="{! row[col]}" />
</apex:repeat>
</apex:pageBlockTable>
The issue is that you are using formula expression and apex: input type component uses value binding variables to use its value attributes. You can use wrapper class to show the value in the input checkbox and use that wrapper variable to bind
I have made some changes in your code . Please try using this one.
Visualforce page
Apex Class
This will resolve your issue :)
hope this helps.
All Answers
You don't need the If method for this. Try replacing this line simply by this
Hope this helps.
Thank you for the output Dushyant.
I have already made the above-mentioned changes, but the error remains the same.
Hope you can help further.
Could you post the screenshot of the error message you are getting?
Also post the code of apex class and vf page that will help to debug the issue.
Sure. Here is my component code:
Here is my controller class:
The part which is giving error is in bold.
Here is the Error:
Thank you for the input.
The issue is that you are using formula expression and apex: input type component uses value binding variables to use its value attributes. You can use wrapper class to show the value in the input checkbox and use that wrapper variable to bind
I have made some changes in your code . Please try using this one.
Visualforce page
Apex Class
This will resolve your issue :)
hope this helps.
Thank you for the help. REally appreciate it.