• Vincent Fox
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi there!

I'm very new to visualforce / apex and there's one thing I can't get to work:

I have a simple vf page with two columns of checkboxes and I have to create a button which once being clicked ticks all the checkboxes from unchecked to checked or vise versa.

This is my current code:
<apex:page standardController="Rahmenvertrag_OptIn__c" recordSetVar="rv" standardStylesheets="true">
    
    
    <div class="container1">
        <apex:pageBlock >
        <h1>Rahmenvertrag Teilnehmer-Liste</h1>
        <apex:form id="form1">
            
            
            
            <apex:pageBlockTable value="{! rv }" var="rvt" id="table1">
                
                <apex:column value="{! rvt.KD_TN_EKP__c}" headerClass="tableheader" headerValue="EKP"/>
                <apex:column value="{! rvt.KD_TN_Name__c}" headerClass="tableheader" headerValue="Rahmenvertrag Teilnehmer"/>
                <apex:column value="{! rvt.KD_TN_Adresse__c}" headerClass="tableheader" headerValue="Adresse"/>
                <apex:column>
                    <apex:facet name="header"><span class="tableheader">Einwilligung<br/>Datenaustausch</span></apex:facet>
                    <apex:inputCheckbox value="{! rvt.Datenaustausch__c}"  />
                </apex:column>
                <apex:column >
                    <apex:facet name="header"><span class="tableheader">Einwilligung<br/>Werbliche Ansprache</span></apex:facet>
                    <apex:inputField value="{! rvt.Werbeansprache__c}"  />
                </apex:column>
            </apex:pageBlockTable>
            
            
            
            <br/>
            <table>
                <tr>
                <td ><apex:commandButton action="{!save}" value="Zwischenspeichern"/></td>
                <td><apex:commandButton action="{!save}" value="Änderungen bestätigen" /></td>
                </tr>                    
            </table>
        </apex:form>
    </apex:pageBlock>
        </div>
</apex:page>

Any help would be much appreciated! 
Thanks in advance

Hi there!

I'm very new to visualforce / apex and there's one thing I can't get to work:

I have a simple vf page with two columns of checkboxes and I have to create a button which once being clicked ticks all the checkboxes from unchecked to checked or vise versa.

This is my current code:
<apex:page standardController="Rahmenvertrag_OptIn__c" recordSetVar="rv" standardStylesheets="true">
    
    
    <div class="container1">
        <apex:pageBlock >
        <h1>Rahmenvertrag Teilnehmer-Liste</h1>
        <apex:form id="form1">
            
            
            
            <apex:pageBlockTable value="{! rv }" var="rvt" id="table1">
                
                <apex:column value="{! rvt.KD_TN_EKP__c}" headerClass="tableheader" headerValue="EKP"/>
                <apex:column value="{! rvt.KD_TN_Name__c}" headerClass="tableheader" headerValue="Rahmenvertrag Teilnehmer"/>
                <apex:column value="{! rvt.KD_TN_Adresse__c}" headerClass="tableheader" headerValue="Adresse"/>
                <apex:column>
                    <apex:facet name="header"><span class="tableheader">Einwilligung<br/>Datenaustausch</span></apex:facet>
                    <apex:inputCheckbox value="{! rvt.Datenaustausch__c}"  />
                </apex:column>
                <apex:column >
                    <apex:facet name="header"><span class="tableheader">Einwilligung<br/>Werbliche Ansprache</span></apex:facet>
                    <apex:inputField value="{! rvt.Werbeansprache__c}"  />
                </apex:column>
            </apex:pageBlockTable>
            
            
            
            <br/>
            <table>
                <tr>
                <td ><apex:commandButton action="{!save}" value="Zwischenspeichern"/></td>
                <td><apex:commandButton action="{!save}" value="Änderungen bestätigen" /></td>
                </tr>                    
            </table>
        </apex:form>
    </apex:pageBlock>
        </div>
</apex:page>

Any help would be much appreciated! 
Thanks in advance