• ssgmail
  • NEWBIE
  • 5 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    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.
 
I am noticing that "click" event is not captured in the ui:message component.

My component:
<aura:component access="global">
 <ui:outputText value="simple text" click="{!c.onClick}"/>
 <ui:message title="Confirmation" severity="confirm" closable="true" click="{!c.onClick}">
   This is a confirmation message.
 </ui:message>
</aura:component>

My JS Controller:
({
    onClick: function(cmp) {
        alert("Clicked");
    }
})

Note that when I click on ui:outputText I do get the alert popup. But clicking on the ui:message does not give me the alert. 
According the lightning developer document, the ui:message is supposed to support click event.
Thank you for the help!
I am noticing that "click" event is not captured in the ui:message component.

My component:
<aura:component access="global">
 <ui:outputText value="simple text" click="{!c.onClick}"/>
 <ui:message title="Confirmation" severity="confirm" closable="true" click="{!c.onClick}">
   This is a confirmation message.
 </ui:message>
</aura:component>

My JS Controller:
({
    onClick: function(cmp) {
        alert("Clicked");
    }
})

Note that when I click on ui:outputText I do get the alert popup. But clicking on the ui:message does not give me the alert. 
According the lightning developer document, the ui:message is supposed to support click event.
Thank you for the help!
I am noticing that "click" event is not captured in the ui:message component.

My component:
<aura:component access="global">
 <ui:outputText value="simple text" click="{!c.onClick}"/>
 <ui:message title="Confirmation" severity="confirm" closable="true" click="{!c.onClick}">
   This is a confirmation message.
 </ui:message>
</aura:component>

My JS Controller:
({
    onClick: function(cmp) {
        alert("Clicked");
    }
})

Note that when I click on ui:outputText I do get the alert popup. But clicking on the ui:message does not give me the alert. 
According the lightning developer document, the ui:message is supposed to support click event.
Thank you for the help!
Objects with a single layer work fine, but when I try to use an object that goes deeper than one layer I receive an unknown server error when trying to access the variable on the server side user parameter.get('objectPropertyName') see code below.

So this code works as gateway is a simple string. However whenever I try to make gateway an object I start getting errors
       /*******************************************************************************************************
        * @description Test saving configuration
        */
        var saveConfiguration = component.get("c.testSomething");

        // Set save configuration parameters.
        saveConfiguration.setParams({
            testSome : 'Hello World!',
            config : {
                gateway: 'Stripe'
            }
        });

        // Setup save configuration callback
        saveConfiguration.setCallback(this, function(a) {
                if (a.getState() === "SUCCESS") {
                   // Do something with return value
                } else if (a.getState() === "ERROR") {
                    $A.error("Errors", a.getError());
                    $A.log("Errors", a.getError());
                }
            });

        // Queue the transaction action
        $A.enqueueAction(saveConfiguration);



This code gives me an error when trying to access the parameter map in the server side controller. 
       /*******************************************************************************************************
        * @description Test saving configuration
        */
        var saveConfiguration = component.get("c.testSomething");

        // Set save configuration parameters.
        saveConfiguration.setParams({
            testSome : 'Hello World!',
            config : {
                gateway: 'Stripe'
            }
        });

        // Setup save configuration callback
        saveConfiguration.setCallback(this, function(a) {
                if (a.getState() === "SUCCESS") {
                   // Do something with return value
                } else if (a.getState() === "ERROR") {
                    $A.error("Errors", a.getError());
                    $A.log("Errors", a.getError());
                }
            });

        // Queue the transaction action
        $A.enqueueAction(saveConfiguration);




Here's my server side controller method:
@AuraEnabled
public static void testSomething(String testSome, Map<String, Object> config) {
    System.debug(config.get('gateway'));
}

So in summary whenever gateway is a simple string everything works... The second I try to use an object I start getting errors. I'd prefer to use one of my Apex classes instead of a Map<String, Object> for the parameter, but I was having no luck with that. Any help is much appreciated!
 

Hi all,

 

First I'm new to SF administration and development.

 

I'm trying to get some basic case escalation setup for our users.  We have a required field due date that users enter when setting up a case.  I would like to remind the user that the case is due 2 days prior to the due date and then escalate the case to a manager 1 day after the due date if it is not completed. 

 

Some basic questions-

Are escalation rules run daily?

Does a case have to be modified for the escalation to take place?

Is there a way to test this in my sandbox without having to wait a day?

Under Customize->Cases->Support Settings what is 'Early Triggers Enabled: Use this setting to enable early triggers on escalation rules? 

 

So what would be best practices for this type of solution?  Timed Workflow or Escalation rules?

 

Thanks,

Jim

  • February 10, 2011
  • Like
  • 0