function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chandrashekar Jangitichandrashekar Jangiti 

Hi all please help me here ,Hoe what is the serverside controller code for below lightning component and controller..

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global"> <aura:attribute name="FlagA" type="boolean" default="false"/> <aura:attribute name="FlagB" type="boolean" default="false"/> <aura:attribute name="oAccount" type="Account"/> <aura:if isTrue="{!v.FlagA}"> <p>Name:</p><ui:inputtext value="{!v.oAccount.Name}"/> <p>Name</p><ui:inputtext value="{!v.oAccount.Name}"/> <ui:inputtext value="{!v.oAccount.Name}"/> <ui:inputtext value="{!v.oAccount.Name}"/> </aura:if> <aura:if isTrue="{!v.FlagB}"> <ui:inputtext value="{!v.oAccount.Name}"/> <ui:inputtext value="{!v.oAccount.Name}"/> <ui:inputtext value="{!v.oAccount.Name}"/> <ui:inputtext value="{!v.oAccount.Name}"/> </aura:if> <lightning:button label="ButtonA" onclick="{!c.toggleFieldOfA}" /> <lightning:button label="ButtonB" onclick="{!c.toggleFieldOfB}" /> </aura:component>


controller:

({ toggleFieldOfA: function(Component, event, helper){ Component.set("v.FlagA",true); Component.set("v.FlagB",false); }, toggleFieldOfB: function(Component, event, helper){ Component.set("v.FlagA",false); Component.set("v.FlagB",true); } })