• Derrick Koon 7
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
We created a component with .cmp file with a section below:

    <div aura:id="ElementHere"></div>

Then in the Helper JS class, we want to create ui:inputText control dynamically and place them at the div with aura:id="ElementHere":

    createInputText : function(cmp, textLabel) {
        var componentConfig = {
                "componentDef": "markup://ui:inputText",
                "attributes": {
                    "values": { label:textLabel, size:10, default:"enter text" }
                }
            };
        
           $A.componentService.newComponentAsync(
               this,
               function(newInputText){
                   var divElementHereComponent = cmp.find("ElementHere");
                   var divElementHereBody = divElementHereComponent.get("v.body");
                   divElementHereBody.push(newInputText);
                   divElementHereComponent.set("v.body", divElementHereBody);
               },
               componentConfig
        );
    },

When we ran the app, we got a pop-up that complained that divElementHereComponent does not have get method.

Does anyone know if this is a bug, or we have missed some steps?

Thanks,

Derrick
Hi, I have setup my org dkoon_lightning@vlocity.com to try out building lightning components.  They all worked and tested correctly on browser.

But when I tried to add them to Salesforce1, they did show up in Salesforce1, but when I clicked on them, a spinner appeared and after spinning for over 1 minutes, a blank screen remained.

I have read through the Lightning Developer Guide and read similar problems in this blog.  I believe I have followed the correct procedure, which is as follows:

In the component I wish to add, I included implements="force:appHostable" in my aura:component tag and saved my changes.  The appHostable interface makes the component available on the navigation menu in Salesforce1.

I included my components in the Salesforce1 navigation menu by following these steps.

Create a custom tab for this component.
From Setup, click Create | Tabs.
Click New in the Lightning Component Tabs related list.
Select the Lightning component to display in the custom tab.
Enter a label to display on the tab.
Select the tab style and click Next.
When prompted to add the tab to profiles, accept the default and click Save.

I also included my Lightning component in the Salesforce1 navigation menu.
From Setup, click Mobile Administration | Mobile Navigation.
Select the custom tab you just created and click Add.
Sort items by selecting them and clicking Up or Down.
In the navigation menu, items appear in the order you specified. The first item in the Selected list becomes your users’ Salesforce1 landing page.

I checked my output by going to the Salesforce1 mobile browser app. My new menu item did appear in the navigation menu.

What am I missing???
 
We created a component with .cmp file with a section below:

    <div aura:id="ElementHere"></div>

Then in the Helper JS class, we want to create ui:inputText control dynamically and place them at the div with aura:id="ElementHere":

    createInputText : function(cmp, textLabel) {
        var componentConfig = {
                "componentDef": "markup://ui:inputText",
                "attributes": {
                    "values": { label:textLabel, size:10, default:"enter text" }
                }
            };
        
           $A.componentService.newComponentAsync(
               this,
               function(newInputText){
                   var divElementHereComponent = cmp.find("ElementHere");
                   var divElementHereBody = divElementHereComponent.get("v.body");
                   divElementHereBody.push(newInputText);
                   divElementHereComponent.set("v.body", divElementHereBody);
               },
               componentConfig
        );
    },

When we ran the app, we got a pop-up that complained that divElementHereComponent does not have get method.

Does anyone know if this is a bug, or we have missed some steps?

Thanks,

Derrick
Hi, I have setup my org dkoon_lightning@vlocity.com to try out building lightning components.  They all worked and tested correctly on browser.

But when I tried to add them to Salesforce1, they did show up in Salesforce1, but when I clicked on them, a spinner appeared and after spinning for over 1 minutes, a blank screen remained.

I have read through the Lightning Developer Guide and read similar problems in this blog.  I believe I have followed the correct procedure, which is as follows:

In the component I wish to add, I included implements="force:appHostable" in my aura:component tag and saved my changes.  The appHostable interface makes the component available on the navigation menu in Salesforce1.

I included my components in the Salesforce1 navigation menu by following these steps.

Create a custom tab for this component.
From Setup, click Create | Tabs.
Click New in the Lightning Component Tabs related list.
Select the Lightning component to display in the custom tab.
Enter a label to display on the tab.
Select the tab style and click Next.
When prompted to add the tab to profiles, accept the default and click Save.

I also included my Lightning component in the Salesforce1 navigation menu.
From Setup, click Mobile Administration | Mobile Navigation.
Select the custom tab you just created and click Add.
Sort items by selecting them and clicking Up or Down.
In the navigation menu, items appear in the order you specified. The first item in the Selected list becomes your users’ Salesforce1 landing page.

I checked my output by going to the Salesforce1 mobile browser app. My new menu item did appear in the navigation menu.

What am I missing???
 
I created one lightning component but my lightning component is not showing in LIghtning Component tab. I want to add it to Salesforce1 but it's not visible. What am I missing?