3

Is it possible to create a custom Visualforce component that accepts an SObject field as an attribute? Basically, I want to replicate what's done with something like ...

<apex:inputText value="{!record.Name}"/>

... so that I can have a custom component that can be used as ...

<c:inputSpecialText value="{!record.Name}"/>

In this case, how should I define the attribute in my custom component?

1

I'm using a component that takes three attributes

<c:FranchisorInvoiceFooter DDebit="{!directdebit}" Invoice="{!inv}" BillingCountry="{!client.BillingCountry}"/>

where client.BillingCountry is a sObject Field

The attribute definition for this is

<apex:attribute name="BillingCountry" description="billing Country" assignTo="{!country}" type="String" required="false"/>

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.