function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LithiumsLithiums 

inputcheck box selected issue

I have a simple vf page, I am trying to set the checkbox value selected to true. But it doesnt work when the page is displayed the checkboxes are  unchecked.

 

<apex:page standardController="Opportunity" extensions="Test">
 
  <apex:form id="theform">
      <apex:actionFunction action="{!click}" name="displayFunction"  rerender="" id="afunc">
                <apex:param name="stageV" value="" id="aparam"/>
      </apex:actionFunction>
      
      <apex:pageBlock id="pageblock">
            <apex:repeat value="{!stageValue}" var="s">
                <apex:outputLabel value="{!s.Name}"/>
                <apex:inputCheckbox selected="true" />
            </apex:repeat>
        </apex:pageBlock>  
  </apex:form>
</apex:page>

stcforcestcforce

don't know but it doesn't look like you've got anything bound to your check box or is this only partial code.

SaissreeneeSaissreenee

Hi There,

 

This looks more of a bug. In my following code, checked would work but not the <apex:inputCheckbox selected attribute would not work.

 

Any ideas?

 

 <apex:dataTable value="{!sCatQuestions}" var="Q">
            <apex:column headerValue=" "><input type="checkbox" name="{!Q.name}" checked="checked" /></apex:column>
            <apex:column headerValue=" "><apex:inputCheckbox value="{!Q.name}" selected="true" /></apex:column>
            <apex:column value="{!Q.Question__c}" headerValue="Question" width="50%"/>
            <apex:column value="{!Q.Identifier__c}" headerValue="Identifier" width="20%"/>
            <apex:column value="{!Q.Type__c}" headerValue="Question Type" width="20%"/>
            <apex:column value="{!Q.Answer_Choices__c}" headerValue="Answer Choices" width="20%"/>
        </apex:dataTable>

 

 

Regards

 

Saissreenee

 

LithiumsLithiums

This is a partial code, if this works than I would be dynamically passing the selected values.

SaissreeneeSaissreenee

I could make it work.  Let me know if you need any help in regards to this.

 

Regards

 

Saissreenee

LithiumsLithiums

Ys plz, please make it work.