From 3962c2bb0435484b60a3e408e4738d792e249a53 Mon Sep 17 00:00:00 2001 From: buli <137736985@qq.com> Date: 星期一, 05 六月 2023 11:09:55 +0800 Subject: [PATCH] LEX CommunityNewCmp --- force-app/main/default/classes/LookupSearchResult.cls | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/force-app/main/default/classes/LookupSearchResult.cls b/force-app/main/default/classes/LookupSearchResult.cls index b8252ef..3fb0548 100644 --- a/force-app/main/default/classes/LookupSearchResult.cls +++ b/force-app/main/default/classes/LookupSearchResult.cls @@ -2,16 +2,24 @@ * Class used to serialize a single Lookup search result item * The Lookup controller returns a List<LookupSearchResult> when sending search result back to Lightning */ -public class LookupSearchResult implements Comparable { - private Id id; - private String sObjectType; - private String icon; - private String title; - private String subtitle; +public virtual class LookupSearchResult implements Comparable { + protected String id; + protected String sObjectType; + protected String icon; + protected String title; + protected String subtitle; - + protected LookupSearchResult() { + } - public LookupSearchResult(Id id, String sObjectType, String icon, String title, String subtitle) { + /** + * @param id the lookup entry identifier (generally a record ID) + * @param sObjectType Optional - The sObject type of the selected record. This value is not used for lookup rendering. It's passed back to the selection handler in case you search on multiple object types. + * @param icon Optional - A qualified SLDS icon name taken from https://www.lightningdesignsystem.com/icons. It defaults to standard:default. + * @param title Required - The label of the lookup entry + * @param subtitle Optional - A subtitle that is displayed under the lookup entry label + */ + public LookupSearchResult(String id, String sObjectType, String icon, String title, String subtitle) { this.id = id; this.sObjectType = sObjectType; this.icon = icon; @@ -20,7 +28,7 @@ } @AuraEnabled - public Id getId() { + public String getId() { return id; } -- Gitblit v1.9.1