Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:10:03+00:00 2026-06-13T05:10:03+00:00

This is an edited version of a question that I had previously asked (and

  • 0

This is an edited version of a question that I had previously asked (and that tbroyer answered) about why the isDirty() method didn’t return true after attempting to modify the Editor version of an entity. I think that my understanding of the RequestFactory/EditorDriver handling of entities is the issue, and that the isDirty() question was a red herring. I’ve left my original question at the end of this question, but my new question is:

How can the entity (proxy) that is being edited by an EditorDriver be modified in code? Obviously values will be changed as a result of changes in the user interface; but I don’t know how to change values ‘behind the scenes’. My understanding is that the call to EditorDriver.edit() will create a copy of the proxy object, and that subsequently any changes to that copy will be applied to the original object using EditorDriver.flush(). But EditorDriver.edit() does not return a reference to the object that is being edited (unlike RequestContext.edit(), which does return a reference to the object being edited).

The original (ill-informed) question:

I don’t understand why the EditorDriver.isDirty() method is not returning true in the following situation (the following onOrgSelectedEvent() method is invoked when a new Org has been selected from a listbox):

private IOrgProxy _org;
...
/**
 * Loads the currently selected Org into the editor. 
 */
@Override
public void onOrgSelectedEvent(final OrgSelectedEvent orgSelectedEvent) {
  IOrgProxy org = _clientFactory.getCache().getOrgCache().getOrg(orgSelectedEvent.getOrgId());
  _orgRequestContext = _clientFactory.getRequestFactory().newOrgRequestContext();
  _org = _orgRequestContext.edit(org);
  _orgEditorDriver.edit(_org, _orgRequestContext);
  _org.setName(_org.getName() + " (edit)");
  if (_orgEditorDriver.isDirty()) {
    _org.setName(org.getName());
  }
}

When I put breakpoints on the setName() calls I see that the first call changes the name in the editable Org object, but the second setName() call is never reached (i.e., _orgEditorDriver.isDirty() returns false).

Just as a side question, it seems strange to me that the EditorDriver.edit() method doesn’t return the editable proxy object, and that I have to call RequestContext.edit(), but that’s a very minor issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:10:05+00:00Added an answer on June 13, 2026 at 5:10 am

    Why would isDirty be true just after edit? Clearly the user hasn’t be given the time to do any change.

    isDirty compares the current value of the subeditors to their original value, it doesn’t care whether the object changed: if you lend the object to the editor, you implicitly gives it control over the edited object (for the edited properties).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I edited this question after i found a solution... i need to understand why
I've edited this quite a bit and bolded my question at this point. I
Edited Question: This should be clear. using System; namespace UpdateDateTimeFields { class Program {
Warning: This question has been heavily edited. I tried my best to guess the
NB: This question has been extensively edited to make it more relevant, for completeness
I have this code that I've edited: http://pastebin.com/vrqHek6S I've put in comments where I
I've heavily edited this question because responses indicated I wasn't being clear problem: UI
(This question is about the best way to temporarily and programatically keep new records
EDIT: Based on evolution of the problem, I edited this question. First of all,
This is my edited previous question for line breaks before the preserve space elements.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.