• Umang Singhal
  • 4 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 7
I have a use case where in i need to develop a reusable lightning component but with dynamic fields to display
For eg: the lookup component should display A,B,C fields in one part and
X,Y,Z fields on another part in the same application
how can i achieve this using one component only?

Any help would be appreciated
Hello Everyone,

I'm trying to use force:navigateToComponent, but its not working. Here is my code:
    NavigatetoComp : function(component, event, helper) {
        console.log('Enter Here');
        var evt = $A.get("e.force:navigateToComponent");
            componentDef: "c:MyComponent2",
            //componentAttributes :{ }

It throws following error:
User-added image

Can any body tell why is it so?

Thanks In Advance
Aakanksha Singh
Hello everyone,
I need to know how can I perform mass delete operation with the use of checkboxes.
Here is my component.
<aura:component implements="force:appHostable" controller="AccountListController">
<aura:attribute name="accounts" type="Account[]"/>
<aura:handler name="init" value="{!this}" action="{!c.getAccount}" />
<ui:button class="slds-button slds-button--destructive" press="{!c.delete}">Delete</ui:button><!--Mass Delete operation-->
<table class="slds-table slds-table--bordered slds-max-medium-table--stacked-horizontal">
                <tr class="slds-text-heading--label ">
                    <th class="slds-is-sortable" scope="col">
                        <ui:inputCheckbox label="" class="check" aura:id="master" click="{!c.checkAll}"/>
                    <th class="" scope="col">Account Name</th>
                <aura:iteration items="{!v.accounts}" var="account">
                    <tr class="slds-hint-parent">
                        <td class="" data-label="Action" style="padding-left:0;">
                            <ui:inputCheckbox label="" class="check" text="{!account.Id}" aura:id="dependent"/>
                        <td class="" data-label="Account Name" style="padding-left:0;">
                            <a href="{! '#/sObject/' + account.Id + '/view'}">{!account.Name}</a>
This is the client side controller:
getAccount : function(component,event,helper) {
        var action=component.get("c.getAccountList");
        action.setCallback(this, function(a) {
            component.set("v.accounts", a.getReturnValue());
        var master= component.find("master");
        var dep= component.find("dependent");
        var val= master.get("v.value");
            for(var i=0;i<dep.length;i++){
           for(var i=0;i<dep.length;i++){
This is the sever side controller:
public with sharing class AccountListController {
    public static List<Account> getAccountList() {
        return [SELECT Id,Name,Accountnumber FROM Account order by CreatedDate desc];
Kindly help.
Hi everyone,

Can anyone help me in how can I apply pagination To lightning component that is in Aura:iteration records list.

Thanks in advance.
Can anyone please help me to implement pagination using lightning component?
I'm using SLDS in a Lightning component, and I'm sure I've read somewhere that the page header can be made to stay fixed whilst the rest of the screen is vertically scrolled.

My page header looks like this:
<div class="slds-page-header">
    <p class="slds-text-heading--label">Contacts</p>
    <h1>My Contacts</h1>

Is there a class that I'm missing?
  • September 10, 2015
  • Like
  • 0
I am currently stuck on an issue I am having getting the value of the ui:inputCheckbox Lightning component. In the Lightning Component Developer Guide, the following example is provided:

    <aura:attribute name="myBool" type="Boolean" default="true"/>
    <ui:inputCheckbox aura:id="checkbox" label="Select?" change="{!c.onCheck}"/>
    <p><ui:outputText class="result" aura:id="checkResult" value="false"/></p>
    <p>The following checkbox uses a component attribute to bind its value.</p>
    <ui:outputCheckbox aura:id="output" value="{!v.myBool}"/>

        onCheck: function (cmp, event, helper) {
            var checkCmp = cmp.find("checkbox");
            resultCmp = cmp.find("checkResult");
            resultCmp.set("v.value", "" + **checkCmp.get("v.value")**);

I am currently using the exact pattern in my markup as follows:

<div class="pbxs">
         <div class="tc wht pas mhauto"></div>
         <ui:inputCheckbox aura:id="taskCheckBox" text="{!nextsteps.task.Id}"  class="sq-25 checkbox checkbox--default checkbox--states-1 brm mrs bg-secondary-btn sq-22 a-mid dib" change="{!c.handleCheckTask}"/>                                        
handleCheckTask : function(cmp, event, helper) {
            var checkCmp = cmp.find("taskCheckBox");
            console.log("value : " + **checkCmp.get("v.value")**)

Strangely, when I click the checkbox in my component, I get the following aura error:
"Uncaught error in markup://ui:change : checkCmp.get is not a function"

I am not sure why I am getting that error when I am using the same pattern as in the example. I tried re-creating the example from the guide. When I did that, I did not get the error. Can anyone see what I might be missing?