function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
How to create interface in salesforce?
Vfpage:
<apex:page controller="Sample">
<apex:pageBlock>
Value from Controller is : {!discount}
<apex:form>
Textbox Value from controller is: <apex:inputText value="{!discount}"/>
</apex:form>
</apex:pageBlock>
</apex:page>
Interface:
public interface PurchaseOrder {
Double getDiscount();
}
ApexClass:
public class Sample implements PurchaseOrder {
Double discount;
public void setDiscount(Double disc) {
discount = disc;
}
public Double getDiscount() {
return 1.22;
}
Thanks,
Arunraj
Hi,
Interface
Double discount();
Class
public class Sample implements PurchaseOrder {public Double discount(){
R. Arunraj
Where to create a interface in salesforce?
AppSetup --> Develop --> Apex classes --> click new button --> copy and paste the interface code and save it.
How to get the return value in VS page??
Apex class
public class SampleController {
public String getVFName() {
return 'Arun';
<apex:page controller="SampleController ">
Name is : {!vfName}
</apex:page>
i call discount value in textbox in pages.
i'm getting the error
Class must implement the public interface method: Double discount()
if i add get to the discount.
Thank u
Vfpage:
<apex:page controller="Sample">
<apex:pageBlock>
Value from Controller is : {!discount}
<apex:form>
Textbox Value from controller is: <apex:inputText value="{!discount}"/>
</apex:form>
</apex:pageBlock>
</apex:page>
Interface:
public interface PurchaseOrder {
Double getDiscount();
}
ApexClass:
public class Sample implements PurchaseOrder {
Double discount;
public void setDiscount(Double disc) {
discount = disc;
}
public Double getDiscount() {
return 1.22;
}
}
Thanks,
Arunraj
All Answers
Hi,
Interface
public interface PurchaseOrder {
Double discount();
}
Class
public class Sample implements PurchaseOrder {
public Double discount(){
return 1.22;
}
}
Thanks,
R. Arunraj
Where to create a interface in salesforce?
AppSetup --> Develop --> Apex classes --> click new button --> copy and paste the interface code and save it.
Thanks,
Arunraj
How to get the return value in VS page??
Apex class
public class SampleController {
public String getVFName() {
return 'Arun';
}
}
Vfpage:
<apex:page controller="SampleController ">
Name is : {!vfName}
</apex:page>
Thanks,
Arunraj
i call discount value in textbox in pages.
i'm getting the error
Class must implement the public interface method: Double discount()
if i add get to the discount.
Vfpage:
<apex:page controller="Sample">
<apex:pageBlock>
Value from Controller is : {!discount}
<apex:form>
Textbox Value from controller is: <apex:inputText value="{!discount}"/>
</apex:form>
</apex:pageBlock>
</apex:page>
Interface:
public interface PurchaseOrder {
Double getDiscount();
}
ApexClass:
public class Sample implements PurchaseOrder {
Double discount;
public void setDiscount(Double disc) {
discount = disc;
}
public Double getDiscount() {
return 1.22;
}
}
Thanks,
Arunraj
Thank u