-
-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-24817] Support Widgets in ListView templates #892
Conversation
@garymathews, what's the structure of |
@feons Here's my simple test widget: https://jira.appcelerator.org/secure/attachment/65018/test.widget.zip |
// to generate a valid template | ||
if (child.nodeName === 'Widget') { | ||
let src = child.getAttribute('src'), | ||
ns = src.split('.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing ,
Also, widget ids are not necessarily be in the form of a.b.c. This won't work if the id is not .
separated.
@garymathews, what's the expected output here? I see the text |
Will it be possible to bind a widget (using bindId property) ? |
@feons updated both PRs and test case 👍 You should see three squares of red, blue and orange |
@garymathews, looks good. Please update the package version! |
8ebbaf0
to
ee421a7
Compare
Approved. |
Was this tested before? Just tried with SDK 7.4.0 and Alloy 1.13.0 and it throws a build error: <Alloy>
<Window>
<ListView id="listView" defaultItemTemplate="Cell">
<Templates>
<ItemTemplate name="Cell">
<View height="250">
<Widget src="my.widget" bindId="testWidget" id="testWidget"/>
</View>
</ItemTemplate>
</Templates>
<ListSection>
<ListItem></ListItem>
</ListSection>
</ListView>
</Window>
</Alloy> Error:
|
This issue was initially brought up on JIRA over 5 years ago, supposedly "fixed" last year according to this PR and yet is still broken and unresolved, i'm still getting the same crashes as above ^. |
REQUIRES tidev/titanium-sdk#9955
TEST CASE
JIRA Ticket