Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:inputCheckbox value="{!SLC.selected}" styleClass="SLC {!SLO.Id}" disabled="true">
- <apex:actionSupport event="onchange" rerender="dataToDisplay" />
- </apex:inputCheckbox>
- public void setSelected(Boolean selected){
- this.selected=selected;
- system.debug('modif SLC : '+this.name);
- if(owner!=null){
- if(selected){
- // add in map
- }
- else{
- // remove from map
- }
- <apex:page controller="myController">
- <apex:form >
- <apex:actionFunction action="{!doSmthg}" name="functionToLaunch" rerender="toReRender"/>
- <div>
- <apex:inputCheckbox value="{!checked}" onchange="functionToLaunch"/>
- <label>Click-me</label>
- </div>
- <apex:pageBlock id="toReRender" >
- <apex:outputtext >{!value}</apex:outputtext>
- <span>{!indice}</span>
- </apex:pageBlock>
- </apex:form>
- </apex:page>
- public with sharing class myController{
- // fields
- public String value {get; set;}
- public Boolean checked {get; set;}
- public DateTime indice {get; set;}
- // constructor - initialization
- public CampaignVFManagerController_test1(){
- value='Nothing yet';
- indice=datetime.now();
- }
- // methods
- public void doSmthg(){
- indice=datetime.now();
- if(checked){
- value = 'i have been checked';
- }
- else{
- value = 'i have been unchecked';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement