You would think this would be more obvious, but "how can I call a method from a visualforce page?"
Say I have something like this:
<apex:page controller="PreChatController ">
<script>
<apex:repeat value="{!ContactFromEmail}">
</apex:repeat>
</script>
</apex:page>
And here is ContactFromEmail in a controller:
public String ContactFromEmail()
{
Contact con = [SELECT id, Email, Name, Title FROM Contact where Email = '[email protected]' limit 1];
contactID = con.id;
return con.Name + ' ' + con.Email + ' ' + 'Title: ' + con.Title;
}
You would think this would be easy, but it doesn't seem to be. I don't want the string to be a property I have to set. I just want to invoke a method call. What am I doing wrong? :(