Share data between XWT instances ? [message #535531] |
Mon, 24 May 2010 09:37 |
A. Boughlam Messages: 14 Registered: May 2010 |
Junior Member |
|
|
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.
Best Regards,
A. Boughlam
|
|
|
|
Re: Share data between XWT instances ? [message #535891 is a reply to message #535811] |
Wed, 26 May 2010 08:44 |
A. Boughlam Messages: 14 Registered: May 2010 |
Junior Member |
|
|
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
Best Regards,
A. Boughlam
|
|
|
Re: Share data between XWT instances ? [message #536027 is a reply to message #535891] |
Wed, 26 May 2010 16:32 |
Yves YANG Messages: 688 Registered: July 2009 |
Senior Member |
|
|
OK, I understood better your request.
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
|
|
|
Re: Share data between XWT instances ? [message #576777 is a reply to message #535811] |
Wed, 26 May 2010 08:44 |
Eclipse User |
|
|
|
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
|
|
|
Re: Share data between XWT instances ? [message #576790 is a reply to message #576777] |
Wed, 26 May 2010 16:32 |
Yves YANG Messages: 688 Registered: July 2009 |
Senior Member |
|
|
OK, I understood better your request.
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
|
|
|
Powered by
FUDForum. Page generated in 0.03745 seconds