Yeah, I see your issues.  I haven't needed to work with trees yet,
so I wish you good luck. :)

Tim

--- In [email protected], Graham Weldon <[EMAIL PROTECTED]>
wrote:
>
> Hi Tim,
>
> I can refresh the XMLListCollection with a "TreeDataCommand". This
> contacts the server and requests a full tree XML, which is then
> converted to a new XMLListCollection. If I use this method, the
tree
> collapses to its initial state, which is undesirable.
>
> addChildAt() is the method I have been trying to use. This
requires that
> I recurse through the XML tree, looking for an element "id"
matching the
> "parentId" from the addition command. This is somewhat cumbersome,
and I
> have as yet not created a working solution for this.
>
> Still poking away at it, and taking suggestions.
>
> Regards,
> Graham Weldon
>
>
> Tim Hoff wrote:
>
> > I would think that if you don't want to replicate the server-side
> > logic, you could just refresh the XMLListCollection data (new
call)
> > after the insertion has occured.  The binding would update the
> > view.  If you are using the view to allow an insertion point, you
> > would have to use addChildAt().
> >
> > -TH
> >
> > --- In [email protected], Graham Weldon <graham.weldon@>
> > wrote:
> > >
> > > Hi all,
> > >
> > > I'm messing with Cairngorm 2.0 beta, and Flex 2.0 beta 3. I've
got
> > a
> > > <mx:Tree /> that contains a structured set of data. This data
can
> > be
> > > subjected to an insert at any point. I have correctly setup the
> > events,
> > > commands and delegate to deal with the insertion, and I process
> > the
> > > logical insertion on the server side of this application
without
> > issues.
> > > The trouble I am having now is the graphical insertion of the
new
> > item
> > > into the existing model.
> > >
> > > Currently the data is XML based. The Tree is directly data
bound
> > to an
> > > XMLListCollection object.
> > >
> > > One thought I had was to model the entire tree as
ValueObjects, so
> > that
> > > I could traverse the tree and 'addChild()' where necessary, but
> > this
> > > would be a complete replication of my Server-Side java code on
the
> > > client side, just for insertion. Additionally, I am not sure
how i
> > would
> > > use a complex set of chained Value Objects as a data source
for a
> > Tree
> > > GUI component.
> > >
> > > Any information about this would be really helpful. I
appreciate
> > any advice.
> > >
> > > I can display the tree correctly, I can use information from
the
> > > selected item to perform operations etc. I am interested in
> > inserting a
> > > new item at a specified location. For example, a request to
insert
> > an
> > > item will result in XML data describing the insert:
> > >
> > > Regards,
> > > Graham Weldon.
> > >
> > >
> > >
> > > ========
> > > XML Tree INSERTION data Sample
> > > --------
> > >
> > > <command action="" success="true">
> > >     <addTreeItem parent="123">
> > >         <element label="NEWitem" id="9999"/>
> > >     </addTreeItem>
> > >     <addTreeItem parent="380">
> > >         <element label="deepItem" id="12"/>
> > >     </addTreeItem>
> > > </command>
> > >
> > > ========
> > >
> > >
> > > ========
> > > XML Tree Data Sample
> > > --------
> > >
> > > <tree>
> > >     <element label="one" id="123"/>
> > >     <element label="two" id="122"/>
> > >     <element label="eight" id="897">
> > >         <element label="hello" id="113"/>
> > >         <element label="world" id="198">
> > >             <element label="thing" id="380"/>
> > >         </element>
> > >     </element>
> > > </tree>
> > >
> > > ========
> > >
> > >
> > > ========
> > > ModelLocator
> > > --------
> > > ... snip ...
> > >
> > > public var myTreeData : XMLListCollection = new
XMLListCollection
> > ();
> > >
> > > ... snip ...
> > > ========
> > >
> > >
> > > ========
> > > Application.mxml
> > > --------
> > > ... snip ...
> > >
> > > <myComponents:TreeComponent
> > >     dataProvider="{ModelLocator.myTreeData}"/>
> > >
> > > ... snip ...
> > > ========
> > >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> >
> >
> >
> > SPONSORED LINKS
> > Web site design development
> > <http://groups.yahoo.com/gads?
t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=
Computer+software+development&w3=Software+design+and+development&w4=M
acromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L
-4QTvxB_quFDtMyhrQaHQ>
> >       Computer software development
> > <http://groups.yahoo.com/gads?
t=ms&k=Computer+software+development&w1=Web+site+design+development&w
2=Computer+software+development&w3=Software+design+and+development&w4
=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig
=lvQjSRfQDfWudJSe1lLjHw>
> >       Software design and development
> > <http://groups.yahoo.com/gads?
t=ms&k=Software+design+and+development&w1=Web+site+design+development
&w2=Computer+software+development&w3=Software+design+and+development&
w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.s
ig=1pMBCdo3DsJbuU9AEmO1oQ>
> >
> > Macromedia flex
> > <http://groups.yahoo.com/gads?
t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+sof
tware+development&w3=Software+design+and+development&w4=Macromedia+fl
ex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZ
I36cYzBjw>
> >       Software development best practice
> > <http://groups.yahoo.com/gads?
t=ms&k=Software+development+best+practice&w1=Web+site+design+developm
ent&w2=Computer+software+development&w3=Software+design+and+developme
nt&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166
&.sig=f89quyyulIDsnABLD6IXIw>
> >
> >
> >
> > -----------------------------------------------------------------
-------
> > YAHOO! GROUPS LINKS
> >
> >     *  Visit your group "flexcoders
> >       <http://groups.yahoo.com/group/flexcoders>" on the web.
> >       
> >     *  To unsubscribe from this group, send an email to:
> >        [EMAIL PROTECTED]
> >       <mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
> >       
> >     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms
of
> >       Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > -----------------------------------------------------------------
-------
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to