• V. Bezbozhnyi
  • NEWBIE
  • 0 Points
  • Member since 2016


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
I am noticing that the bound variables are not being updated in Lightning after the Summer'16 update. This happens when the bound variables are properties of custom classes.
To illustrate the issue I have the following code which binds the property(name) of the custom class(group) to an input component( ui:inputText). You will notice that when you click on the button for the first time the expression "component.get("v.group").name" gives the updated value. But subsequent clicks still show the value from the first click as if after the first "get" the linkage between the inputtext and the base binding object is broken. 

My expectation is that expression component.get("v.group").name) will always give me the current value of the ui:inputText as it is bound to that field.

Below is the code:
1. Application:
<aura:application >
<c:testAttributeSetting />
</aura:application>

2. testAttributeTesting.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="group" type="Object" />
<ui:inputText aura:id="groupObjectNameId" label="linked to group.name" class="field" value="{!v.group.name}"/>
<ui:button class="btn" label="Submit" press="{!c.setOutput}"/> 
<div aura:id="msg">
<p>From group.name: <ui:outputText aura:id="oName2" value="{!v.group.name}"/></p>
</div>
</aura:component>

3. testAttributeTestingController.js
({
doInit : function(component, event, helper) {
var group = {name:"hello"};
component.set("v.group",group);

}, 
setOutput: function(component, event, helper) {
alert('component.get("v.group").name: (Displays first click value always)' + component.get("v.group").name);
alert('component.find("groupObjectNameId").get("v.value"): (Displays correct value)' + component.find("groupObjectNameId").get("v.value"));
alert('component.get("v.group.name"): (Displays correct value)' + component.get("v.group.name"));
}

})

You should be able to use the above to to recreate the issue. Appreciate if you let me know the results.
Please let me know if there is any issue with the code itself and how to fix this.
 

Hi folks,

 

Is there any way I can convert the body of an inbound email from html to Plain Text? I've set up a service to email directly into chatter, but html emails sent from my organisation into Chatter are all of over 1,000 characters in length (even if I send a blank email). So, I'm looking for a way to strip the body text from the emails and discard all the html "nonsense", rather than force users to send emails in Plain Text format, which they'll be disinclined to do.

 

Any help anyone can give would be massively appreciated.

 

Thanks,

Lee