Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsShare data between XWT instances ?
https://www.eclipse.org/forums/index.php/mv/msg/168726/535531/#msg_535531
My question is : How can I access to another XWT instance ?
For example If I have a 'People.xwt' view with a list of persons and a button 'Add'. If I click on 'Add' it instanciate a 'Person' object and open a 'Person.xwt' view for editing. How can i add this 'Person' object to the list of persons in the people view ?
Thanks in advance.
A. Boughlam.]]>A. Boughlam2010-05-24T09:37:48-00:00Re: Share data between XWT instances ?
https://www.eclipse.org/forums/index.php/mv/msg/168726/535811/#msg_535811
list of persons..
Regards
Yves YANG
"A. Boughlam" <a.boughlam@netfective.ma> wrote in message
news:htdhdd$ahh$1@build.eclipse.org...
> Hi everyone,
>
> My question is : How can I access to another XWT instance ? For example If
> I have a 'People.xwt' view with a list of persons and a button 'Add'. If
> I click on 'Add' it instanciate a 'Person' object and open a 'Person.xwt'
> view for editing. How can i add this 'Person' object to the list of
> persons in the people view ?
> Thanks in advance.
>
> A. Boughlam.]]>Yves YANG2010-05-25T18:10:50-00:00Re: Share data between XWT instances ?
https://www.eclipse.org/forums/index.php/mv/msg/168726/535891/#msg_535891
What I need to know is how to access to an element in another xwt file ? The 'findElementByName' method work only in the current file (it returns null otherwise).
Best regards, and great work by the way Yves.
A. Boughlam ]]>A. Boughlam2010-05-26T08:44:25-00:00Re: Share data between XWT instances ?
https://www.eclipse.org/forums/index.php/mv/msg/168726/576777/#msg_576777
Originally posted by: a.boughlam.netfective.ma
Thanks for your response but perhaps I didn't express myself adequately (the 'people' example is just what i had in mind at that time).
What I need to know is how to access to an element in another xwt file ? The 'findElementByName' method work only in the current file (it returns null otherwise).
Best regards, and great work by the way Yves.
A. Boughlam]]>2010-05-26T08:44:26-00:00Re: Share data between XWT instances ?
https://www.eclipse.org/forums/index.php/mv/msg/168726/576790/#msg_576790
In XWT, there is a concept of the name scope management. A scope corresponds
to a resource file. The name scope maanger is hold by the root UI element of
each resource. A name must be unique in the scope. The 'findElementByName'
uses the context widget to file the current name scope maanger, if the name
doesn't exist in this scope manager, the search will continue in the parent
of the name scope maanger.
Let's say we have two XWT files A and B. A embeds B. If you have the
context widget in A, you can use 'findElementByName' to find only the UI
element in A, not inside B. If you want find an element in B, you need first
to find the container of B and use the B (or probably its child) as the
context widget to find the nested element. Be frankly, we have not written a
testcase, I just give the concept. Please let me know if it works. I
appreciate if you can contribute this testcase.
Best regards
Yves YANG
"A. Boughlam" <a.boughlam@netfective.ma> wrote in message
news:htin1b$259$1@build.eclipse.org...
> Thanks for your response but perhaps I didn't express myself adequately
> (the 'people' example is just what i had in mind at that time). What I
> need to know is how to access to an element in another xwt file ? The
> 'findElementByName' method work only in the current file (it returns null
> otherwise).
>
> Best regards, and great work by the way Yves.
> A. Boughlam]]>Yves YANG2010-05-26T16:32:24-00:00Re: Share data between XWT instances ?
https://www.eclipse.org/forums/index.php/mv/msg/168726/536027/#msg_536027
In XWT, there is a concept of the name scope management. A scope corresponds
to a resource file. The name scope maanger is hold by the root UI element of
each resource. A name must be unique in the scope. The 'findElementByName'
uses the context widget to file the current name scope maanger, if the name
doesn't exist in this scope manager, the search will continue in the parent
of the name scope maanger.
Let's say we have two XWT files A and B. A embeds B. If you have the
context widget in A, you can use 'findElementByName' to find only the UI
element in A, not inside B. If you want find an element in B, you need first
to find the container of B and use the B (or probably its child) as the
context widget to find the nested element. Be frankly, we have not written a
testcase, I just give the concept. Please let me know if it works. I
appreciate if you can contribute this testcase.
Best regards
Yves YANG
"A. Boughlam" <a.boughlam@netfective.ma> wrote in message
news:htin1b$259$1@build.eclipse.org...
> Thanks for your response but perhaps I didn't express myself adequately
> (the 'people' example is just what i had in mind at that time). What I
> need to know is how to access to an element in another xwt file ? The
> 'findElementByName' method work only in the current file (it returns null
> otherwise).
>
> Best regards, and great work by the way Yves.
> A. Boughlam]]>Yves YANG2010-05-26T16:32:24-00:00