[ALOY-202] Implement a "nolayout" attribute (or something similar) in tags
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-11-14T02:53:16.000+0000 |
Affected Version/s | 2012 Sprint 18 |
Fix Version/s | 2012 Sprint 18, Release 3.0.0 |
Components | XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2012-08-23T14:21:03.000+0000 |
Updated | 2014-01-28T23:28:49.000+0000 |
Description
There will be times when we want to create an element in markup, but don't want to include it in the view hierarchy. A simple example might be a nav button in a navigation group. I want to be able to create the button in markup so I don't have to create it from scratch in code, or create a whole separate controller triad for it.
The format could work something like this:
index.xml
<Alloy>
<Window>
<NavigationGroup>
<Window title="Window 1" id="win1">
<Label>Window 1</Label>
<Button id="rightNavButton" nolayout="true"/>
</Window>
</NavigationGroup>
</Window>
</Alloy>
index.js
$.win1.rightNavButton = $.rightNavButton;
$.index.open();
Not so sure this is good. It seems odd to have a layout and say don't add to that layout. We can talk about this.
So in the above example, how would you create a leftNavButton for the navigation group? Create an entirely separate view jsut for a button? Create it all in code, which alloy is built to avoid? I'm open to other alternatives that don't include the last 2 sentences. Also, Flex has something similar in its
includeInLayout
property for its markup: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7dfb.htmlRuss to talk to Gabe and doc team to get resolution.
Yup
We will not use an attribute but instead use custom parsers.
Re-opening to mark as duplicate of a more relevant, new ticket: ALOY-383
Duplicate of ALOY-383