You need to sign in to do that
Don't have an account?
hacksawblade16
set checkbox value to checked
i have checkboxes in column header inside pageblocktable. I rerender the table when the checkbox is checked.after rerendering i want the checkbox to remian in the checked state,but it gets unchecked.How can i keep it checked??
@hacksawblade16
Hey the issue, as i perceive is that you are trying to rerender the same table, whose header checkbox is checked(by the user)
Now as you rerender the table, thye column header also refreshes, and hence the check is gone.
Now if this is what the scenario is. Then i can advise you few steps you can take:
and then on your page
you will bind this boolean to your checkbox
Now what this does is, it will submit your form and you will get a the checkbox checked again, once it is rerendered
2. Or else you can have a different column header and different table body section, and make sure you refresh only the table. This will be a little extra work but at the end of the day, it might solve your issue.
I hope, I understood your problem correctly. If yes, do let me know if you get any problem implementing any of the above steps. And if no, then i would love to hear from you.
<Apex:facet name=header">
<apex:inputCheckBox value="{!isColumnValueChecked}"/>
<apex:actionSupport event="onchange" reRender="tablePanel"/>
</Apex:facet>
<apex:column>
Oh thats the thing,
actionsuppport has to be inside the checkbox, like this.
Try this, hopefully your problem will be solved. ;)