Default values of content class elements are returned automatically

Quite often I use a default value in content class elements. Unfortunately the MS did not display it to the author and therefore are not returned automatically via RQL.

Because I feel uncomfortable with it, I added this feature to jRQL. All sub classes of Element (means all StandardField types, Image, Media and OptionList) and text elements return automatically and completely transparent the default value of the underlaying content class element.

Means that all get*Value methods are returning the default value from content class element without any effort for you.

You can find out if on the page a value was entered or the default value is returned ask the Element with one of the methods:

currentPg.getOptionList("content class element name").isEmpty();
currentPg.getOptionList("content class element name").hasTemplateDefaultValue();
currentPg.getOptionList("content class element name").isValueEntered();

Advertisements
Post a comment or leave a trackback: Trackback URL.

Trackbacks

  • By Editing images « OpenText Management Server API jRQL on 18. November 2009 at 12:49 pm

    […] a value. What is the difference you might ask. Because for every access of a value (=filename) jRQL always return the default value from the content class element. Therefore it can be empty (no default value and no image choosen), can have a default value or an […]

  • By Editing texts « OpenText Management Server API jRQL on 18. November 2009 at 9:29 pm

    […] some basic check methods if a value is entered by an user or the text element did not have a value. jRQL always returns the default value from the content class element automatically, if […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: