Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » ViewPart vs. EditorPart
ViewPart vs. EditorPart [message #436749] Fri, 16 September 2005 20:03 Go to next message
James Leotta is currently offline James LeottaFriend
Messages: 202
Registered: July 2009
Senior Member
Hello,

I am building a client/server app and have widgets like textfields,
check boxes, comboboxes etc. I am indecisive whether to use an
EditorPart or a ViewPart. I am using an oodb on the backend and a
project called EssentialData that directly binds my widgets to my
persistable objects.

What I am trying to accomplish is to ask the user if anychanges were
made whether they want to save them or not.

ie Class Client{
String name;
getName();
setName();
}

Class Part{

private Text nameText;

createpart{
create the gui ...

POJOAdapter pojoClient = new POJOAdapter().add(new
POJOFieldAdapter(nameText,"name");
pojoClient.setInput(new Client());

}
}

Any changes to the text field are automatically stored in my client
object. I can ask the POJOAdapter if it isDirty();

Can the EditorPart and IEditorInput be adapted to utilize the above
scenario or should I stick with Viewpart and implement all the stuff
that seems to be available in EditorPart.

Any opinions or (Sample Code) would be greatly appreciated.


Thanks all.
Re: ViewPart vs. EditorPart [message #436751 is a reply to message #436749] Fri, 16 September 2005 23:11 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Choose EditorPart
ViewPart haven't save/close feature
James Leotta wrote:

> Hello,
>
> I am building a client/server app and have widgets like textfields,
> check boxes, comboboxes etc. I am indecisive whether to use an
> EditorPart or a ViewPart. I am using an oodb on the backend and a
> project called EssentialData that directly binds my widgets to my
> persistable objects.
>
> What I am trying to accomplish is to ask the user if anychanges were
> made whether they want to save them or not.
>
> ie Class Client{
> String name;
> getName();
> setName();
> }
>
> Class Part{
>
> private Text nameText;
>
> createpart{
> create the gui ...
>
> POJOAdapter pojoClient = new POJOAdapter().add(new
> POJOFieldAdapter(nameText,"name");
> pojoClient.setInput(new Client());
>
> }
> }
>
> Any changes to the text field are automatically stored in my client
> object. I can ask the POJOAdapter if it isDirty();
>
> Can the EditorPart and IEditorInput be adapted to utilize the above
> scenario or should I stick with Viewpart and implement all the stuff
> that seems to be available in EditorPart.
>
> Any opinions or (Sample Code) would be greatly appreciated.
>
>
> Thanks all.
Previous Topic:Creating a detached view at startup
Next Topic:How to Computer Build Path?
Goto Forum:
  


Current Time: Mon Dec 09 04:19:54 GMT 2024

Powered by FUDForum. Page generated in 0.03377 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top