Ads

Tuesday 25 June 2013

Summer13 Release Features

Some Of The available Features With summer13 are  Listed Below,

  1.Approval Processes now available in change sets and exposed through the Metadata API
  2.Publisher actions are available in change sets and are supported in both managed and unmanaged packages.
  3.Summer ’13 introduces a new computer-telephony integration (CTI) Visualforce component—     support:clickToDia.
4.Summer ’13 introduces a new Visualforce component, chatter:userPhotoUpload that lets users upload a photo to their Chatter profile page
  5.The maximum size for a SOQL query has been increased to 20,000 characters
  6.Use Chatter in Apex to build Chatter integrations and custom UIs without making HTTP callouts Because Chatter in Apex exposes many Chatter API resources as Apex classes in the ConnectApi namespace
  7.Global Actions
  8. Communities

Thursday 20 June 2013

Adding Rows Dynamically to Page block Table ?

Apex:

public class MemberPopup
{
    public List<Account> memberList {get;set;}
    public List<Account> memberAddList {get;set;}
    public String memberName {get;set;}      
    public MemberPopup()
    {
        String sql = 'SELECT Name,Company__c FROM Account';
        memberList = Database.Query(sql);
        memberAddList = new List<Account>();
        memberAddList.add(new Account());
    }  
    public void AddRow()
    {
        memberAddList.add(new Account());
    }
}



VF Page:

<apex:page controller="MemberPopup" >
<apex:form >
    <apex:pageBlock id="membAdd" >                
        <apex:pageblockSection >
            <apex:pageBlockTable value="{!memberAddList}" var="m" >
                <apex:column headerValue="Member Name">
                    <apex:inputField value="{!m.Name}"/>
                </apex:column>
                <apex:column headerValue="Mobile Number">
                    <apex:inputField value="{!m.Company__c}"/>
                </apex:column>
                <apex:column headerValue="eMail Id">
                    <apex:inputField value="{!m.Account_Status__c}"/>
                </apex:column>
            </apex:pageBlockTable>
            <br/><apex:commandLink value="Add Row" action="{!addRow}" reRender="membAdd"/>      
        </apex:pageblockSection>      
        <apex:pageblockSection columns="1" >
            <apex:pageblockSectionItem >
                <apex:commandButton value="Save" />
                <apex:commandButton value="Cancel" />
            </apex:pageblockSectionItem>       
        </apex:pageblockSection>
    </apex:pageBlock>
</apex:form>
</apex:page>



how to get a picklist values in apex controller?

Apex:
public class PicklistController{

    public Lead lead{get;set;}
    public List<SelectOption> statusOptions {get;set;}
   
    // Constructor called when page is accessed.
    public PicklistController() {   
        lead = new Lead();       
        statusOptions = new List<SelectOption>();

        // Use DescribeFieldResult object to retrieve status field.
        Schema.DescribeFieldResult statusFieldDescription =  Lead. Status.getDescribe();
        // For each picklist value, create a new select option
        for (Schema.Picklistentry  picklistEntry: statusFieldDescription.getPicklistValues())
{
            statusOptions.add(new SelectOption( pickListEntry.getValue(),pickListEntry.getLabel()));
            // obtain and assign default value
         
        }    
    }
}

VF Page:
<apex:page controller="PicklistController">
    Please selectValue:
    <apex:form >
        <apex:selectList size="1" value="{!led.Status}">
            <apex:selectOptions value="{!statusOptions}"/>
        </apex:selectList>
    </apex:form>  
</apex:page>

Screen Shot: