• im_dan
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Any updates on when one is planned for Summer '11?

 

The community wiki page is pretty explicit about skipping Spring '11, but doesn't address anything beyond that.

1) I am trying again to get selected rows (with getSelected() on the controller) from an Enhanced list view in a VF page. Am I doing something wrong or is it just not possible to pass the EnhancedList records to a custom controller? It seems that the Enhanced list recordset should be bound to the controller records but I cannot figure out where this should happen.

 

2) BTW, I also try to change the FilterID in the EnhancedList but it does not refresh properly. Is this a known issue?

 

Here is the code. Any help would be great.

<apex:page standardController="Contact" extensions="pgContactHomeController" showHeader="true" tabStyle="Contact" recordSetVar="myContacts">

	<apex:form >
        <apex:selectList value="{!FilterID}" size="1">
            <apex:actionSupport event="onchange" rerender="listPanel"/>
            <apex:selectOptions value="{!listviewoptions}"/>
        </apex:selectList>
    </apex:form>
    
	<apex:outputPanel layout="block" id="listPanel">
		<apex:enhancedList height="300" ListId="{!FilterID}" rowsPerPage="10" id="ContactList" customizable="True"  reRender="debugPanel"/>
	</apex:outputPanel>    

	<apex:outputPanel layout="block" id="debugPanel">
    	<apex:pageblock id="myBlock">
	  		<apex:outputText value="Records={!recordCount}" /> <br/>
			<apex:outputText value="Selected={!selectedCount}" /> <br/>
			<apex:outputText value="FilterID={!FilterID}" /> <br/>
		</apex:pageblock>
	</apex:outputPanel>
	
</apex:page>
public with sharing class pgContactHomeController {
    private ApexPages.StandardSetController myController;
    public pgContactHomeController(ApexPages.StandardSetController stdController) {
     this.myController = stdController;
    }
public Integer getRecordCount(){
return ((List<Contact>)myController.getRecords()).size();
}
public Integer getSelectedCount(){
return ((List<Contact>)myController.getSelected()).size();
}
public Id getFilterID(){
return (myController.getFilterID());
}
public void setFilterID(ID newID){
myController.setFilterID(newID);
return;
}
}

 

 

 

  • March 04, 2011
  • Like
  • 0

I have exactly the same issue as in MD Chen post on ideas. How do you get selected records from a enhancedList? Here is the code:

 

Page

 

<apex:page standardController="ProfileHierarchy__c" recordSetvar="profiles" extensions="testController">
  <apex:enhancedlist type="ProfileHierarchy__c" height="200" rerender="c1,c2" />
  <apex:outputText id="c1" value="c1={!c1}" /> <br>
  <apex:outputText id="c2" value="c2={!c2}" /> <br>
</apex:page>

 Controller

 

public class testController {

  public testController (ApexPages.StandardSetController controller){
    li=controller;
  }

  public ApexPages.StandardSetController li{get;set;}

  public Integer getC1(){
    return ((List<ProfileHierarchy__c>)li.getRecords()).size();
  }

  public Integer getC2(){
    return ((List<ProfileHierarchy__c>)li.getSelected()).size();
  }
}

Thank you.

 

 

 

  • March 01, 2011
  • Like
  • 0

I hope it is ok to post this here, because it has to do with a managed package.

 

In the dev org of our managed app I create a custom formula field on one of our custom objects.

 

When I reference a custom label in the formula,  I always get a blank field. I used the 'Insert field' dialog to add this:

 

$Label.myNamspace__myCustomLabel

 

There is no error upon saving so I think the custom label is recognized as valid but when I add the field to the listview, it is empty.

 

I tried the protected/unprotected checkbox for the label but with no effect.

 

Is this supported or is it a bug ?

 

Is the custom label added to the package when I uploaded it (as for VF pages), because I cannot add it manually.

 

Thanks.