Titanium JIRA Archive
Alloy (ALOY)

[ALOY-833] Allow <Widget> as child of TableView

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-08-05T23:36:18.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.3.0, 2013 Sprint 23
ComponentsXML
Labelsqe-manualtest
ReporterTiman Rebel
AssigneeTony Lukasavage
Created2013-09-23T12:53:59.000+0000
Updated2014-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

Comments

  1. Tony Lukasavage 2013-09-23

    [~timanrebel] what is in your widget?
  2. Timan Rebel 2013-09-23

    sc.SharingSettings:
       <Alloy>
           <Widget src="sc.GroupedTable" id="groupedTable" />
       </Alloy>
       
    sc.GroupedTable:
       <Alloy></Alloy>
       
    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.
  3. Tony Lukasavage 2013-09-23

    I think I can facilitate this by allowing empty widgets to be part of the hierarchy.
  4. Timan Rebel 2013-09-23

    I noticed that adding a TableViewSection to sc.GroupedTable didn't seem to work. Maybe because the hierarchy is then: TableView -> Widget -> Widget -> TableViewSection
  5. Tony Lukasavage 2013-09-23

    [~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.
  6. Tony Lukasavage 2013-11-04

    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).
  7. Federico Casali 2013-12-03

    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.

JSON Source