Re: audit trails display

2014-11-16 Thread Fabian Peters

Am 15.11.2014 um 19:17 schrieb Theodore Petrosky tedp...@yahoo.com:

 couple of things. Is there a component to display newValues when the 
 type.name is “Inserted i.e.:
 
 { releaseDate = 2014-11-14 05:00:00 Etc/GMT; width = 728; height = 
 90; current = true; description = sfgsdfgsd; company = 
 Company.3; theInsertion = ERFileAttachment.4; jobNumber = 1222; }

I don't have a component for that and I don't think that one exists in Wonder.

 and you reference ELD2WDisplayLocalizedString extends ERD2WDisplayString and 
 localizes the property value.
 
 Is that a component you created?

Yes.

 I guess the issue of the newValues component, is that I need one component if 
 the object is newly created and then just the string value if it is a change.

You could probably make one component flexible enough to handle both cases.

Fabian

 Ted
 
 On Nov 15, 2014, at 6:46 AM, Fabian Peters lists.fab...@e-lumo.com wrote:
 
 Hi Ted,
 
 Am 15.11.2014 um 03:31 schrieb Theodore Petrosky tedp...@yahoo.com:
 
 I have just started implementing ERCoreBusinessLogic’s AuditTrails. This is 
 really good stuff. However, I had to ‘fix’ a boolean.
 
 In the migration of ERCoreBusinessLogic I see:
 
   ERXMigrationTable eRCAuditTrailTable = 
 database.newTableNamed(ERCAuditTrail);
   eRCAuditTrailTable.newStringColumn(GID, 255, ALLOWS_NULL);
   eRCAuditTrailTable.newIntegerColumn(ID, NOT_NULL);
   eRCAuditTrailTable.newIntBooleanColumn(IS_DELETED, NOT_NULL);
   eRCAuditTrailTable.create();
   eRCAuditTrailTable.setPrimaryKey(ID”);
 
 In my postgresql backend, is_deleted is added as an integer column. So I 
 had to run a migration of my own:
 
 ERXMigrationTable auditTrailTable = 
 database.existingTableNamed(ercaudittrail);
 
 auditTrailTable.existingColumnNamed(is_deleted).delete();
 auditTrailTable.newFlagBooleanColumn(is_deleted, false);
 
 Is there a setting I can use to make the ERCoreBusinessLogic’s migration 
 create a boolean column?
 
 I don't think so. I've created additional migrations for some of 
 ERCoreBusinessLogic, to change booleans and increase column sizes of 
 ERCMAIL_MESSAG.
 
 Are there any Wonder components for displaying ercaudittrailentry data? I 
 see when I insert a new entiry:
 
 {
 releaseDate = 2014-11-14 05:00:00 Etc/GMT; 
 width = 728;
 height = 90;
 current = true;
 description = sfgsdfgsd;
 company = Company.3;
 theInsertion = ERFileAttachment.4;
 jobNumber = 1222;
 }
 
 Do I need to process this to display it? I see that toOne relations are 
 listed Person.1. I was looking for components to display this. I don’t mind 
 processing, but maybe there are components that could help.
 
 There probably won't be a one size fits all solution. You can access an 
 EO's audit trail via:
 
public ERCAuditTrail auditTrail() {
return ERCAuditTrail.clazz.auditTrailForObject(editingContext(), 
 this);
}
 
 And here are some sample rules for a product audit trail that tracks 
 inventory and price changes:
 
 40 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'created') = 
 formatter = %Y-%m-%d %H:%M [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'keyPath') = 
 componentName = ELD2WDisplayLocalizedString 
 [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'type.name') = 
 componentName = ELD2WDisplayLocalizedString 
 [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'Product' and propertyKey = 'auditTrail.entries') = 
 componentName = ERDList [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'Product' and propertyKey = 'auditTrail.entries') = 
 listConfigurationName = ListEmbeddedERCAuditTrailEntry 
 [com.webobjects.directtoweb.Assignment]
 100 : pageConfiguration = 'ListEmbeddedERCAuditTrailEntry' = 
 defaultSortOrdering = (created, compareDescending) 
 [com.webobjects.directtoweb.Assignment]
 120 : pageConfiguration = 'ListEmbeddedERCAuditTrailEntry' = 
 displayPropertyKeys = (created, type.name, keyPath, oldValues, 
 newValues, user.fullName) [com.webobjects.directtoweb.Assignment]
 
 ELD2WDisplayLocalizedString extends ERD2WDisplayString and localizes the 
 property value.
 
 Fabian
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
 
 This email sent to lists.fab...@e-lumo.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This 

Re: audit trails display

2014-11-15 Thread Fabian Peters
Hi Ted,

Am 15.11.2014 um 03:31 schrieb Theodore Petrosky tedp...@yahoo.com:

 I have just started implementing ERCoreBusinessLogic’s AuditTrails. This is 
 really good stuff. However, I had to ‘fix’ a boolean.
 
 In the migration of ERCoreBusinessLogic I see:
 
ERXMigrationTable eRCAuditTrailTable = 
 database.newTableNamed(ERCAuditTrail);
eRCAuditTrailTable.newStringColumn(GID, 255, ALLOWS_NULL);
eRCAuditTrailTable.newIntegerColumn(ID, NOT_NULL);
eRCAuditTrailTable.newIntBooleanColumn(IS_DELETED, NOT_NULL);
eRCAuditTrailTable.create();
eRCAuditTrailTable.setPrimaryKey(ID”);
 
 In my postgresql backend, is_deleted is added as an integer column. So I had 
 to run a migration of my own:
 
   ERXMigrationTable auditTrailTable = 
 database.existingTableNamed(ercaudittrail);
   
   auditTrailTable.existingColumnNamed(is_deleted).delete();
   auditTrailTable.newFlagBooleanColumn(is_deleted, false);
 
 Is there a setting I can use to make the ERCoreBusinessLogic’s migration 
 create a boolean column?

I don't think so. I've created additional migrations for some of 
ERCoreBusinessLogic, to change booleans and increase column sizes of 
ERCMAIL_MESSAG.

 Are there any Wonder components for displaying ercaudittrailentry data? I see 
 when I insert a new entiry:
 
 {  
 releaseDate = 2014-11-14 05:00:00 Etc/GMT; 
 width = 728;
 height = 90;
 current = true;
 description = sfgsdfgsd;
 company = Company.3;
 theInsertion = ERFileAttachment.4;
 jobNumber = 1222;
 }
 
 Do I need to process this to display it? I see that toOne relations are 
 listed Person.1. I was looking for components to display this. I don’t mind 
 processing, but maybe there are components that could help.

There probably won't be a one size fits all solution. You can access an EO's 
audit trail via:

public ERCAuditTrail auditTrail() {
return ERCAuditTrail.clazz.auditTrailForObject(editingContext(), this);
}

And here are some sample rules for a product audit trail that tracks inventory 
and price changes:

40 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'created') = 
formatter = %Y-%m-%d %H:%M [com.webobjects.directtoweb.Assignment]
100 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'keyPath') = 
componentName = ELD2WDisplayLocalizedString 
[com.webobjects.directtoweb.Assignment]
100 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'type.name') = 
componentName = ELD2WDisplayLocalizedString 
[com.webobjects.directtoweb.Assignment]
100 : (entity.name = 'Product' and propertyKey = 'auditTrail.entries') = 
componentName = ERDList [com.webobjects.directtoweb.Assignment]
100 : (entity.name = 'Product' and propertyKey = 'auditTrail.entries') = 
listConfigurationName = ListEmbeddedERCAuditTrailEntry 
[com.webobjects.directtoweb.Assignment]
100 : pageConfiguration = 'ListEmbeddedERCAuditTrailEntry' = 
defaultSortOrdering = (created, compareDescending) 
[com.webobjects.directtoweb.Assignment]
120 : pageConfiguration = 'ListEmbeddedERCAuditTrailEntry' = 
displayPropertyKeys = (created, type.name, keyPath, oldValues, 
newValues, user.fullName) [com.webobjects.directtoweb.Assignment]

ELD2WDisplayLocalizedString extends ERD2WDisplayString and localizes the 
property value.

Fabian

 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
 
 This email sent to lists.fab...@e-lumo.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: audit trails display

2014-11-15 Thread Theodore Petrosky
couple of things. Is there a component to display newValues when the type.name 
is “Inserted i.e.:

{ releaseDate = 2014-11-14 05:00:00 Etc/GMT; width = 728; height = 
90; current = true; description = sfgsdfgsd; company = Company.3; 
theInsertion = ERFileAttachment.4; jobNumber = 1222; }

and you reference ELD2WDisplayLocalizedString extends ERD2WDisplayString and 
localizes the property value.

Is that a component you created?

I guess the issue of the newValues component, is that I need one component if 
the object is newly created and then just the string value if it is a change.

Ted

On Nov 15, 2014, at 6:46 AM, Fabian Peters lists.fab...@e-lumo.com wrote:

 Hi Ted,
 
 Am 15.11.2014 um 03:31 schrieb Theodore Petrosky tedp...@yahoo.com:
 
 I have just started implementing ERCoreBusinessLogic’s AuditTrails. This is 
 really good stuff. However, I had to ‘fix’ a boolean.
 
 In the migration of ERCoreBusinessLogic I see:
 
   ERXMigrationTable eRCAuditTrailTable = 
 database.newTableNamed(ERCAuditTrail);
   eRCAuditTrailTable.newStringColumn(GID, 255, ALLOWS_NULL);
   eRCAuditTrailTable.newIntegerColumn(ID, NOT_NULL);
   eRCAuditTrailTable.newIntBooleanColumn(IS_DELETED, NOT_NULL);
   eRCAuditTrailTable.create();
   eRCAuditTrailTable.setPrimaryKey(ID”);
 
 In my postgresql backend, is_deleted is added as an integer column. So I had 
 to run a migration of my own:
 
  ERXMigrationTable auditTrailTable = 
 database.existingTableNamed(ercaudittrail);
  
  auditTrailTable.existingColumnNamed(is_deleted).delete();
  auditTrailTable.newFlagBooleanColumn(is_deleted, false);
 
 Is there a setting I can use to make the ERCoreBusinessLogic’s migration 
 create a boolean column?
 
 I don't think so. I've created additional migrations for some of 
 ERCoreBusinessLogic, to change booleans and increase column sizes of 
 ERCMAIL_MESSAG.
 
 Are there any Wonder components for displaying ercaudittrailentry data? I 
 see when I insert a new entiry:
 
 { 
 releaseDate = 2014-11-14 05:00:00 Etc/GMT; 
 width = 728;
 height = 90;
 current = true;
 description = sfgsdfgsd;
 company = Company.3;
 theInsertion = ERFileAttachment.4;
 jobNumber = 1222;
 }
 
 Do I need to process this to display it? I see that toOne relations are 
 listed Person.1. I was looking for components to display this. I don’t mind 
 processing, but maybe there are components that could help.
 
 There probably won't be a one size fits all solution. You can access an 
 EO's audit trail via:
 
public ERCAuditTrail auditTrail() {
return ERCAuditTrail.clazz.auditTrailForObject(editingContext(), this);
}
 
 And here are some sample rules for a product audit trail that tracks 
 inventory and price changes:
 
 40 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'created') = 
 formatter = %Y-%m-%d %H:%M [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'keyPath') = 
 componentName = ELD2WDisplayLocalizedString 
 [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'ERCAuditTrailEntry' and propertyKey = 'type.name') = 
 componentName = ELD2WDisplayLocalizedString 
 [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'Product' and propertyKey = 'auditTrail.entries') = 
 componentName = ERDList [com.webobjects.directtoweb.Assignment]
 100 : (entity.name = 'Product' and propertyKey = 'auditTrail.entries') = 
 listConfigurationName = ListEmbeddedERCAuditTrailEntry 
 [com.webobjects.directtoweb.Assignment]
 100 : pageConfiguration = 'ListEmbeddedERCAuditTrailEntry' = 
 defaultSortOrdering = (created, compareDescending) 
 [com.webobjects.directtoweb.Assignment]
 120 : pageConfiguration = 'ListEmbeddedERCAuditTrailEntry' = 
 displayPropertyKeys = (created, type.name, keyPath, oldValues, 
 newValues, user.fullName) [com.webobjects.directtoweb.Assignment]
 
 ELD2WDisplayLocalizedString extends ERD2WDisplayString and localizes the 
 property value.
 
 Fabian
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
 
 This email sent to lists.fab...@e-lumo.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

audit trails display

2014-11-14 Thread Theodore Petrosky
I have just started implementing ERCoreBusinessLogic’s AuditTrails. This is 
really good stuff. However, I had to ‘fix’ a boolean.

In the migration of ERCoreBusinessLogic I see:

ERXMigrationTable eRCAuditTrailTable = 
database.newTableNamed(ERCAuditTrail);
eRCAuditTrailTable.newStringColumn(GID, 255, ALLOWS_NULL);
eRCAuditTrailTable.newIntegerColumn(ID, NOT_NULL);
eRCAuditTrailTable.newIntBooleanColumn(IS_DELETED, NOT_NULL);
eRCAuditTrailTable.create();
eRCAuditTrailTable.setPrimaryKey(ID”);

In my postgresql backend, is_deleted is added as an integer column. So I had to 
run a migration of my own:

ERXMigrationTable auditTrailTable = 
database.existingTableNamed(ercaudittrail);

auditTrailTable.existingColumnNamed(is_deleted).delete();
auditTrailTable.newFlagBooleanColumn(is_deleted, false);

Is there a setting I can use to make the ERCoreBusinessLogic’s migration create 
a boolean column?

Are there any Wonder components for displaying ercaudittrailentry data? I see 
when I insert a new entiry:

{
 releaseDate = 2014-11-14 05:00:00 Etc/GMT; 
 width = 728;
 height = 90;
 current = true;
 description = sfgsdfgsd;
 company = Company.3;
 theInsertion = ERFileAttachment.4;
 jobNumber = 1222;
 }

Do I need to process this to display it? I see that toOne relations are listed 
Person.1. I was looking for components to display this. I don’t mind 
processing, but maybe there are components that could help.





 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: audit trails display

2014-11-14 Thread David Holt
Don't think there's anything in Wonder. It has been on my todo list for years.

Sent from my iPad

 On Nov 14, 2014, at 6:31 PM, Theodore Petrosky tedp...@yahoo.com wrote:
 
 I have just started implementing ERCoreBusinessLogic’s AuditTrails. This is 
 really good stuff. However, I had to ‘fix’ a boolean.
 
 In the migration of ERCoreBusinessLogic I see:
 
ERXMigrationTable eRCAuditTrailTable = 
 database.newTableNamed(ERCAuditTrail);
eRCAuditTrailTable.newStringColumn(GID, 255, ALLOWS_NULL);
eRCAuditTrailTable.newIntegerColumn(ID, NOT_NULL);
eRCAuditTrailTable.newIntBooleanColumn(IS_DELETED, NOT_NULL);
eRCAuditTrailTable.create();
eRCAuditTrailTable.setPrimaryKey(ID”);
 
 In my postgresql backend, is_deleted is added as an integer column. So I had 
 to run a migration of my own:
 
ERXMigrationTable auditTrailTable = 
 database.existingTableNamed(ercaudittrail);

auditTrailTable.existingColumnNamed(is_deleted).delete();
auditTrailTable.newFlagBooleanColumn(is_deleted, false);
 
 Is there a setting I can use to make the ERCoreBusinessLogic’s migration 
 create a boolean column?
 
 Are there any Wonder components for displaying ercaudittrailentry data? I see 
 when I insert a new entiry:
 
 { 
 releaseDate = 2014-11-14 05:00:00 Etc/GMT; 
 width = 728;
 height = 90;
 current = true;
 description = sfgsdfgsd;
 company = Company.3;
 theInsertion = ERFileAttachment.4;
 jobNumber = 1222;
 }
 
 Do I need to process this to display it? I see that toOne relations are 
 listed Person.1. I was looking for components to display this. I don’t mind 
 processing, but maybe there are components that could help.
 
 
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
 
 This email sent to programming...@mac.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com