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();
Trackbacks
[...] 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 [...]
[...] 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 [...]