Titanium JIRA Archive
Alloy (ALOY)

[ALOY-846] iPad: detailWindow inside TabGroup does not load after switching tabs

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-10-28T17:07:33.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.3.0, 2013 Sprint 22
ComponentsXML
LabelssupportTeam
ReporterRupesh Sharma
AssigneeTony Lukasavage
Created2013-10-11T10:05:10.000+0000
Updated2015-10-16T17:30:19.000+0000

Description

Description

The project has as main element a TabGroup, one of the tabs of this TabGroup has a SplitWindow as the next list describes: * TabGroup ** Tab1 (1) *** SplitWindow **** MasterWindow (a) **** DetailWindow (b) ** Tab2 (2) The MasterWindow is a menu that opens a new Window in the navigation of the DetailWindow. The first time this happens it works well, the UI loads as it is styled, actually if you go back in the Detailwindow and load another Detailwindow; but if you move to another tab, and then go back to the one with the Splitwindow, the new DetailWindow doesn't load correctly and it loads blank UI. Note : Issue is not reproducible with classic titanium.

Test Case

index.xml
<Alloy>
	<TabGroup>
		<Tab title="Tab 1" icon="KS_nav_ui.png">
			<Window>
				<SplitWindow id="splitWin" platform="ios" formFactor="tablet">

					<Window>

						<NavigationGroup>
							<Require src="testwindow"/>
						</NavigationGroup>

					</Window>
					<Window>
						<NavigationGroup id="detail_navGroup">
							<Require src="detailWin" />
						</NavigationGroup>
					</Window>

				</SplitWindow>
			</Window>
		</Tab>
		<Tab title="Tab 2" icon="KS_nav_views.png">
			<Window title="Tab 2">
				<Label>I am Window 2</Label>
			</Window>
		</Tab>
	</TabGroup>
</Alloy>
index.js
Alloy.Globals.detail_navGroup = $.detail_navGroup;
$.index.open();
detailWin.xml
<Alloy>
	<Window id="detailWin" title="test 2 title">
		<Label>Detail Window</Label>
	</Window>
</Alloy>
testwindow.xml
<Alloy>
	<Window id="testwin" class="container">
		<Label>Label</Label>
	</Window>
</Alloy>
testwindow.js
$.testwin.addEventListener("click",function(){
	Alloy.Globals.detail_navGroup.open(Alloy.createController('detailWin').getView(), {animated: true});
});

Attachments

FileDateSize
app.js2013-10-15T09:16:19.000+00001761

Comments

  1. Betty Tran 2013-10-22

    Any update on this issue?
  2. Tony Lukasavage 2013-10-22

    [~btran] as is shown in the fix version of the ticket details, this is scheduled to be resolved in this sprint. What other updates are you looking for?
  3. Tony Lukasavage 2013-10-24

    This ticket is missing TiSDK version and Alloy version. Also, I've tested this with both the 7.0 and 6.1 simulators using the provided Alloy code and it doesn't even show the SplitWindow. I need a test case that actually reproduces the issue, with all files necessary to show the issue, including images and styles. Another consideration is that NavigationGroup is being deprecated and that NavigationWindow should be used in its place. When the test case has been updated I will revisit.
  4. Tony Lukasavage 2013-10-28

    solution

    The core of the issue was the element wrapping the in the Alloy example. I modified so that it will accept (as well as ) as a direct child. After that, I modified the sample slightly, like this (notice the wrapping is gone):
       <Alloy>
       	<TabGroup>
       		<Tab title="Tab 1" icon="KS_nav_ui.png">
       			<SplitWindow id="splitWin" platform="ios" formFactor="tablet">
       				<Window>
       					<NavigationGroup>
       						<Require src="testwindow"/>
       					</NavigationGroup>
       				</Window>
       				<Window>
       					<NavigationGroup id="detail_navGroup">
       						<Require src="detailWin" />
       					</NavigationGroup>
       				</Window>
       			</SplitWindow>
       		</Tab>
       		<Tab title="Tab 2" icon="KS_nav_views.png">
       			<Window title="Tab 2">
       				<Label>I am Window 2</Label>
       			</Window>
       		</Tab>
       	</TabGroup>
       </Alloy>
       
    The Alloy version nows behaves as well as the traditional Titanium example.

    testing

    PR: https://github.com/appcelerator/alloy/pull/261 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-846 This will not work at all if the TiSDK is greater than 3.1.2, so please use 3.1.2 as the ticket indicates. More details in the "next steps" section. Functional test should be performed only on iPad sim or device against the versions noted in this ticket. Please follow [~dcassenti]'s instructions for testing listed in the comment above. It should behave as well, if not better than the traditional Titanium cases. So long as it meets the standards of the traditional Titanium version, the ALOY issue is resolved.

    next steps

    [~dcassenti] you noted that there were still issues that were possible to be created when doing the traditional Titanium example, even though it didn't match the issue at hand. Please log those issues as TIMOB ticket, and then link them as "related" to this ticket. Also [~dcassenti], due to changes in iOS 7 and the iOS team's refactor of Windows to support NavigationWindow, this code will not work at all in Titanium SDK 3.1.3 or greater. Can you please log this as a ticket as well, and suggest that the originator of this ticket consider refactoring to use NavigationWindow, which should alleviate future compatibility issues. Please link that ticket as "related" to this one as well.

JSON Source