【发布时间】:2018-02-28 21:55:44
【问题描述】:
我正在为此绞尽脑汁。它是一个简单的更改功能,应该触发,但是当我在我的组织中进行测试时,尽管在我的课堂上得到了其余的东西,但我从来没有在“这里”得到调试。我查看了几十个不同的谷歌结果,代码是相同的。有谁知道 SF 是不是刚刚坏掉了?
public class testController {
public static String testNewString {get;set;}
public testController(){}
public static Boolean isAccountAvailable()
{
System.debug('here');
List<Account> tempList = ([SELECT Id
FROM Account
WHERE Name = :testNewString]);
if(tempList.size() != 0)
{
return true;
}
else
{
return false;
}
}
}
<apex:page controller="testController" docType="html-5.0">
<apex:form id="form1">
<apex:inputText value="{!testNewString }" html-placeholder="New Sales Order #">
<apex:actionSupport event="onChange" action="{!isAccountAvailable}" rerender="form1" />
</apex:inputText>
</apex:form>
</apex:page>
【问题讨论】:
标签: salesforce apex-code visualforce