Still a bit new to TW so bear with me. I am not sure what you mean by doing things on the server-side. I understand what server-side means, but i do not know how to access it/interact with it.
The widget is simple...I have two stylized message boxes: 1 for displaying messages sent, 1 for displaying messages received. The message box that the data flows into will be driven by who the current user is, and who sent the message. If the sender & the user are the same, then display the message in the "sent" stylized box. Else, display the message in the "received" stylized box.
I hope this helps!
Given that you have the objects User and Sender in properties and each of those has defaultValue, I'd recommend this as the comparison:
If you're not trying to compare the defaultValue properties, then you must have done something like properties.User.value=something; elsewhere in your code and you would be comparing value instead of defaultValue.