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
madhu l 1madhu l 1 

hi williams am expecting apex class for below page



<apex:page controller="CountryClub" showheader="false" sidebar="false"> <apex:form> <apex:pageblock> <apex:pageBlockButtons> <apex:commandButton action="{!Browse}" value="Open"/> <apex:commandButton action="{!Upload}" value="save"/> </apex:pageBlockButtons> <apex:pageblocksection> <apex:image url="{!imageURL}"/> </apex:pageblocksection> </apex:pageblock> </apex:form> </apex:page>
 
William TranWilliam Tran
Madhu,

this is a custom controller, here's the shell, you need to fill in the rest as far as functionality, that is the logic behind what the buttons do.

Thx
public class CountryClub {

    public String imageURL { get; set; }

    public PageReference Upload() {

	//Add more logic here
        return null;
    }


    public PageReference Browse() {

	//Add more logic here
        return null;
    }

}

 
madhu l 1madhu l 1
thanks mr williams
Amit Chaudhary 8Amit Chaudhary 8
Hi Madhu,

If you want to upload the image the image then data type should not be String. It should be document. Please check below post for more detail. I hope that will help u
http://developer.force.com/cookbook/recipe/uploading-a-document-using-visualforce-and-a-custom-controller

Thanks
Amit Chaudhary