You need to sign in to do that
Don't have an account?
Leo Wang
Uncaught TypeError: Cannot read property 'childNodes' of null when using aura:if and aura:renderIF?
<aura:iteration items="{!v.opts}" var="item"> <div class="mo-picklist-option"> <div class="mo-picklist-content"> <aura:if isTrue="{!v.currentType == 'Maturity'}"> <ui:inputRadio name="others" label="{!item}"/> </aura:if> <aura:if isTrue="{!v.currentType == 'Strategy'}"> <ui:inputCheckbox label="{!item}"/> </aura:if> </div> </div> </aura:iteration> <!--third--> <aura:if isTrue="{!v.currentType == 'Strategy'}"> <div class="mo-picklist-option"> <div class="mo-picklist-content"> <span>Other</span> <input type="text"/> </div> </div> </aura:if>error occurs when the third aura:if is added. is something wrong? Any answer is appreciated.
There is no any error in your current code that u have posted here.
I have tested your this full code and it's working fine.
Please see your another area of code or if possible then please post the full code that will help in better understanding.
Thanks
Rishav
thanks for your answer.
Other area of code works fine. The situation is that first part and second part cann't exist simultaneously, or error occurs. But either of both works fine solely. Now I wonder that there is a limit on aura:if or aura:renderIF. I'm not sure.
Lightning Application:
Application controller:
Press the change button 4 times and you get the error.
I am again telling there is nothing error in your code.
there is no any limitation on aura:if or aura:renderIF like you both are telling.
I have again compiled your code only and got the correct answer: To prove that i am attaching u code and sanpshot of output:
Here is the JS file
Here is the apex controller file
Now i think You both need to find the error in other section of your code.
If your problem solved then please close this thread , and if u got ur actual issue then open a new thread.
Thanks
Rishav
There is nothing error like you are explaining ,
Your <aura:iteration> component is unable to read "testingArray" Attribute. So error is there
I just did a little modification in ur code and it's working fine. Here is my code :
my requirement is select any object and click query button and display records and with Dynamic SOQL query .How to solve this one please can you help me.
You are correct, that example does have a flaw in it. Here, try this one instead. It appears that renderIf failes if you are using the length of the array in the isTrue attribute -- but not on the first render, only on subsequent rendering.
Copy the following code, then run the application. Click the "fill array" button, then the "empty array" button, then the "fill array" button again. Receive the error.
Aura application
Controller
This one should be a lot simpler to test.
Hi, Leo Wang
i can enter user duplicate values click on submit button. display the error meassage using try and catch exceptions. how to solve the above scenario can you plz help me. i need user values with example
Hi, Rishav
i can enter user duplicate values click on submit button. display the error meassage using try and catch exceptions. how to solve the above scenario can you plz help me. i need user values with example
submit duplicated values? To fix it, 1. insert record in server-controller(apex) 2. return the record(with id) 3. set the appropriate component attribute with the the returned record.
Hi, Leo Wang
can you give me the example of user duplicate values click on submit button display the error meassage