[ALOY-833] Allow <Widget> as child of TableView
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-05T23:36:18.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.3.0, 2013 Sprint 23 |
Components | XML |
Labels | qe-manualtest |
Reporter | Timan Rebel |
Assignee | Tony Lukasavage |
Created | 2013-09-23T12:53:59.000+0000 |
Updated | 2014-08-05T23:36:18.000+0000 |
Description
When trying to build the following code:
<TableView>
<Widget src="sc.SharingSettings" id="sharing" />
</TableView>
I get the following error:
{color:red}
[ERROR] : Child element must be one of the following: [Ti.UI.TableView.HeaderView,Ti.UI.TableView.HeaderPullView,Ti.UI.TableView.FooterView,Ti.UI.TableView.Search,Ti.UI.TableViewRow,Ti.UI.TableViewSection,Ti.UI.SearchBar]
{color}
Could you please add Widget as valid child of TableView? I am allowed to put a Widget inside a TableViewSection
[~timanrebel] what is in your widget?
sc.SharingSettings:
sc.GroupedTable:
sc.GroupedTable's widget controller creates a set of Ti.UI.TableViewSection, which it adds via $.addTopLevelViews. The GroupedTable widget used to have its own TableView, but I wanted more flexibility. Like adding 2 widgets into 1 tableview.
I think I can facilitate this by allowing empty widgets to be part of the hierarchy.
I noticed that adding a TableViewSection to sc.GroupedTable didn't seem to work. Maybe because the hierarchy is then: TableView -> Widget -> Widget -> TableViewSection
[~timanrebel] can you turn this into a reproducible test case? I've got some of the bits and pieces here, but I'm obviously missing some elements necessary to actually run this on my end.
This issue was resolved by an earlier commit. The PR below represents a test app created to confirm the fix. PR: https://github.com/appcelerator/alloy/pull/268 Functional test should be simply running the app, confirming that there are no compile time or runtime errors, and asserting that the table section in the app's widget is shown (5 simple rows).
Verified fixed. TiSDK 3.2.0.v20131127194046 CLI 3.2.0-beta Alloy 1.3.0-beta Titanium Studio 3.2.0.201311262027 iPad OS 7 and simulator Android Google Nexus Galaxy 4.3 MobileWeb (for sample #2) Closing.