JGraph > Tutorial > Update user

The following example shows two different ways how to update user (or any other item). In first case (solution1) we create new User object (updateUser) and set only properties we want to update (JobTitle) and also set the Id property with the same value of Id property as User object we want to update. The method updateUser updates only changed properties (JobTitle). In the second case (solution2) we change directly properties on the existing user object (alice) and with parameter updatePropertyNameList we tell the method updateUser which properties to update.