Nested repeaters in Flex 3
I have an Flex app that uses nested repeaters. The inner
repeater uses the outer repeater's currentItem property.
When using nested repeaters, do they repeat in an asynch
fashion? It seems as though the outer repeater is repeating before
the inner repeater gets done repeating over the outer's current
item, causing data to be displayed incorrectly.
Can anyone give an example of how to use nested repeaters
from a single xml dataProvider? IE. The inner repeater should use
the outer repeater's currentItem property, and the data should
appear correctly in the UI.
ntsii
True a bad attitude doesn't help but I don't think I had a
bad attitude. Its pretty frustrating though when people ask
questions that can be answered if the post is read carefully. What
happens is everyone else thinks the question is being taken care of
when its not.
I see what you mean with the CustomCompnent. I did create a
custom component and repeat over it, but didn't pass in the entire
currentItem, just properties of it.
What I ended up doing though, was removing the inner-most
repeater out of the 3, and I replaced it with a list instead, and
that worked out really well in my case. It also loaded that 'page'
much quicker too.
Similar Messages
-
I have nested repeaters to display a collection of Projects
where each Project can have multiple images. I'm using the
projectRepeater to render a Panel for each Project. Within that
each Panel, I'm rendering a linkButton and a Button(delete) for
each Image. The linkButton would allow you to view the image and
the delete Button allows you to remove it from that collection.
My problem is that I don't know how to capture the
projectRepeater item on the click event. When I use
'event.currentTarget.getRepeaterItem()' on the Image's delete
button, it obviously references the imageRepeater. Based on the
code below, what do I need to do to target the
projectRepeater?"JRLeonard" <[email protected]> wrote in
message
news:g6t7d8$mhi$[email protected]..
>I have nested repeaters to display a collection of
Projects where each
>Project
> can have multiple images. I'm using the projectRepeater
to render a Panel
> for
> each Project. Within that each Panel, I'm rendering a
linkButton and a
> Button(delete) for each Image. The linkButton would
allow you to view the
> image
> and the delete Button allows you to remove it from that
collection.
>
> My problem is that I don't know how to capture the
projectRepeater item on
> the
> click event. When I use
'event.currentTarget.getRepeaterItem()' on the
> Image's
> delete button, it obviously references the
imageRepeater. Based on the
> code
> below, what do I need to do to target the
projectRepeater?
>
> <mx:Repeater id="projectRepeater">
> <mx:Panel width="500"
title="{projectRepeater.currentItem.name}"
> height="300">
> <mx:VBox width="100%">
> <mx:Repeater id="imageRepeater"
>
dataProvider="{projectRepeater.currentItem.images.list}">
> <mx:HBox>
> <mx:LinkButton
label="{imageRepeater.currentItem.name}"/
> <mx:Button id="deleteButton" label="Delete"
>
click="deleteImage(event.currentTarget.getRepeaterItem())"/>
> </mx:HBox>
> </mx:Repeater>
> </mx:VBox>
> <mx:ControlBar>
> <mx:Button id="deleteProject" label="Delete Project"
>
click="deleteProject(event.currentTarget.getRepeaterItem())"/>
> </mx:ControlBar>
> </mx:Panel>
> </mx:Repeater>
If the data source is XML, you can use the parent property.
If not, try something like
event.target.document.parent.repeaters[0].getRepeaterItem(n)
The way I typically do this kind of thing is to put a break
point in the
function and drill down into the available properties until I
can find the
piece I need.
Of course, you need to know what item it was, but if your
data source is
XML, you can use childIndex().
HTH;
Amy -
Checkboxes in nested repeaters always return false
I display a table using nested <netui-data:repeater> tag sets.
<p>
In the left column of the table, I have a checkbox to indicate user row selections for further action. These checkboxes are bound to an array of Row objects that have a boolean field indicating whether they are selected. These work great and I can iterate through the array of Row objects returned in the (pageflow-scoped) form.
<p>
In the first (header) row of the table, each cell contains the column name and a checkbox to allow the user to hide columns they don't want to see. These checkboxes are bound similarly to an array of Column objects with Boolean (used to be boolean, tried the object type to see if it helped) indicating their selected state. The initial values of the checkboxes are correct - they are all displayed as "checked"/true - so the data binding seems ok at this point.
<p>
PROBLEM: The selected values returned from the JSP are always all set to false for the Column objects! The only real coding difference is that the column checkboxes are rendered within a set of nested <netui-data:repeater> tags inside the set that render the row checkboxes (see below).
<p>
The {pageFlow.activity3Form.rows} are of type RowData with fields/getters/setters for fields:
private boolean selected;
private String[] fieldData;
private long oid;
<p>
The {pageFlow.activity3Form.columns} are of type Column with fields/getters/setters for fields:
private Boolean selected;
private String columnName;
private int columnIndex;
<p>
activity3Form contains a bunch of fields including:
private RowData[] rows;
private Column[] columns;
<p>
JSP code for the table:
<code>
<table width="2000" border="0">
<tr class="style3" valign="top" bgcolor="#ffffff">
<th colspan="150" class="style3_3" align="left">
<netui:anchor action="showAllDataAL3" formSubmit="true">Show All Data</netui:anchor>
<netui:anchor action="showDefaultDataAL3" formSubmit="true">Show Default Data</netui:anchor>
<netui:anchor action="showSelectedDataAL3" formSubmit="true">Show Selected Data</netui:anchor>
</th>
</tr>
<tr>
<!-- The dataSource for the repeater is the array of EsiMemberRows in the form -->
<netui-data:repeater dataSource="{pageFlow.activity3Form.rows}">
<netui-data:repeaterHeader>
<table class="tablebody" border="0" cellpadding="1" cellspacing="3">
<tr class="style3" valign="top" bgcolor="#ffffcc">
<th bgcolor="#89fbfb" nowrap valign="bottom">
<input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/>All
</th>
<netui-data:repeater dataSource="{pageFlow.activity3Form.columns}">
<netui-data:repeaterItem>
<th valign="bottom">
<netui:label value="{container.item.columnName}" defaultValue=" "/><br>
<netui:checkBox dataSource="{container.item.selected}"/>
</th>
</netui-data:repeaterItem>
</netui-data:repeater>
<th align="left" nowrap valign="bottom">
Transaction Status<br>
<input type="radio" name="setall" value="Update" onclick="setAllRadioGroupsTheSame(this, 'Update');">Update
<input type="radio" name="setall" value="Hold" onclick="setAllRadioGroupsTheSame(this, 'Hold');">Hold
<input type="radio" name="setall" value="Proof" onclick="setAllRadioGroupsTheSame(this, 'Proof');">Proof
<input type="radio" name="setall" value="Reject" onclick="setAllRadioGroupsTheSame(this, 'Reject');">Reject
<input type="radio" name="setall" value="Unset" onclick="setAllRadioGroupsTheSame(this, 'Unset');">Unset
</th>
</tr>
<tr class="style3" valign="top" bgcolor="#facf92">
</tr>
</netui-data:repeaterHeader>
<netui-data:repeaterItem>
<tr class="style3_3" valign="top" bgcolor="#89fbfb">
<td background="#ffffff"><netui:checkBox dataSource="{container.item.selected}"/></td>
<netui-data:repeater dataSource="{container.item.fieldData}">
<netui-data:repeaterItem>
<td nowrap><netui:label value="{container.item}" defaultValue=" "></netui:label></td>
</netui-data:repeaterItem>
</netui-data:repeater>
<td align="left" nowrap>
<netui:radioButtonGroup tagId="subGroup" dataSource="{container.item.oid}" labelStyleClass="style3_1">
<netui:radioButtonOption value="Update">Update</netui:radioButtonOption>
<netui:radioButtonOption value="Hold">Hold</netui:radioButtonOption>
<netui:radioButtonOption value="Proof">Proof</netui:radioButtonOption>
<netui:radioButtonOption value="Reject">Reject</netui:radioButtonOption>
<netui:radioButtonOption value="Unset">Unset</netui:radioButtonOption>
</netui:radioButtonGroup>
</td>
</tr>
</netui-data:repeaterItem>
<netui-data:repeaterFooter></table></netui-data:repeaterFooter>
</netui-data:repeater>
</tr>
<!-- Data section END -->
</table>
</code><p>
A bit more info - how the HTML is rendered to the browser:
<p>
The failing (and initially checked/true) column checkboxes are generated as:
<br>
<input type="hidden" name="wlw-checkbox_key:{pageFlow.activity3Form.columns[0].selected}OldValue" value="false"><input type="checkbox" name="wlw-checkbox_key:{pageFlow.activity3Form.columns[0].selected}" checked>
<p>
The working (and initially unchecked/false) row checkboxes are generated as:
<br>
<input type="hidden" name="wlw-checkbox_key:{pageFlow.activity3Form.rows[0].selected}OldValue" value="false"><input type="checkbox" name="wlw-checkbox_key:{pageFlow.activity3Form.rows[0].selected}"> -
"Packages cannot be nested" error in Flex
I want to use SoundFacade class from Adobe. (Here, from github). I simple created an "ActionScript File" and paste all the code. But when I want to compile my app I got following error:
1037: Packages cannot be nested.
The only reason I can guess is that the package must somehow put into the project or something.
Even when I just put a simple empty package I got the error:
package { }
Any idea what is this error about?Found the solution in the forum: http://forums.adobe.com/message/4299377
-
I have a table of "panels" and a table of "loops". Each panel
(category) can have many loops (subcategories). The tables are
related by panelid. Each loop has a corresponding panelid. How do I
create a nested array (an array of loops
within each panel object of my array of panels)?
I need help creating this nested array in my CFC.
On the front end, I'm using remote object in Flex to populate
an ArrayCollection. This arraycollection will feed nested repeaters
(a outer repeater that builds an accordion canvas for each panel
and an inner repeater of buttons for the loops within that panel).
If you can help me on the CFC side, that would be great. If
you also know how to reference that array in Flex to build nested
repeaters...bonus.
Thanks,
DonI have a table of "panels" and a table of "loops". Each panel
(category) can have many loops (subcategories). The tables are
related by panelid. Each loop has a corresponding panelid. How do I
create a nested array (an array of loops
within each panel object of my array of panels)?
I need help creating this nested array in my CFC.
On the front end, I'm using remote object in Flex to populate
an ArrayCollection. This arraycollection will feed nested repeaters
(a outer repeater that builds an accordion canvas for each panel
and an inner repeater of buttons for the loops within that panel).
If you can help me on the CFC side, that would be great. If
you also know how to reference that array in Flex to build nested
repeaters...bonus.
Thanks,
Don -
Nested Repeater and Binding Problem - Please Help
I have nested repeaters and binding seems to work with the
outer repeater, but not with the inner repeater. I have boiled it
down to a pretty concise case. If someone could offer hints I would
be most appreciative!
I understand the objects I am using to store data could be
different, but it only looks strange because I had to boil down a
complex case to a simple case.
Type a user and then an email address then click to add them,
the user TextInput and label gets created, but not the email
address label and text input.
Basically I want users in an ArrayCollection, and their
multiple email addresses in an ArrayCollection stored in an Object,
where I get that email ArrayCollection using the user as the key to
the object acting as an associative array.
The attached code should compile fine, so please have a go at
this. Thanks!"Greg Lafrance" <[email protected]> wrote in
message
news:gn5p1k$cv9$[email protected]..
>I have nested repeaters and binding seems to work with
the outer repeater,
>but
> not with the inner repeater. I have boiled it down to a
pretty concise
> case. If
> someone could offer hints I would be most appreciative!
>
> I understand the objects I am using to store data could
be different, but
> it
> only looks strange because I had to boil down a complex
case to a simple
> case.
>
> Type a user and then an email address then click to add
them, the user
> TextInput and label gets created, but not the email
address label and text
> input.
>
> Basically I want users in an ArrayCollection, and their
multiple email
> addresses in an ArrayCollection stored in an Object,
where I get that
> email
> ArrayCollection using the user as the key to the object
acting as an
> associative array.
I wouldn't bind to methods like that...I'd make properties
and bind to
those. -
Ok, here's my objective. I have a list of first and last
names running vertically (a new name on each line). I want to nest
repeaters to repeat information, that's nested in the xml on a per
row basis. When a user clicks on a row, it expands to show more
about that user.
My xml looks like this:
<people>
<person firstname="bob" lastname="jones">
<phonenumbers>
<phonenumber type="home" value="8005551212" />
<phonenumber type="home" value="8007774545" />
</phonenumbers>
</person>
<person firstname="jane" lastname="smith">
<phonenumbers>
<phonenumber type="home" value="9003338986" />
<phonenumber type="home" value="8008884561" />
</phonenumbers>
</person>
</people>
<script>
var dsData = GetPersonData();
var dsPhones = null; // This needs to be set on a per
user-click basis?
</script>
<div spry:region="dsData"
style="height:100px;overflow:auto;">
<div spry:repeat="dsData" class="contact"
id="{dsData::ds_RowID}">
<a class="selectcontact" href="javascript: void(0);"
onclick="selectContact(this);">{dsData::@lastname}</a>
<div spry:detailregion="dsPhones">
Here are this uses phone numbers:
<a spry:repeat="dsPhones"
href="javascript:void(0);">{dsContact::@value}</a>
</div>
</div>
</div>
Is this possible with Spry? Nesting repeaters?
Thanks for any insight you can provide!
-joshHi Josh,
Unfortunately Spry has problems doing exactly what you are
trying to do. The reason is that our data set flattening code only
flattens a single level of repeating nodes.
We're working on a solution for solving this problem.
That said, the only way to handle this type of situation
currently is with a master/detail pattern where clicking on a name
updates a region *outside* of the region containing your list of
names.
By the way, nesting regions isn't supported.
--== Kin ==-- -
Dynamic Accordion 2-Levels deep
Hello,
I'm relatively new to FLEX and I am having a problem
referencing a dynamically named UI object to add a child to.
I am building a menu with an accordion, adding tab sections
using the addChild method, and then trying to add link buttons
within each tab section. No matter how I try to reference the
dynamically named tab section, nothing seems to work....
any help would be appreciated.
A graphic of my layout can be viewed here to better
understand the problem I am trying to solve.
click here for
graphic
There are 3 panels and empty accordians (hardcoded in the
mxml) ,
I retrieve from a database a list of tabs I want to display,
loop through and add to the accordian in which it belongs.
This works up to this point and adds all the children
correctly, but trying to add children (link buttons) to those newly
added children (tab sections) is where I'm tripping up....
my code follows;
private function
getSubCategoryTypes_ResultHandler(event:ResultEvent):void{
acSubCategoryTypes = ArrayCollection(event.result);
for ( var i:int=0; i < acSubCategoryTypes.length; i++ ) {
var iPanel:int = acSubCategoryTypes
.PanelSort;
var iTab:int = acSubCategoryTypes.TabSort;
var tabID:String = 'TB'+ iPanel + "-" + iTab;
accordion_addChild(this['Ac'+ iPanel], acSubCategoryTypes
.TabTitle, tabID)
private function accordion_addChild(accordion:Accordion,
childTitle:String, tabID:String):void{
var vbox:VBox = new VBox();
vbox.label = childTitle;
vbox.id = tabID;
vbox.percentWidth = 100;
vbox.percentHeight = 100;
accordion.addChild(vbox);
// this is where I call the function to get the list of links
I want to populate the accordian sections with.
createLinks(childTitle); //
private function createLinks(tabName:String):void {
RO_SecurityMenu.getLinkList(tabName);
private function
getLinkList_ResultHandler(event:ResultEvent):void{
acLinkItems = ArrayCollection(event.result);
for (var i:int=0; i < acLinkItems.length; i++ ) {
var urlPath:String = acLinkItems.URL;
var linkLabel:String = acLinkItems
.Descr;
var iPanel:int = acLinkItems.PanelSort;
var iTab:int = acLinkItems
.TabSort;
// but I cannot seem to reference it correctly when it is
dynamically named.
var vbox:VBox = this['TB'+ iPanel + "-" + iTab];
var linkButton:LinkButton = new LinkButton ();
linkButton.label = linkLabel;
linkButton.id = linkLabel;
linkButton.data = urlPath;
linkButton.addEventListener(MouseEvent.CLICK,
application.followLink);
// if I hardcode this line to a hardcoded accordian tab
section it works.....
vbox.addChild(linkButton);
I have been pulling my hair out trying to get this to work...
I don't have much left!!!
Any help would be appreciated greatly!!
Thanks,
KevinI was able to achieve this using a different method;
1. Returning XML instead of a query object from my remote
object.
2. Loop through the XML nodes using nested repeaters hard
coded in the mxml.
code follows;
<mx:Panel width="100%" height="33%" layout="vertical"
id="panel1" title="">
<mx:Accordion id="Ac1" width="100%" height="100%" >
<mx:Repeater id="repeatAc1" dataProvider="{MenuXML.tab}"
>
<mx:VBox width="100%" height="100%"
label="{repeatAc1.currentItem.label}" >
<mx:Repeater id="repeatlinkAc1"
dataProvider="{repeatAc1.currentItem.link}" >
<mx:LinkButton label="{repeatlinkAc1.currentItem.label}"
data="{repeatlinkAc1.currentItem.url}" click="followLink(event)"
/>
</mx:Repeater>
</mx:VBox>
</mx:Repeater>
</mx:Accordion>
</mx:Panel>
this is a sample of the XML data I'm returning from the
remote object;
<panel>
<panelID>3</panelID>
<tab>
<label>Fund - Portfolio Profile</label>
<link>
<label>Investor Information</label>
<url>index.cfm?DocID=</url>
</link>
<link>
<label>Subscription Lender Information</label>
<url>index.cfm?DocID=</url>
</link>
</tab>
<tab>
<label>Legal Documents</label>
<link>
<label>Subscription Agreements</label>
<url>index.cfm?DocID=</url>
</link>
<link>
<label>Private Placement Memorandum</label>
<url>index.cfm?DocID=</url>
</link>
<link>
<label>Limited Partnership Agreement</label>
<url>index.cfm?DocID=</url>
</link>
<link>
<label>Amendments to LPA</label>
<url>index.cfm?DocID=</url>
</link>
</tab>
</panel>
Thanks Kaotic101 for your help earlier!
Kevin (Kdub) -
What event tells me when any data changes in a mx:datagrid?
I have a mx:datagrid that I need to have an event tell me when anything at all changes in the datagrid. The datagrid can be empty and as such may not have a dataprovider (=null) some of the time. I have looked at a variety of events but none seem to do what i want - can anyone suggest what event i should be listening for please?
many thanks,
Mark.We have not formalized the concept of nested collections in Flex. However,
let me amend my recommendation a bit.
Typically in a nested collection, the objects in the top-level collection
are not just collections but an object with some other reference data and
then a collection like:
public class FamilyTreeItem
public var name:String;
public var children:ArrayCollection;
The top-level collection is listening for propertyChange events. Typically,
as a data item gets modified, a propertyChange event is dispatched. If the
data items do not dispatch propertyChange events, then the itemUpdated()
method is used. Either way, the result is a COLLECTION_CHANGE event from
the top-level collection.
When you have a nested ArrayCollection, while that sub-ArrayCollection is
dispatching COLLECTION_CHANGE, nobody is listening for it at the top-level.
You can dispatch it yourself, or you can call itemUpdated() on the top-level
or dispatch a propertyChange.
The latter will be the most work, but most general. Code in FamilyTreeItem
would attach a listener to the collection for COLLECTION_CHANGE and then
dispatch a propertyChange as appropriate. -
Complex VO as AdvancedDataGrid dataProvider
I would like to access fields in a complex VO from my AdvancedDataGrid.
By 'complex' I mean - that my AdvancedDataGrid dataProvider point to VO of type 'A' which containes (besides properties) VO of type 'B'.
I would like that part of my colums will point to B's fields (e.g.<mx:AdvancedDataGridColumn dataField="B.Myfield"/>
Is that possible?After digging the web, I've found several user solutions for this issue.
It seems that ADOBE not found this issue to be urgent enough, thus not support it in standard manner
For those of you who just encounter this issue, here are few solutions I've found:
- http://natescodevault.com/?p=61
- http://active.tutsplus.com/tutorials/flex/working-with-the-flex-datagrid-and-nes ted-data-structures/
- http://www.switchonthecode.com/tutorials/nested-data-in-flex-datagrid-by-extendi ng-datagridcolumn
(NOTE: for the last one, I found a post which describes how to support edit-mode too: http://kennethteo.com/2008/12/19/editing-nested-data-for-flex-datagrid/)
Cheers, Haim -
Hi, I'm using an accordion component with 2 nested repeaters,
the visualization is OK, except I cannot get rid of a vertical gap
in the list between my sections. The list displays correctly the
items of my first section and after that, it has a gap and then
section 2. How could I get rid of that gaps?
Thanks in advance
mofi
My code is here
Attach Code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
width="400"
height="300"
backgroundColor="#FFFFFF">
<mx:XML id="model" format="e4x">
<course >
<module id="1" label="Course 1">
<section label="section 1">
<lesson label="Lesson One" />
<lesson label="Lesson Two"/>
</section>
<section label="section 2">
<lesson label="Lesson Three" />
</section>
</module >
<module id="2" label="Course 2">
<section label="section 1">
<lesson label="Lesson One" />
</section>
<section label="seccion 2">
<lesson label="Lesson Two" />
<lesson label="Lesson Three" />
</section>
</module >
<module id="3" label="Course 3">
<section label="section 1">
<lesson label="Lesson One" />
<lesson label="Lesson Two" />
</section>
<section label="section 2">
<lesson label="Lesson Three" />
<lesson label="Lesson Four" />
</section>
</module >
</course>
</mx:XML>
<mx:Accordion width="100%" height="100%" verticalGap="0"
>
<mx:Repeater id="repeat" dataProvider="{model.module}"
>
<mx:VBox width="100%" height="100%" verticalGap="0"
label="{repeat.currentItem.@label}" >
<mx:Repeater id="repeat2"
dataProvider="{model.module[Number(repeat.currentItem.@id)-1].section}"
>
<mx:Label text="{repeat2.currentItem.@label}" />
<mx:List labelField="@label" width="100%"
dataProvider="{repeat2.currentItem.lesson}" />
</mx:Repeater>
</mx:VBox>
</mx:Repeater>
</mx:Accordion>
</mx:Application>I might stop using repeaters and have a custom component for
each course. There will be many common elements in each course,
probably each will have sections, or perhaps some will not. In any
case, just iterate through the xml data provider and create
instances of your course custom component, which can be based on
VBox as root container. This might help. -
Combining Rowsets into one row
Hi All,
Can we combine Rowset 1 and Rowset2 into one row
As there are two rowsets and nothing is common between the two rowsets so i cant do normalization.The problem due to rowset is if one rowset returns only one row and other rowset returns two rows then in Grid it shows only one Row
Any method to eliminate this problem
Best Regards
NamitaHi Namita,
It sounds like you need nested repeaters and an output document with columns for each field in the two rowsets. If I understand you correctly, something like this would work:
1. Create xMII XML Output Document with a column for each field of interest from Rowset 1 & 2.
2. Repeat on Rowset 1
3. Repeat on subset of Rowset 2 related to Rowset 1
4. Add Row to Document with data from each repeater.
5. Once you complete building your document, you can use it with an BLS (Xacute) query for the grid.
The difficulty for me is how you would determine the subset of Rowset 2 which is related to Rowset 1. Can you even do that? It may require some dynamic linking (xPath) to filter Rowset 2.
Hope this helps,
Mike -
Flex RPC mapping Java nested classes to ActionScript classes
We are calling a Java method in our project using
RemoteObject the value returned by the java method is a ArrayList
containing instances of a class say ParentClass with some nested
classes.
The structure of ParentClass(Java) is something like this
class ParentClass {
//some primitives
private ChildClassA childAInstance;
private ChildClassB childBInstance;
//getters setters
We have created similar class structure on the ActionScript
side, the ActionScript classes(ParentClass,ChildClassA
,ChildClassB) have been properly annotated with the [RemoteClass]
metadata tag,
The problem is that though i'm getting the primitive data
members of the ParentClass through RPC in my corresponding AS
ParentClass class i'm getting an runtime exception trying to access
ChildClassA,ChildClassB members.
Am i missing something, exactly the same scenario is
mentioned in this article
http://www.adobe.com/devnet/flex/articles/complex_data.html
But the Object.registerClass method mentioned in the tutorial
is giving me compilation error, the sample code attached with the
article is corrupt zip too.
Please help me out on thisJAXB will create classes from an XML schema, SAX is a parser library and JAXP is a library of XML a bunch of XML tools.
I don't care for JAXB too much. I would skip it and go right to the JAX-RPC spec (WebServices). -
Pass an event to outside nested iview (Flex 2.0)
Dear all,
As per note 1124906, the new Flex engine permit pass an event raised inside a nested iview to the outside iview.
I just installed the SP 14, PL 1 and I couldn't find how to use this feature.
Someone could help me?
Thanks.
Note 1124906:
New Visual Composer features for Flex 2.0, enabled by this patch, include:
Signal Names as Events: If you are working with nested iViews in a Flex-based model, you can use Out signals within the nested iView to expose EPCM events external to the nested iView, elsewhere in the same model. These signals can trigger transitions between layers and/or trigger events when received by the complementary In signals.I've found the problem:
I forgot to select the correct compiler (FLEX 2) under Options menu.
Select the correct compiler and it will work fine
Regards,
Alessandro. -
Flex not marshalling a nested structure correctly
<complexType name="A">
<sequence>
<element name="attrs" type="string" nillable="true"
minOccurs="0" maxOccurs="unbounded"/>
<element name="rels" type="tns:A" nillable="true"
minOccurs="0" maxOccurs="unbounded"/>
<element name="relName" type="string" />
</sequence>
</complexType>
Above is the xsd snippet of my webService operation.
Operation has one of the parameters of type A (above). On the flex
side, I have an action script class B that has get/set functions
for attrs, rels and relName. When I use an instance of this type as
a parameter to the webService operation in flex, it sends only
attrs and relName in the SOAPBody.
I also tried adding following function in class B and using
generic object one gets from extractObject function.
B
public function extractObject()
Object obj = new Object();
obj.attrs = attrs;
obj.relName = relName;
var relsArray:Array = relsArray = new Array();
for each(rel in rels)
relsArray.push(rel.extractObject());
obj.rels = relsArray;
Just one other weird behavior is following: Instead of
programatically getting the generic object
if I hardcode the steps to generate the Object instance,
webservice call works fine.
Something like
var o:Object = new Object();
o.attrs = attrs;
o.relName = "xyz";
var relsArray:Array = new Array();
var rel:Object = new Object();
rel.attrs = relAttrs;
rel.relName = "A";
relsArray.push(rel);
o.rels = relsArray;
Strangely enough, this works perfectly fine. The same when we
do it using the method function extractObject, doesnt work.
Can anyone please suggest a good way of handling nested data
structures in a webservice call?I had a similar problem. I've tried using ObjectProxy instead
of Object. It helped in some cases. Also, here is a livedocs
chapter that describes a couple of other options:
Using custom web service serialization
http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_6.html
- Mykola
Maybe you are looking for
-
Problem while running forms in the application server
Hai, My forms were developed using oracle 10g in Windows platform.I have to deploy it in the LINUX application server 10g.I compiled all the forms at AS.One of my form calls another form and it passes parameters to other form.During development I gav
-
In an effort to restore my iPad with iTunes on a computer that is not synced to my iPad, it tells me that I must have the passcode, which I do not remember. What do I do now?
-
hello. I am using Lumia 930. I did a reset of my device after which I get error message when I try to download music. I can listen to online mixes but not able to download. Before resting the device everything was perfect. I do have a valid subscript
-
Labview 2013 executable works only on develoment machine?
Hi all I created an executable so as to distribute my test software but it only runs on the development machine. I have successfully distributed my executables before with labview 2012 on target machines by simply creating the .exe in project explore
-
Image Space Problems with Dreamweaver 8
I am having a bad issue with Dreamweaver 8 on Mac OS 10.4.8. It concerns images that have an assigned horizontal spacer of say, 4 pixels. The images have a CSS class assigned to them that adds a 5 pixel black border. In previous Dreamweaver versions,