• Gaurav Sinha 15
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies

I have the below code to display the dynamic color of a list
 
<aura:component controller="INTL_CalendarController" implements="forceCommunity:availableForAllPageTypes"  access="global">
    <aura:registerEvent name="startFilter" type="c:filterEvents"/>
    <aura:attribute name="calendarEventFilter" type="User_Calendar_Department__mdt[]" />
    <ul aura:id="eventFilter" class="slds-has-dividers--top">
        <aura:iteration items="{!v.calendarEventFilter}" var="eve">

            <li style="{!'background-color:' + eve.Color_Code__c}"   onclick="{!c.handlePress}" class="selected">
                   {!eve.Label}
            </li>
        </aura:iteration> 

    </ul>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
</aura:component>
My requirement is on click of individual "li" i need the color to disappear and if i click again color has to reappear. I also want the state to be maintained so while querying based on this list i can get the values which are selected and which are not.
This is a calendar application and i want the events to toggle based on the list.
Any help guideline will be highly appreciated.
 
Hi,

I have requirement for implementing the Kokua tempelate.

How do I create new buttons in the community (Kokua Template) which will allow me to create cases of various case types. I think buttons are assigned to global actions, but I can't figure out how to create new buttons and assign them to different global actions.

I tried in my dev org to implement the Kokua tempelate but unable to get the Case. If someone has any idea how to implment the Kokua tempelate, it will be really helpful.
Hi All,
I have created a custom object Student__c. Now the problem i am having is object of Student__c is not getting called in the vf page. I am not able to understadn the reason. if i create a variable and call that it's working.

Below is my apex code.
public class DemoClass {
 String countries = '';

    public List<Student__c> stu {get;set;}
    public String fname{get;set;}
     
    public Student__c student = new Student__c(First_name__c = '2212121212121');
          
    public DemoClass(){
        stu = [select name,First_name__c, Last_Name__c,Age__c,Sex__c from Student__c limit 10];
        //student = new Student__c();
        
    }
    
    public PageReference test() {
        return null;
    }
            
    public Student__c getstudent(){
        return student;
    }
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
        /* options.add(new SelectOption('US','USA'));
options.add(new SelectOption('CANADA','Canada'));
options.add(new SelectOption('MEXICO','Mexico'));
*/
        for(Student__c temp:stu){
            options.add(new SelectOption(String.valueOf(temp.ID),temp.name));
        }            
        return options;
    }
    
    public String getCountries() {
        student = getS();fname=student.First_name__c;
        student.First_name__c = '222222';
        return countries;
    }
    
    public void setCountries(String countries) {
        setS((ID)countries);
        this.countries = countries;
    }
    
     public Student__c getS() {
           // countries = 'asdasda';
            System.debug('x154865 the loop'+student);
            return student;
        }
    public void setS(ID rec) {
        //  countries = '11111';
        Student__c temp1 = null;
        System.debug('before the loop '+ rec);
        for(Student__c temp:stu){
            if(rec==temp.id){
                System.debug('inside the loop '+ rec);
                temp1=temp;
            }
        }
        this.student = temp1;
        System.debug('X154865'+temp1+' - '+this.student);
    }

}

VF page
<apex:page controller="DemoClass"  >
      <apex:form>
        <apex:selectList value="{!countries}" multiselect="false" onchange="func();">
            <apex:selectOptions value="{!items}"/>
        </apex:selectList><p/>
        <apex:actionFunction name="func" action="{!test}" rerender="out" status="status"/>
        <apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
         
          <apex:outputPanel id="out"> 
                <apex:inputText  value="{!student.First_Name__c}"/> 
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop"> 
                <apex:outputPanel>
                    <p>You have selected:</p>
                     
                    <apex:dataList value="{!countries}" var="c">{!c}</apex:dataList>
                    {!student.Name}
                    
                    hi hi hi {!student.ID} {!student.First_name__c}
                    
                    <h1>
          name is               {!fname}
                    </h1>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>
    </apex:form>

    
    
</apex:page>



Please help me thorugh. Let me know if any further details are required from my end
Hello Developers,

I am unable to generate the enterprise WSDL, I am using Java 1.8

Below is the command i am issuing via command prompt
java -classpath force-wsc-31.1.0.jar:js-1.7R2.jar:ST-4.0.7.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar

and i am getting this error:
Error: Could not find or load main class com.sforce.ws.tools.wsdlc


Below is the Screenshot of my working directory
Working Dirrectory


Please help me on this, any help will be appreciated.

Thanks
Gaurav Sinha
Hello Expert,

I have just joined the Salesforce, and stuck in this question

I have to create a visual force page with BillingCity, BillingState and BillingCountry and a search button, based on the filter i have to display the records on the vf page.

Below is code for the visual force page

<apex:page StandardController="Account" extensions="AccountExtension">
            <apex:form>
    <apex:pageBlock id="in" title="Populate 100 Entried based on select Criteria" >
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="search" action="{!getAccountExtension}" rerender="out, in" status="status">
                    
                </apex:commandButton>    
            </apex:pageBlockButtons>
            <apex:pageBlockSection>
                <apex:inputField value="{!account.BillingState}"/>
                <apex:inputField value="{!account.BillingCity}"/>
                <apex:inputField value="{!account.BillingCountry}">
                </apex:inputField>
            </apex:pageBlockSection>
        
    </apex:pageBlock>
    </apex:form>
    <apex:pageBlock id ="out" title=" Out put">
        <apex:actionStatus   startText="updatign .... " id ="status"/>
        <apex:pageBlockSection>
            <apex:pageBlockTable value="{!accountRecords}" var="ac">
                <apex:column headervalue="Owner Name" value="{!ac.account.Name}"/>
                <apex:column headervalue = " Billing city " value="{!ac.BillingCity}"/>
                <apex:column headervalue = " Billing State " value="{!ac.BillingState}"/>
                <apex:column headervalue = " Billing Country" value="{!ac.BillingCountry}"/>
              </apex:pageBlockTable>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Below is the code for AccountExtension
public class AccountExtension {

private Account account {get;set;}

public AccountExtension(ApexPages.StandardController  controller){
    this.account = (Account)controller.getRecord();
}
public ApexPages.StandardSetController accountRecords{
    get{
        if(accountRecords==null){
            return new ApexPages.StandardSetController(Database.getQueryLocator([Select Name, 
                                                                                        BillingCity,
                                                                                        BillingState,
                                                                                        BillingCountry 
                                                                                 from   Account 
                                                                                 where  BillingCountry like :account.BillingCountry
                                                                                 and    BillingCity     like :account.BillingCity
                                                                                 and    BillingState   like :account.BillingState
                                                                                 limit  100
                                                                                 ]));
            } 
            return accountRecords;
            
        }
        private set;
    }

    public List<Account> getAccountExtension(){
         return (List<Account>) accountRecords.getRecords();

    }
    
    }


I am not able to use accountRecords in the <apex:pageTable>. 
Kindly suggest the way to display the records on the vf page, using the filter created.

Any help will be appreciated
Hi All,
I have created a custom object Student__c. Now the problem i am having is object of Student__c is not getting called in the vf page. I am not able to understadn the reason. if i create a variable and call that it's working.

Below is my apex code.
public class DemoClass {
 String countries = '';

    public List<Student__c> stu {get;set;}
    public String fname{get;set;}
     
    public Student__c student = new Student__c(First_name__c = '2212121212121');
          
    public DemoClass(){
        stu = [select name,First_name__c, Last_Name__c,Age__c,Sex__c from Student__c limit 10];
        //student = new Student__c();
        
    }
    
    public PageReference test() {
        return null;
    }
            
    public Student__c getstudent(){
        return student;
    }
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
        /* options.add(new SelectOption('US','USA'));
options.add(new SelectOption('CANADA','Canada'));
options.add(new SelectOption('MEXICO','Mexico'));
*/
        for(Student__c temp:stu){
            options.add(new SelectOption(String.valueOf(temp.ID),temp.name));
        }            
        return options;
    }
    
    public String getCountries() {
        student = getS();fname=student.First_name__c;
        student.First_name__c = '222222';
        return countries;
    }
    
    public void setCountries(String countries) {
        setS((ID)countries);
        this.countries = countries;
    }
    
     public Student__c getS() {
           // countries = 'asdasda';
            System.debug('x154865 the loop'+student);
            return student;
        }
    public void setS(ID rec) {
        //  countries = '11111';
        Student__c temp1 = null;
        System.debug('before the loop '+ rec);
        for(Student__c temp:stu){
            if(rec==temp.id){
                System.debug('inside the loop '+ rec);
                temp1=temp;
            }
        }
        this.student = temp1;
        System.debug('X154865'+temp1+' - '+this.student);
    }

}

VF page
<apex:page controller="DemoClass"  >
      <apex:form>
        <apex:selectList value="{!countries}" multiselect="false" onchange="func();">
            <apex:selectOptions value="{!items}"/>
        </apex:selectList><p/>
        <apex:actionFunction name="func" action="{!test}" rerender="out" status="status"/>
        <apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
         
          <apex:outputPanel id="out"> 
                <apex:inputText  value="{!student.First_Name__c}"/> 
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop"> 
                <apex:outputPanel>
                    <p>You have selected:</p>
                     
                    <apex:dataList value="{!countries}" var="c">{!c}</apex:dataList>
                    {!student.Name}
                    
                    hi hi hi {!student.ID} {!student.First_name__c}
                    
                    <h1>
          name is               {!fname}
                    </h1>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>
    </apex:form>

    
    
</apex:page>



Please help me thorugh. Let me know if any further details are required from my end
Hello Expert,

I have just joined the Salesforce, and stuck in this question

I have to create a visual force page with BillingCity, BillingState and BillingCountry and a search button, based on the filter i have to display the records on the vf page.

Below is code for the visual force page

<apex:page StandardController="Account" extensions="AccountExtension">
            <apex:form>
    <apex:pageBlock id="in" title="Populate 100 Entried based on select Criteria" >
            <apex:pageBlockButtons location="top">
                <apex:commandButton value="search" action="{!getAccountExtension}" rerender="out, in" status="status">
                    
                </apex:commandButton>    
            </apex:pageBlockButtons>
            <apex:pageBlockSection>
                <apex:inputField value="{!account.BillingState}"/>
                <apex:inputField value="{!account.BillingCity}"/>
                <apex:inputField value="{!account.BillingCountry}">
                </apex:inputField>
            </apex:pageBlockSection>
        
    </apex:pageBlock>
    </apex:form>
    <apex:pageBlock id ="out" title=" Out put">
        <apex:actionStatus   startText="updatign .... " id ="status"/>
        <apex:pageBlockSection>
            <apex:pageBlockTable value="{!accountRecords}" var="ac">
                <apex:column headervalue="Owner Name" value="{!ac.account.Name}"/>
                <apex:column headervalue = " Billing city " value="{!ac.BillingCity}"/>
                <apex:column headervalue = " Billing State " value="{!ac.BillingState}"/>
                <apex:column headervalue = " Billing Country" value="{!ac.BillingCountry}"/>
              </apex:pageBlockTable>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Below is the code for AccountExtension
public class AccountExtension {

private Account account {get;set;}

public AccountExtension(ApexPages.StandardController  controller){
    this.account = (Account)controller.getRecord();
}
public ApexPages.StandardSetController accountRecords{
    get{
        if(accountRecords==null){
            return new ApexPages.StandardSetController(Database.getQueryLocator([Select Name, 
                                                                                        BillingCity,
                                                                                        BillingState,
                                                                                        BillingCountry 
                                                                                 from   Account 
                                                                                 where  BillingCountry like :account.BillingCountry
                                                                                 and    BillingCity     like :account.BillingCity
                                                                                 and    BillingState   like :account.BillingState
                                                                                 limit  100
                                                                                 ]));
            } 
            return accountRecords;
            
        }
        private set;
    }

    public List<Account> getAccountExtension(){
         return (List<Account>) accountRecords.getRecords();

    }
    
    }


I am not able to use accountRecords in the <apex:pageTable>. 
Kindly suggest the way to display the records on the vf page, using the filter created.

Any help will be appreciated