• Hemanthrulez
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi,

 

I have 2 iframes in my visualforce page.  I have developed a functionality to hide/show left frame using standard HTML buttons (onclick). The whole page fits in a <table> tag in which these buttons occupy the middle column. The look and feel is little messy.


Any other approach to develop this functionality, like... if I hover the mouse on the right frame, the left should be hidden without using buttons.

 

 

Thanks

Hemanth

Hi,
 

I have few reports in my picklist. As I click on each report name, the output panel with iframe component is being rendered. But I dont want the entire report to be displayed. I just need the table in the report.How do extract the table information from the report?

 


Need help.

 

 

Hi,

 

I have createed a custom Field Country__c  in User Object with 10 values in it. How do I retrieve those values using SOQL in the controller and populate in <apex:selectOptions>. All those items must be displayed on the visualforce page so that I can make multiple selections.

 

 

Controller:

 

public class MyMSLController {
    String[] countries = new String[]{};
    User userObj = null;
    public MyMSLController(ApexPages.StandardController controller) {
    userObj = (User)controller.getRecord();
    
    
    }
public String[] getCountries()
{
return countries;

}

 public void setCountries(String[] countries) {
            this.countries = countries;
            
        }
        
 public List<SelectOption> getMyPickList()
{   
    List<SelectOption> options = new List<SelectOption>();
    List<User> usr= [ Select User.Country__c From  User];

    for(User a : usr){
        options.add(new SelectOption(??,??);
    }

    return options;
}

}

 

Visualforce page

<apex:page sidebar="false" showHeader="false" standardController="User" extensions="MyMSLController">
<apex:pageBlock ><apex:pageBlockSection ><apex:form >
<apex:outputLabel >Name:    </apex:outputLabel>
<apex:outputText value="{!$User.FirstName}"></apex:outputText><br/>
<apex:outputLabel >Select Countries:    </apex:outputLabel>
<apex:selectList value="{!countries}" multiselect="true" size="2" title="Select">
<apex:selectOptions value="{!myPickList}"></apex:selectOptions>
 </apex:selectList>
</apex:form>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

 

 

Please suggest solution.

Hi,

 

How do I achieve pagination using enhancedList? I have a Custom Object  - Department with department number(Auto Number) as standard field and Department name as custom field. I have 26 entries in the table.

 

I have to list 10 entries per page using enhanced List. While doing this, I am not able to view the department names in the VF page. I just notice 1-26 numbers divided into 3 pages.

 

VisualForce Page - DisplayPagination

 

<apex:page controller="department">
 <p>Display Records</p>
<apex:enhancedList type="department__c" height="400" rowsPerPage="10" customizable="false" id="Display"/>
 </apex:page>

 

 

Controller

 

 

public class department {
    public List<department__c> getDepartments() {
        return [select name,department__c.Department_Name__c from department__c order by LastModifiedDate asc];
    }


}

 

 

 

 

 

Please suggest me a solution to it.

Hi,

 

I have createed a custom Field Country__c  in User Object with 10 values in it. How do I retrieve those values using SOQL in the controller and populate in <apex:selectOptions>. All those items must be displayed on the visualforce page so that I can make multiple selections.

 

 

Controller:

 

public class MyMSLController {
    String[] countries = new String[]{};
    User userObj = null;
    public MyMSLController(ApexPages.StandardController controller) {
    userObj = (User)controller.getRecord();
    
    
    }
public String[] getCountries()
{
return countries;

}

 public void setCountries(String[] countries) {
            this.countries = countries;
            
        }
        
 public List<SelectOption> getMyPickList()
{   
    List<SelectOption> options = new List<SelectOption>();
    List<User> usr= [ Select User.Country__c From  User];

    for(User a : usr){
        options.add(new SelectOption(??,??);
    }

    return options;
}

}

 

Visualforce page

<apex:page sidebar="false" showHeader="false" standardController="User" extensions="MyMSLController">
<apex:pageBlock ><apex:pageBlockSection ><apex:form >
<apex:outputLabel >Name:    </apex:outputLabel>
<apex:outputText value="{!$User.FirstName}"></apex:outputText><br/>
<apex:outputLabel >Select Countries:    </apex:outputLabel>
<apex:selectList value="{!countries}" multiselect="true" size="2" title="Select">
<apex:selectOptions value="{!myPickList}"></apex:selectOptions>
 </apex:selectList>
</apex:form>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

 

 

Please suggest solution.

Its bad to find SOQL doesnt have field alias

 

example we cant use

 

select Id, First_Name__c as 'Name' from Candidate