• SOUBHAGYA RANJAN DALAI
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 5
    Replies
i want to save record in zip file in local sysytem when we click a button in vf page . how to do that ?
 
i am having 4 attachment on a particulat contact (suppose contactA) in contact object .
i want to show all the attachment on that contact record in vf page .
how to do that ?
Hi ALL
i want to show 10 attachment under each contact record and when we check the particular contact record and click the button(process selected) then it will be downloaded in local system . i am giving my code of contact record . please help me ou to do this

VF PAGE

<apex:page controller="wrapperClassController">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton value="Process Selected" action="{!processSelected}" rerender="table"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!contacts}" var="c" id="table">
                <apex:column >
                    <apex:inputCheckbox value="{!c.selected}"/>
                </apex:column>
                <apex:column value="{!c.con.Name}" />
                <apex:column value="{!c.con.Email}" />
                <apex:column value="{!c.con.Phone}" />
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>


CONTROLLER


public class wrapperClassController {

     
    public List<cContact> contactList {get; set;}

    
    public List<cContact> getContacts() {
        if(contactList == null) {
            contactList = new List<cContact>();
            for(Contact c: [select Id, Name, Email, Phone from Contact limit 10]) {
                
                contactList.add(new cContact(c));
            }
        }
        return contactList;
    }

    public PageReference processSelected() {

        List<Contact> selectedContacts = new List<Contact>();

        
        for(cContact cCon: getContacts()) {
            if(cCon.selected == true) {
                selectedContacts.add(cCon.con);
            }
        }

        System.debug('These are the selected Contacts...');
        for(Contact con: selectedContacts) {
            system.debug(con);
        }
        contactList=null; 
        return null;
    }


    
    public class cContact {
        public Contact con {get; set;}
        public Boolean selected {get; set;}
        public cContact(Contact c) {
            con = c;
            selected = false;
        }

    }
}
hi
my requirement is i want to pull data from contact object and show it in vf page with more than one attachment under each record .

 
i want to retrive record from contact object and showing that in vf page with checkboxes left to every record .
and after checking some checkboxes when i click submit button then it will show only cheked record and other will reomve .
how to do this functionality ?
 
i want to retrive all the objects in my vf page as dropdownlist . and after selecting one object i want to diplsy all the mandetory field of that object with its datatype . 
i am having 4 attachment on a particulat contact (suppose contactA) in contact object .
i want to show all the attachment on that contact record in vf page .
how to do that ?
Hi ALL
i want to show 10 attachment under each contact record and when we check the particular contact record and click the button(process selected) then it will be downloaded in local system . i am giving my code of contact record . please help me ou to do this

VF PAGE

<apex:page controller="wrapperClassController">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton value="Process Selected" action="{!processSelected}" rerender="table"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!contacts}" var="c" id="table">
                <apex:column >
                    <apex:inputCheckbox value="{!c.selected}"/>
                </apex:column>
                <apex:column value="{!c.con.Name}" />
                <apex:column value="{!c.con.Email}" />
                <apex:column value="{!c.con.Phone}" />
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>


CONTROLLER


public class wrapperClassController {

     
    public List<cContact> contactList {get; set;}

    
    public List<cContact> getContacts() {
        if(contactList == null) {
            contactList = new List<cContact>();
            for(Contact c: [select Id, Name, Email, Phone from Contact limit 10]) {
                
                contactList.add(new cContact(c));
            }
        }
        return contactList;
    }

    public PageReference processSelected() {

        List<Contact> selectedContacts = new List<Contact>();

        
        for(cContact cCon: getContacts()) {
            if(cCon.selected == true) {
                selectedContacts.add(cCon.con);
            }
        }

        System.debug('These are the selected Contacts...');
        for(Contact con: selectedContacts) {
            system.debug(con);
        }
        contactList=null; 
        return null;
    }


    
    public class cContact {
        public Contact con {get; set;}
        public Boolean selected {get; set;}
        public cContact(Contact c) {
            con = c;
            selected = false;
        }

    }
}
hi
my requirement is i want to pull data from contact object and show it in vf page with more than one attachment under each record .

 
i want to retrive record from contact object and showing that in vf page with checkboxes left to every record .
and after checking some checkboxes when i click submit button then it will show only cheked record and other will reomve .
how to do this functionality ?
 
i want to retrive all the objects in my vf page as dropdownlist . and after selecting one object i want to diplsy all the mandetory field of that object with its datatype .