You need to sign in to do that
Don't have an account?
Mayank Batra
How to link apex:inputCheckbox to a String or Object property on selection.
Hi,
I am displaying my Object's fields to the users like below. I have given a checkbox against each value. On click of submit, I want to use the selected values only and use them (say save to the DB).
Following is the apex code :
Can anybody tell me if there is a way I can link the checkbox with an Object or even a String that will help me get hold of the selected list and then submit the selected values only?
Thanks,
Mayank Batra
I am displaying my Object's fields to the users like below. I have given a checkbox against each value. On click of submit, I want to use the selected values only and use them (say save to the DB).
Following is the apex code :
<apex:pageblockTable value="{!filteredReq}" var="req" > <!--<apex:pageBlockTable value="{!FG_Business_Requirement__c}" var="c" id="table1"/> --> <!-- <apex:column >--> <!-- <apex:param value="{!req.BR_Number__c}" assignTo="{!currentReqNum}" />--> <!-- <apex:selectCheckboxes value="{!brNumbers}">--> <!-- <apex:selectOptions value="{!reqItems}" />--> <!-- </apex:selectCheckboxes>--> <!-- </apex:column>--> <apex:column > <apex:param value="{!req}" assignTo="{!reqList[count].con}" /> <!-- <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')"/>--> <apex:inputCheckbox value="{!selected}" /> </apex:column> <apex:column style="text-align: justify;" value="{!req.BR_Number__c}"/> <apex:column style="text-align: justify;" value="{!req.Name}"/> <apex:column style="text-align: justify;" value="{!req.FG_id__c}"/> <apex:column style="text-align: justify;" value="{!req.BR_Complexity__c}"/> <apex:column style="text-align: justify;" value="{!req.Tech_Complexity__c}"/> <apex:column style="text-align: justify;" value="{!req.BSRQ_Process__c}"/> <apex:column style="text-align: justify;" value="{!req.BSRQ_Process_Group__c}"/> <apex:column style="text-align: justify;" value="{!req.BSRQ_SubProcess__c }"/> <apex:param value="{!++count}" assignTo="{!count}"/> </apex:pageblockTable> <apex:commandButton value="Submit" action="{!submit}" dir="LTR"/>
Can anybody tell me if there is a way I can link the checkbox with an Object or even a String that will help me get hold of the selected list and then submit the selected values only?
Thanks,
Mayank Batra
All Answers