View Full Version : WebProperty for DataDictionaries (DD)

12-Feb-2014, 04:10 PM

It would great to be able to declare a DD property as being WebProperty=True

For example:

Class Order_DataDictionary is a DataDictionary

Procedure Construct_object
Forward Send Construct_object

{ WebProperty=True }
Property String psCurrent_Brch ""



This way DD properties can be used in WEBAPPS as per WINAPPS, without the need to declare duplicate “proxy” properties in webviews just to sync the DD properties.

Seeing that the DD is already syncing its RowID – this could be the next step.

But, I guess the main problem with a web-enabled DD is how will be it behave in WINAPPS.

Here's my 2 cents:

The compiler should disregard the {WebProperty=True} if the application NOT IS$WEBAPP
The WebSet and WebGet command should check if the application IS$WEBAPP, if not then just do a Set or Get instead.

This fundamental change will ensure that DDs are UI independent - irrespective of whether it’s running under a WinApp or WebApp.

Food for thought.

12-Feb-2014, 04:22 PM
Would it not be better if it would be available in Windows apps as well and not ignored. And now that I think about it would this not just work currently anyway?

12-Feb-2014, 04:38 PM
Hi Chuck,

Would it not be better if it would be available in Windows apps as well and not ignored

Hmmm... that's an interesting point. Could you please elaborate?

Setting a DD Property or any property as "WebProperty=True" within the WINAPP scope generates a complication error.

12-Feb-2014, 04:41 PM
I hadn't actually tried it, it was just a guess. But if you don't set the property in a WINAPP program can you webset it in a WAF project? It compiles okay right?

12-Feb-2014, 04:46 PM
Hi Chuck,

1. If a Property is NOT set as "WebProperty=True" - WebSet/WebGet will generate errors within WAF.
2. Using WebSet/WebGet within WINAPP will generate compilation errors.


12-Feb-2014, 05:18 PM
True - my question is can you declare as WebProperty in the DD class and use webset/get in WAF. I would not expect it to work in WINAPPS. That was your suggestion, that you could GET/SET in Windows apps?

12-Feb-2014, 05:25 PM
Hi Chuck,

Nope! You can't declare a property as a WebProperty in the DD. Doing so will generate a Runtime error in a WEBAPP.

13-Feb-2014, 03:10 PM
Interesting ! This makes your suggestion even more important. I had not actually considered putting webproperties in a DD so now I know I can't and won't try this ;)

John van Houten
16-Feb-2014, 03:16 PM

Only Web Objects (objects based on cWebObject or above) support web properties. This is because only web objects are designed to be instantiated at the client and the purpose of that is to instantiate a view's user interface at the client. Data Dictionaries are a special case in a web application. They are iterated and their current RowID's are passed to/from the client, but not as web properties. Some sort of persistence of other data dictionary attributes might be considered in the future but this needs to be studied carefully.

regards John van Houten