function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PRepakaPRepaka 

Select List component

hi

 

I have 3 Select list controls.

 

I am using first select list control to display all the SP's. when i select multiple SPs in that Select List control, i have to display the item of that selected SPs in another Select List component. when i select Item in that Second Select List Component i have to display the locations of selected item in another select list component. how can i do this? please help me.

aalbertaalbert

Check out the Force.com for Amazon Web Services toolkit - the AWS_S3_Examples page and AWS_S3_ExampleController have some examples of how to do this.

 

I called an actionFunction method from the selectList.onclick() event. I passed it the selected valued which was passed back to the controller to set the right property value and I also used the reRender attribute on the actionFunction to refresh the 2nd component, which in my case, was a dataTable (shown below).

 

This is a snippet from the AWS_S3_Examples page in the toolkit.

 

 

<apex:pageBlockSection columns="1" title="List all Objects in selected Bucket"> <apex:actionFunction status="statusForListBucket" action="{!listBucket}" name="listBucket" rerender="listBucketResults"> <apex:param name="firstParam" assignTo="{!bucketToList}" value="" /> <apex:param name="secondParam" assignTo="{!renderListBucketResults}" value="true" /> </apex:actionFunction> <apex:actionFunction action="{!deleteObject}" name="deleteObject" > <apex:param name="keyToDelete" assignTo="{!objectToDelete}" value="" /> </apex:actionFunction> <apex:pageBlockSectionItem > <apex:outputPanel > <apex:outputText value="Select the Bucket to list all Objects for:" /> <apex:selectList onclick="listBucket(this.value)" value="{!bucketToList}" multiselect="false"> <apex:selectOptions value="{!BucketNames}"/> </apex:selectList><br/> </apex:outputPanel> </apex:pageBlockSectionItem> <apex:outputPanel id="listBucketResults"> <apex:actionstatus id="statusForListBucket"> <apex:facet name="start"> <span style="font-weight:bold; color: red; background-color:white;"> &nbsp;&nbsp;&nbsp;Contacting S3 to generate list of Objects..results below will be populated upon response....&nbsp;&nbsp;&nbsp; </span> </apex:facet> <apex:facet name="stop"> <apex:outputPanel rendered="{!(!ISNULL(listBucketErrorMsg))}"> <span style="font-weight:bold; color: red; background-color:white;"> &nbsp;&nbsp;&nbsp;ERROR: {!listBucketErrorMsg} </span> </apex:outputPanel> </apex:facet> </apex:actionstatus> <br/> <apex:outputPanel rendered="{!IF(ISNULL(bucketToList) ,false,true)}"> (<a href='http://docs.amazonwebservices.com/AmazonS3/latest/'>From Amazon S3 Documentation</a>)<br/> NOTE: The hyperlink below to open up the file hosted in S3 will only work if the bucket name and the object name comply with Amazon Web Services constraints: <br/> To comply with Amazon S3 requirements, bucket names must: <br/> <br/> * Contain lowercase letters, numbers, periods (.), underscores (_), and dashes (-) <br/> * Start with a number or letter<br/> * Be between 3 and 255 characters long<br/> * Not be in an IP address style (e.g., "192.168.5.4")<br/> <br/> To conform with DNS requirements, we recommend following these additional guidelines when creating buckets:<br/> * Bucket names should not contain underscores (_)<br/> * Bucket names should be between 3 and 63 characters long<br/> * Bucket names should not end with a dash<br/> * Bucket names cannot contain dashes next to periods (e.g., "my-.bucket.com" and "my.-bucket" are invalid)<br/> <apex:dataTable cellpadding="2" value="{!bucketList}" var="obj"> <apex:facet name="caption"> <apex:outputText value="List of Objects stored in the Bucket: {!bucketToList}" style="font-weight:bold; color:red;" /> </apex:facet> <apex:column width="75"> <apex:facet name="header">Action</apex:facet> <apex:commandLink status="statusForDeleteKey" action="{!deleteObject}" value="Delete" > <apex:param name="keyToDelete" value="{!obj.Key}"/> </apex:commandLink> </apex:column> <apex:column width="300" > <apex:facet name="header">Key</apex:facet> <apex:commandLink value="{!obj.Key}" action="{!redirectToS3Key}" target="_blank"> <apex:param name="filename" value="{!obj.Key}"/> </apex:commandLink> </apex:column> <apex:column width="300" > <apex:facet name="header">Last Modified</apex:facet> <apex:outputText value="{!obj.LastModified}"/> </apex:column> <apex:column width="30"> <apex:facet name="header">Size (bytes)</apex:facet> <apex:outputText value="{!obj.Size}"/> </apex:column> </apex:dataTable>

 

 

 

SriramAravindSriramAravind

In this example again you have explained for the single selection only right.? How to perform for the multi selction in select list component.