• Mili
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I have a pageblocktable whose columns I want to make resizabel as in standard listview.Also I wat to avoid the lengthy colum values displayig in 2 lines.Is there a way to do it?
  • April 15, 2009
  • Like
  • 0

i have the following requirement:

 

I added a custom List button in my standard object list view.

On click of this button control is navigated to a VF page(say processRecordspage) where the selected records are processed.

 

In another Visualforce page(say displayListviewPage) , I have added the list view using the <apex:enhancedlist> tag which again displays with the custom List button.

 

Now the requirement is if the custom List button is clicked from this visualforce page then the processing is a bit different.

Is there any way of passing an id value which is in context of  displayListviewPage to processRecordspage?

 

Please help me if there is nay solution or let me know this is not at all possible :(

 

if this is not possible is there a way to get the selected records in the <apex:enhancedlist>  in the controller of displayListviewPage?This way I can add a new button in the displayListviewPage which can do the processing of selected records

Message Edited by Mili on 04-01-2009 11:10 AM
  • April 01, 2009
  • Like
  • 0
I have created a MailList custom object similar to Campaign object and a MailList History junction object. Now i need to create a wizard to mass add contacts into my MailList History junction object. I already created the first page of my wizard to select the MailList Name and Status and in the second page select a few contacts displayed using the enhancedlist ie "<apex:enhancedList type="Contact" customizable="true" height="300" rowsPerPage="10" id="AccountList"></apex:enhancedList>". Now my question is how add the selected contacts into my junction object MailList History, Plz provide a code sample i have pasted my code sample below Plz help me ....

visualforce page1:-



visualforce page1 code:-

<apex:page standardController="Contact" extensions="customController5">
<apex:sectionHeader title="Select MailList"
subtitle="Step 1 of 2"/>
<apex:form >
<apex:pageBlock title="MailList Information">
<apex:pageBlockSection >
<apex:panelGrid columns="2">
<apex:outputLabel value="MailListName" for="maillistname">
</apex:outputLabel>
<apex:inputField id="maillistname" value="{!mailhistory.MailList_Name__c}" required="true">
</apex:inputField>
<apex:outputLabel value="Status" for="status">
</apex:outputLabel>
<apex:inputField id="status" value="{!mailhistory.Status__c}" required="true">
</apex:inputField>
</apex:panelGrid>
</apex:pageBlockSection>
<apex:pageBlockButtons location="both">
<apex:commandButton value="Next" action="{!step2}">
</apex:commandButton>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>

visualforce page2:-



visualforce page2 code:-

<apex:page standardController="Contact" extensions="customController5">
<apex:enhancedList type="Contact" customizable="true" height="300" rowsPerPage="10" id="AccountList">
</apex:enhancedList>
<apex:pageBlock >
<apex:form >
<apex:commandButton value="Add to MailList">
</apex:commandButton>
</apex:form>
</apex:pageBlock>
</apex:page>

Controller code:-

public class customController5
{
    private final Contact cont;
   
    public string contTypeID {get; set;}
   
    public customController5(ApexPages.StandardController
           contController)
           {
               this.cont = (Contact)contController.getRecord();
           }
    Contact contact;
    MailList__c maillist;
    MailList_History__c mailhistory;
     
   public Contact getContact()
   {
    if(contact == null)
    contact = new Contact();
    return contact;
   }
  
    public MailList__c getMaillist()
   {
    if(maillist == null)
    maillist = new MailList__c();
    return maillist;
   }
  
   public MailList_History__c getMailhistory()
   {
       if(mailhistory == null)
       mailhistory = new MailList_History__c();
       return mailhistory;
   }
  
   
            
    public PageReference step1()
   {
       return Page.Wizard1;
   }
  
   public PageReference step2()
   {
       return Page.Example;
   }
  
  public PageReference save()
  {
     
     // code to add  selected contacts to maillist history junction object should come here
      return Page.Example;
  }
}













Message Edited by RAAM on 12-16-2008 09:57 PM
  • December 16, 2008
  • Like
  • 0