After selecting an option, this. currentValue will hold a wrong value, i.e. '2022' instead of 2022.
convert to number:
}
Default checkbox of lightning-datatable is multiple checkbox.
Set atrribute [max-row-selection="1"] can change to radio checkbox.
CMP:
<aura:component implements="force:lightningQuickActionWithoutHeader,force:hasRecordId" controller="InvoiceIssueController" access="global">
<aura:html tag="style">
.slds-modal__container{
height : auto; width: 80%; max-width: 70vh;
}
.modal-body{
height : 15vh !important;
max-height: 15vh !important;
}
.slds-modal__footer{
display: inline !important;
}
</aura:html>
<aura:handler name="init" value="{!this}" action="{!c.callServer}"/>
<aura:handler event="force:refreshView" action="{!c.isRefreshed}" />
<aura:attribute name="showErrors" type="String"/>
<aura:attribute name="errorMessage" type="String"/>
<aura:attribute name="message" type="String"/>
{!v.message}
<aura:if isTrue="{!v.showErrors}">
<div class="slds-notify slds-notify_toast slds-theme_error">
<span class="slds-assistive-text">error</span>
<div class="slds-notify__content">
<p class="slds-align_absolute-center">{!v.errorMessage}</p>
</div>
</div>
</aura:if>
</aura:component>
JS:
({
callServer : function(component,event, helper) {
var myAttribute = component.get("v.recordId");
var action = component.get("c.ApexMethod1");
action.setParams({ "id" : myAttribute });
var action2 = component.get("c.ApexMethod2");
action2.setParams({ "id" : myAttribute });
action2.setCallback(this, function(response) {
console.log(response.getState());
if (response.getState() === "SUCCESS") {
$A.get('e.force:refreshView').fire();
}else {
console.log("Error Saving Contact ");
}
});
action.setCallback(this, function(response) {
if (response.getState() === "SUCCESS") {
if (response.getReturnValue() == 1) {
component.set("v.showErrors",true);
component.set("v.errorMessage","error!");
} else {
component.set("v.message","process...");
$A.enqueueAction(action2);
}
}else {
component.set("v.showErrors",true);
component.set("v.errorMessage","error");
}
});
$A.enqueueAction(action);
},
isRefreshed: function(component, event, helper) {
location.reload();
}
})
Apex:
Add @AuraEnabled to target ApexMethod
エクスペリエンスビルダー>コンポーネント>コンテンツ>タイルメニュー
画面にDrag&Dropする
「タイルメニューを編集」リンクをクリックする
メニュー項目を作成、削除、編集ができる。タイルメニュー項目に画像も追加できる。
メニュー項目を選択し、「省略可能」を開く、画像をアップロードで完了
※タイルメニューの画像がゲストコミュニティユーザに表示されるようにするには、[ワークスペース] | [管理] で [ゲストユーザは公開ページとログインページでアセットファイルを表示できる] を有効にします。次に、ドキュメントへの参照アクセス権を付与します。
順番の調整はタイルメニューの並び順より変わる
画面テンプレートがサイドバーなしの場合は4個ずつで表示する、サイドバーありの場合は2個ずつで表示する
画像ありの場合、三つパータンがある。一部:文字バナーが表示される、画像を真ん中に小さく表示される;フル、オーバーレイなし:文字バナーが表示される、画像は拡大する;フル、オーバーレイあり:文字は真ん中に表示する、画像は拡大する
文字バナーの高さは15~100までとなる。これ以上変更したい場合はCSSで調整する
文字バナーの文字と背景色、タイルメニューの境界線の半径は変更できる
サイトの「ゲストユーザーのLightning権限」と別に、エクスペリエンス(旧コミュニティ)の「ゲストユーザーのLightning権限」設定です。
入り口はサイトではなく、ドメインです。
ドメイン> コミュニティの Force.com サブドメインのドメイン名をクリック>サイトの表示ラベルをクリック>設定画面
※この設定画面の「公開アクセス設定」ボタンからコミュニティWEBユーザのプロファイルをアクセスできる
@api recordId;
recordList;
@wire(getDataMethod, {recordId : '$recordId'}
async recordList(value) {
this.recordList = value;
const {data, error} = value;
if (data) {}
else if (error) {}
}
handleClick(event) {
refreshApex(this.recordList);
}
<lightning:card aura:id="map" title="Current Boat Location">
<div style="{!'width: ' + v.width + '; height: ' + v.height}">
Please make a selection
</div>
</lightning:card>
var mapElement = component.find("map").getElement();
<lightning:card title="Current Boat Location">
<div aura:id="map" style="{!'width: ' + v.width + '; height: ' + v.height}">
Please make a selection
</div>
</lightning:card>