• Praveen Kumar 212
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 2
    Replies
Hi All,
Here is my small code snippet. I have implemented the modal popup using CSS  and action:function. I want to do this toggle effect without using controller. So that i can implement everything in the VF page itself. Help! :)
 
<apex:page controller="dumm" >
 <apex:form id="form" >
   <apex:image id="theImage" onmouseover="showPopup()" onmouseout="hidePopup()"  value= "{!$Resource.EC2Console_RebootImage}" width="30" height="30"/>
    <apex:actionFunction action="{!showPopUp}" name="showPopup" reRender="form" />
    <apex:actionFunction action="{!closePopup}" name="hidePopup" reRender="theIframe" />
    <apex:outputPanel id="tstpopup">
        <apex:outputPanel styleClass="popupBackground"   layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup"  rendered="{!displayPopUp}">
               <apex:commandButton value="Close" action="{!closePopup}" rerender="tstpopup"/>
                <apex:iframe src="https://www.salesforce.com"  scrolling="true" height="300"></apex:iframe></apex:outputPanel>
   </apex:outputPanel>
</apex:form>
<style type="text/css">
        .custPopup{
            background-color: white;
            border-width: 2px;
            border-style: solid;
            z-index: 9999;
            left: 50%;
            padding:10px;
            position: absolute;
            width: 700px;
            margin-left: -250px;
            top:100px;
        }
        .popupBackground{
            background-color:black;
            opacity: 0.20;
            filter: alpha(opacity = 20);
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 9998;
        }

    </style>
</apex:page>

public with sharing class dumm {

    public dumm(ApexPages.StandardController controller) {

    }


public boolean displayPopup {get; set;} 
    public dumm(){
        displayPopup = false;
    }
    
    public void closePopup() {        
        displayPopup = false;    
    }     
    public void showPopup() {        
        displayPopup = true;    
    }
    
  
}


 
Hi,
I am experiencing this error "(Field is not writable: PushTopic.Notify For Operations)" when trying to subscribe to PUSH NOTIFICATIONS from Anonymous Window.
I have tried to change VIEW ALL & MODIFY ALL in object permissions for System Administrator. But i am unable to edit the checkboxes.
Pls help
Hi All,

I am working on this Action Poller thing. My requirement is VF component has to change according to the field change or DML operation on a Record in an object. Like the stages are "Processing" "Completed" "Exception". Each Stages have their own VF components which are rendered accordingly.

But, This actionpoller is not moving to next stage from "Processing" to "Completed" though i made DML changes to record.
Pls help. Below is my code.
PAGE..
<apex:page  showHeader="false" controller="DocumentStatusPoller" >
    <apex:form>
    <apex:actionPoller reRender="Intform,Pendform,Compform,Excepform" action="{!pollermeth}"
                        interval="10"  />
    </apex:form>
    <apex:form id="Intform" rendered="{!Intform}">
        <c:Initiating >
             <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Processing..</div>
        </c:Initiating>
    </apex:form>
    
    <apex:form id="Pendform" rendered="{!Pendform}">
        <c:Pending >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Pending..</div>
        </c:Pending>
    </apex:form>
    
    <apex:form id="Compform" rendered="{!Compform}">
        <c:Complete >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Completed..</div>
        </c:Complete>
    </apex:form>
    
    <apex:form id="Excepform" rendered="{!Excepform}">
        <c:Exception >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Exception Occured</div>
        </c:Exception>
    </apex:form>
CLASS..
public with sharing class DocumentStatusPoller {
    public Boolean Intform{get; set;}
    public Boolean Pendform{get; set;}
    public Boolean Compform{get; set;}
    public Boolean Excepform{get; set;}
    
    
    
   /* public Boolean IntBlk {get; set;}
    public Boolean ExceptionBlk { get; set;}
    public Boolean CompBlk { get; set; }
    public Boolean PendBlk { get; set; }*/
    
    public String DocSessID{get; set;}

    public DocumentStatusPoller(){
    
     DocSessID = ApexPages.currentPage().getParameters().get('DocSessionID');
        
            Intform = true;
            Pendform = false;
            Compform = false;
            Excepform = false;
      
     /* IntBlk = true;
      PendBlk = false;
      CompBlk = false;
      ExceptionBlk = false;*/
      
    }

    public PageReference pollermeth() {
    
   Document_Session__c DocSessRec = [select   Name, 
                                                   Contact_Document__c,
                                                    Exception__c,
                                                    Status__c
                                             from   Document_Session__c where Id='a1JU0000003qSVgMAM'];
    
    if(DocSessRec != null){
        if(DocSessRec.Status__c=='Pending'){
            Intform = false;
            Pendform = true;
            Compform = false;
            Excepform = false;
            
           /* PendBlk = true;
            CompBlk = false;
            ExceptionBlk = false;
            IntBlk = false;*/
        } else
            if(DocSessRec.Status__c=='Complete'){
                
            Intform = false;
            Pendform = false;
            Compform = true;
            Excepform = false;
           /* PendBlk = false;
            CompBlk = true;
            ExceptionBlk = false;  
            IntBlk = false;*/
            
        } else
            if(DocSessRec.Status__c=='Exception'){
              Intform = false;
            Pendform = false;
            Compform = false;
            Excepform = true;
            /*PendBlk = false;
            CompBlk = true;
            ExceptionBlk = false;
            IntBlk = false;*/
          
        }
      }
         return null;
   }
   
 }

 
Hi,
Has anyone tried integrating with AccuSoft PCC Viewer to Salesforce?
Pls Let me know
Hey,

I want to send checked records to a popup page. I am unable to figure out how to send list of records page to page.
Here's my code.
<apex:page controller="wrapperClassController" >
    <apex:form id="form" >
    
      <apex:pageblock >
        <apex:outputLabel value="Select Filter"/>
        &nbsp; <apex:selectList value="{!selprio}" size="1" >
                  <apex:actionSupport status="st" event="onchange" action="{!actsel}" reRender="form"/>
                  <apex:selectOptions value="{!prior}"/>
               </apex:selectList>
            <apex:actionStatus id="st" startText="In Progress......" stopText="Done" />
      </apex:pageblock>
      
        <apex:pageBlock >
            <apex:pageBlockButtons >
                
                <apex:commandButton value="Delete" action="{!Del}" />
            </apex:pageBlockButtons>
            
            <apex:pageBlockTable value="{!cases}" var="c" id="pgbt">
                <apex:column >
                  <apex:commandButton value="Edit" action="{!Ed}" onclick="return OpenVfpage('{!c.id}')" />
                </apex:column>
                <apex:column >
                    <apex:inputCheckbox value="{!c.selected}"/>
                </apex:column>
                <apex:column value="{!c.con.contactid}"/>
                <apex:column value="{!c.con.priority}"/>
                <apex:column value="{!c.con.status}"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
    



<script>
function OpenVfpage(id) { 
        var url = "/apex/selectedrecpage?id="+id;
       var newwin=window.open(url,'newPopup','_blank','height=500,width=600,left=100,top=100,resizable=no,scrollbars=yes,toolbar=no,status=no');
       
       if(window.focus)
       {
       newwin.focus();
       }
       return false;
    }
    
</script>
</apex:page>
 
public with sharing class wrapperClassController {

    public wrapperclasscontroller(){
    
    
    
    logid = UserInfo.getUserId();
    
    }

    public String Logid {get; set;}
    public List<case> caset = new List<case>();

    public String prior { set; }
    
    String qry  = 'Select accountid, priority, status from case where priority=: selprio';
    
    public List<selectoption>  getprior()
    {
        List<selectoption> options = new List<selectOption>();
        options.add(new selectOption('None','None'));
        options.add(new selectOption('Closed', 'Closed'));
        options.add(new selectOption('Open' , 'Open'));
        options.add(new selectoption('MyCases', 'MyCases'));
        
       /* for(case obj:[select priority from case])
        {
            options.add(new selectOption(obj.priority,obj.priority));
        }*/
        
        return options;
    }

    public PageReference actsel() {
    
    if(selprio == 'Open')
      {
        caseList = new List<cCase>();
        caset = [select id, Contactid, priority, status,isClosed from case where isClosed!= true];
        
          for(Case c: caset)
            {
              cCase wrpopen = new cCase(c);
              caseList.add(wrpopen);
            }
            
      }
     if(selprio == 'Closed')
      {
        caseList = new List<cCase>();
        caset = [select id, Contactid, priority, status from case where isClosed = true];
        
          for(Case c: caset)
            {
              cCase wrpclosed = new cCase(c);
              caseList.add(wrpclosed);
            }
            
      } 
     if(selprio == 'MyCases')
      {
        caseList = new List<cCase>();
        caset = [select id, Contactid, priority, status, ownerid from case where ownerid =: logid];
        
          for(Case c: caset)
            {
              cCase wrpclosed = new cCase(c);
              caseList.add(wrpclosed);
            }
            
      }  
       return null;
    }
    
    
    
    public String selprio { get; set; }
    
    public List<cCase> caseList {get; set;}

    public List<cCase> getCases() {
        if(caseList == null) {
            caseList = new List<cCase>();
            for(Case c: [select id, contactid, priority, status from case]) {
                caseList.add(new cCase(c));
            }
        }
        return caseList;
    }


     public class cCase {
     
        
        public id id{get; set;}
        public Case con {get; set;}
        public Boolean selected {get; set;}
        
        public cCase(Case c) {
           
            con = c;
            selected = false;
        }
    }
    
    public PageReference Del() {
        return null;
    }


    public PageReference Ed() {
    
     return null;
    }
}

 
I am trying to change language of outputlabel using apex:page language attribute and picklist, but its not working. Help needed please!.
VF
<apex:page language="{!lang}" controller="Language" >
 <apex:form >
 
 <apex:selectList value="{!langlist}" size="1">
     <apex:actionSupport event="onchange" action="{!change}"/>
     <apex:selectOptions value="{!selectlang}"/>
    </apex:selectList>
  <apex:pageBlock >
  
   <apex:pageBlockSection >
   <apex:pageblockSectionItem >
    <apex:outputLabel value="{!$ObjectType.Amenity__c.label}"></apex:outputLabel>
    <apex:inputtext value="{!name}"/>
    </apex:pageblockSectionItem><br/>
    <apex:pageBlockSectionitem >
    <apex:outputLabel value="{!$ObjectType.Amenity__c.label}"></apex:outputLabel>
    <apex:inputtext value="{!email}"/>
    </apex:pageBlockSectionitem>
    
   </apex:pageBlockSection>
  </apex:pageBlock>
 </apex:form>
</apex:page>

Controller
 
public with sharing class Language {

    public String lang {get; set;}

    public String selectlang { set; }
    
    public List<selectoption> getselectlang(){
    
     List<selectoption> opt = new List<selectoption>();
     
     opt.add(new selectoption('None','None'));
     opt.add(new selectoption('English','English'));
     opt.add(new selectoption('Japanese','Japanese'));
     opt.add(new selectoption('Urdu', 'Urdu'));
     
     return opt;
    
    }

    public PageReference change() {
    
    if(langlist == 'English')
     {
    
       lang='en';
     
     } else if (langlist=='Japanese')
       {
     
         lang='ja';
         
       } else if(langlist=='Urdu')
       
        {
        
         lang='ur';
         
        }
        return null;
    }


    public String langlist { get; set; }

    public String email { get; set; }

    public String name { get; set; }
}

 
Hi All,
Here is my small code snippet. I have implemented the modal popup using CSS  and action:function. I want to do this toggle effect without using controller. So that i can implement everything in the VF page itself. Help! :)
 
<apex:page controller="dumm" >
 <apex:form id="form" >
   <apex:image id="theImage" onmouseover="showPopup()" onmouseout="hidePopup()"  value= "{!$Resource.EC2Console_RebootImage}" width="30" height="30"/>
    <apex:actionFunction action="{!showPopUp}" name="showPopup" reRender="form" />
    <apex:actionFunction action="{!closePopup}" name="hidePopup" reRender="theIframe" />
    <apex:outputPanel id="tstpopup">
        <apex:outputPanel styleClass="popupBackground"   layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup"  rendered="{!displayPopUp}">
               <apex:commandButton value="Close" action="{!closePopup}" rerender="tstpopup"/>
                <apex:iframe src="https://www.salesforce.com"  scrolling="true" height="300"></apex:iframe></apex:outputPanel>
   </apex:outputPanel>
</apex:form>
<style type="text/css">
        .custPopup{
            background-color: white;
            border-width: 2px;
            border-style: solid;
            z-index: 9999;
            left: 50%;
            padding:10px;
            position: absolute;
            width: 700px;
            margin-left: -250px;
            top:100px;
        }
        .popupBackground{
            background-color:black;
            opacity: 0.20;
            filter: alpha(opacity = 20);
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 9998;
        }

    </style>
</apex:page>

public with sharing class dumm {

    public dumm(ApexPages.StandardController controller) {

    }


public boolean displayPopup {get; set;} 
    public dumm(){
        displayPopup = false;
    }
    
    public void closePopup() {        
        displayPopup = false;    
    }     
    public void showPopup() {        
        displayPopup = true;    
    }
    
  
}


 
Hi All,

I am working on this Action Poller thing. My requirement is VF component has to change according to the field change or DML operation on a Record in an object. Like the stages are "Processing" "Completed" "Exception". Each Stages have their own VF components which are rendered accordingly.

But, This actionpoller is not moving to next stage from "Processing" to "Completed" though i made DML changes to record.
Pls help. Below is my code.
PAGE..
<apex:page  showHeader="false" controller="DocumentStatusPoller" >
    <apex:form>
    <apex:actionPoller reRender="Intform,Pendform,Compform,Excepform" action="{!pollermeth}"
                        interval="10"  />
    </apex:form>
    <apex:form id="Intform" rendered="{!Intform}">
        <c:Initiating >
             <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Processing..</div>
        </c:Initiating>
    </apex:form>
    
    <apex:form id="Pendform" rendered="{!Pendform}">
        <c:Pending >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Pending..</div>
        </c:Pending>
    </apex:form>
    
    <apex:form id="Compform" rendered="{!Compform}">
        <c:Complete >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Completed..</div>
        </c:Complete>
    </apex:form>
    
    <apex:form id="Excepform" rendered="{!Excepform}">
        <c:Exception >
            <img src="{!$Resource.SpinnerLightning}" width="50" height="50" />
             <div style="font-size:150%;padding:5px">Exception Occured</div>
        </c:Exception>
    </apex:form>
CLASS..
public with sharing class DocumentStatusPoller {
    public Boolean Intform{get; set;}
    public Boolean Pendform{get; set;}
    public Boolean Compform{get; set;}
    public Boolean Excepform{get; set;}
    
    
    
   /* public Boolean IntBlk {get; set;}
    public Boolean ExceptionBlk { get; set;}
    public Boolean CompBlk { get; set; }
    public Boolean PendBlk { get; set; }*/
    
    public String DocSessID{get; set;}

    public DocumentStatusPoller(){
    
     DocSessID = ApexPages.currentPage().getParameters().get('DocSessionID');
        
            Intform = true;
            Pendform = false;
            Compform = false;
            Excepform = false;
      
     /* IntBlk = true;
      PendBlk = false;
      CompBlk = false;
      ExceptionBlk = false;*/
      
    }

    public PageReference pollermeth() {
    
   Document_Session__c DocSessRec = [select   Name, 
                                                   Contact_Document__c,
                                                    Exception__c,
                                                    Status__c
                                             from   Document_Session__c where Id='a1JU0000003qSVgMAM'];
    
    if(DocSessRec != null){
        if(DocSessRec.Status__c=='Pending'){
            Intform = false;
            Pendform = true;
            Compform = false;
            Excepform = false;
            
           /* PendBlk = true;
            CompBlk = false;
            ExceptionBlk = false;
            IntBlk = false;*/
        } else
            if(DocSessRec.Status__c=='Complete'){
                
            Intform = false;
            Pendform = false;
            Compform = true;
            Excepform = false;
           /* PendBlk = false;
            CompBlk = true;
            ExceptionBlk = false;  
            IntBlk = false;*/
            
        } else
            if(DocSessRec.Status__c=='Exception'){
              Intform = false;
            Pendform = false;
            Compform = false;
            Excepform = true;
            /*PendBlk = false;
            CompBlk = true;
            ExceptionBlk = false;
            IntBlk = false;*/
          
        }
      }
         return null;
   }
   
 }

 
Hey,

I want to send checked records to a popup page. I am unable to figure out how to send list of records page to page.
Here's my code.
<apex:page controller="wrapperClassController" >
    <apex:form id="form" >
    
      <apex:pageblock >
        <apex:outputLabel value="Select Filter"/>
        &nbsp; <apex:selectList value="{!selprio}" size="1" >
                  <apex:actionSupport status="st" event="onchange" action="{!actsel}" reRender="form"/>
                  <apex:selectOptions value="{!prior}"/>
               </apex:selectList>
            <apex:actionStatus id="st" startText="In Progress......" stopText="Done" />
      </apex:pageblock>
      
        <apex:pageBlock >
            <apex:pageBlockButtons >
                
                <apex:commandButton value="Delete" action="{!Del}" />
            </apex:pageBlockButtons>
            
            <apex:pageBlockTable value="{!cases}" var="c" id="pgbt">
                <apex:column >
                  <apex:commandButton value="Edit" action="{!Ed}" onclick="return OpenVfpage('{!c.id}')" />
                </apex:column>
                <apex:column >
                    <apex:inputCheckbox value="{!c.selected}"/>
                </apex:column>
                <apex:column value="{!c.con.contactid}"/>
                <apex:column value="{!c.con.priority}"/>
                <apex:column value="{!c.con.status}"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
    



<script>
function OpenVfpage(id) { 
        var url = "/apex/selectedrecpage?id="+id;
       var newwin=window.open(url,'newPopup','_blank','height=500,width=600,left=100,top=100,resizable=no,scrollbars=yes,toolbar=no,status=no');
       
       if(window.focus)
       {
       newwin.focus();
       }
       return false;
    }
    
</script>
</apex:page>
 
public with sharing class wrapperClassController {

    public wrapperclasscontroller(){
    
    
    
    logid = UserInfo.getUserId();
    
    }

    public String Logid {get; set;}
    public List<case> caset = new List<case>();

    public String prior { set; }
    
    String qry  = 'Select accountid, priority, status from case where priority=: selprio';
    
    public List<selectoption>  getprior()
    {
        List<selectoption> options = new List<selectOption>();
        options.add(new selectOption('None','None'));
        options.add(new selectOption('Closed', 'Closed'));
        options.add(new selectOption('Open' , 'Open'));
        options.add(new selectoption('MyCases', 'MyCases'));
        
       /* for(case obj:[select priority from case])
        {
            options.add(new selectOption(obj.priority,obj.priority));
        }*/
        
        return options;
    }

    public PageReference actsel() {
    
    if(selprio == 'Open')
      {
        caseList = new List<cCase>();
        caset = [select id, Contactid, priority, status,isClosed from case where isClosed!= true];
        
          for(Case c: caset)
            {
              cCase wrpopen = new cCase(c);
              caseList.add(wrpopen);
            }
            
      }
     if(selprio == 'Closed')
      {
        caseList = new List<cCase>();
        caset = [select id, Contactid, priority, status from case where isClosed = true];
        
          for(Case c: caset)
            {
              cCase wrpclosed = new cCase(c);
              caseList.add(wrpclosed);
            }
            
      } 
     if(selprio == 'MyCases')
      {
        caseList = new List<cCase>();
        caset = [select id, Contactid, priority, status, ownerid from case where ownerid =: logid];
        
          for(Case c: caset)
            {
              cCase wrpclosed = new cCase(c);
              caseList.add(wrpclosed);
            }
            
      }  
       return null;
    }
    
    
    
    public String selprio { get; set; }
    
    public List<cCase> caseList {get; set;}

    public List<cCase> getCases() {
        if(caseList == null) {
            caseList = new List<cCase>();
            for(Case c: [select id, contactid, priority, status from case]) {
                caseList.add(new cCase(c));
            }
        }
        return caseList;
    }


     public class cCase {
     
        
        public id id{get; set;}
        public Case con {get; set;}
        public Boolean selected {get; set;}
        
        public cCase(Case c) {
           
            con = c;
            selected = false;
        }
    }
    
    public PageReference Del() {
        return null;
    }


    public PageReference Ed() {
    
     return null;
    }
}