
| Key: |
LPP-3741
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
--
|
| Assignee: |
Unassigned
|
| Reporter: |
Philip Romanik
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
OpenLaszlo
Created: 19/Mar/07 07:20 AM
Updated: 30/Apr/07 01:59 PM
|
|
| Component/s: |
SA - Amazon
|
| Affects Version/s: |
OL4B1
|
| Fix Version/s: |
4.0.2
|
|
| Severity: |
Minor
|
| Fixed in Change#: |
4,461
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
If you select a radio button, delete that item, and attempt to select another item, an error is generated. The action of the delete button is to delete a node in the dataset. It doesn't do anything to adjust the currently selected item.
You can test on either the shipping address or payment information pane.
The easiest fix is to test for a null image in the select() method below. This will make the error go away, but I'm not sure what happens if you:
- select an entry
- delete that entry
- proceeed to checkout
classlib.lzx:
<class name="radiobutton" onclick="select()">
<attribute name="selectionobject" type="expression" />
<attribute name="val" type="string"/>
<view name="img" resource="radio_rsc" y="2"/>
<method name="select">
if (selectionobject.selectedItem) { Debug.write("selectionobject.selectedItem", selectionobject.selectedItem);
selectionobject.selectedItem.img.setResourceNumber(1); <===== ****ERROR. img does not exist
}
this.img.setResourceNumber(2);
selectionobject.setAttribute("selectedItem", this);
selectionobject.setAttribute("val", this.val);
</method>
</class>
|
|
Description
|
If you select a radio button, delete that item, and attempt to select another item, an error is generated. The action of the delete button is to delete a node in the dataset. It doesn't do anything to adjust the currently selected item.
You can test on either the shipping address or payment information pane.
The easiest fix is to test for a null image in the select() method below. This will make the error go away, but I'm not sure what happens if you:
- select an entry
- delete that entry
- proceeed to checkout
classlib.lzx:
<class name="radiobutton" onclick="select()">
<attribute name="selectionobject" type="expression" />
<attribute name="val" type="string"/>
<view name="img" resource="radio_rsc" y="2"/>
<method name="select">
if (selectionobject.selectedItem) { Debug.write("selectionobject.selectedItem", selectionobject.selectedItem);
selectionobject.selectedItem.img.setResourceNumber(1); <===== ****ERROR. img does not exist
}
this.img.setResourceNumber(2);
selectionobject.setAttribute("selectedItem", this);
selectionobject.setAttribute("val", this.val);
</method>
</class>
|
Show » |
|
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals
Summary: Fix radio button issue in Amazon app
New Features:
Bugs Fixed:
LPP-3741Technical Reviewer: jcrowley
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
When you delete a radio button that is selected, the next time you select an ite
m, it attempts to turn off the non-existant button.
Tests:
amazon in dhtml no longer generates a dhtml error. To verify, select a radio but
ton in the shipping address and/or payment information panes. Delete the selecte
d item and attempt to select another item.
Files:
M demos/amazon/classlib.lzx
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070322-Philip-8.tar