Author: ptw
Date: 2007-09-12 12:57:55 -0700 (Wed, 12 Sep 2007)
New Revision: 6440
Modified:
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
Log:
Change 20070912-ptw-m by [EMAIL PROTECTED] on 2007-09-12 13:21:29 EDT
in /Users/ptw/OpenLaszlo/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
Summary: Take care updating selection when node is null
Bugs Fixed:
LPP-4699 'Explicit replicator displays warning when a clone's datapath is null'
Technical Reviewer: pkang (Message-ID: <[EMAIL PROTECTED]>)
QA Reviewer: max (Message-ID: <[EMAIL PROTECTED]>)
Details:
If there is no datanode, you can't be selected.
Tests:
Pablo to try with this test case
Modified:
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
===================================================================
---
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
2007-09-12 19:52:43 UTC (rev 6439)
+++
openlaszlo/branches/wafflecone/lps/components/utils/replicator/replicator.lzx
2007-09-12 19:57:55 UTC (rev 6440)
@@ -199,10 +199,15 @@
v.setAttribute( "clonenumber" , n );
this.setData( v , n );
this.update( v , n );
- var datanode = this.nodes[n];
- if (v.datapath['sel'] != datanode['sel']) {
- v.datapath['sel'] = datanode['sel'] || false;
- v.setSelected(v.datapath['sel']);
+ // Cooperate with dataselectionmanager, but take care
+ if ('setSelected' in v) {
+ var datanode = this.nodes[n];
+ var datapath = v.datapath;
+ var isSelected = (datanode && datanode['sel']) || false;
+ var wasSelected = (datapath && datapath['sel']) || false;
+ if (isSelected != wasSelected) {
+ v.setSelected(datapath['sel'] = isSelected);
+ }
}
if ( this._cloneprops[ n ] ) {
var p = this._cloneprops[ n ];
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins