use of org.entirej.framework.dev.properties.EJDevPropertyDefinition in project rap by entirej.
the class EJRWTComboBoxRendererDefinition method getItemPropertyDefinitionGroup.
public EJPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Combo Box Renderer");
mainGroup.setDescription("Combo Boxes contain a list of data which is retreved from an Lov Definition. To give your combo boxes static values, create a service tha returns the static data, create an Lov Definition based on this service and then assign the Lov Definition to the Combo Box");
EJDevPropertyDefinition lovDefName = new EJDevPropertyDefinition(LOV_DEFINITION_NAME, EJPropertyDefinitionType.LOV_DEFINITION_WITH_ITEMS);
lovDefName.setLabel("Lov Definition Item Name");
lovDefName.setDescription("The name of the Lov definition that will provide the data that will be displayed within the Combo Box");
lovDefName.setNotifyWhenChanged(true);
EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(DISPLAY_COLUMNS, "Display Columns");
list.setDescription("A Combo Box has a label which the user can see as the selected value and a return value which is the actual value of the item. You can provide a list of columns whos column values will be concatenated together and displayed to the user");
EJDevPropertyDefinition lovItemName = new EJDevPropertyDefinition(COLUMN_NAME, EJPropertyDefinitionType.STRING);
lovItemName.setLabel("Item");
lovItemName.setDescription("The item to display in the Combo Box value");
lovItemName.setLoadValidValuesDynamically(true);
lovItemName.setMandatory(true);
EJDevPropertyDefinition lovDisplayItem = new EJDevPropertyDefinition(COLUMN_DISPLAYED, EJPropertyDefinitionType.BOOLEAN);
lovDisplayItem.setLabel("Displayed");
lovDisplayItem.setDescription("Indicates if the items value will displayed in the combo list or just used for mapping of values");
lovDisplayItem.setDefaultValue("true");
EJDevPropertyDefinition lovItemFormat = new EJDevPropertyDefinition(COLUMN_FORMAT, EJPropertyDefinitionType.STRING);
lovItemFormat.setLabel("Datatype Format");
lovItemFormat.setDescription("You can provide a default formatting option for the items value before it is displayed in the Combo Box. This is most important for Numbers and Dates. EntireJ uses the standard java.text.DecimalFormat and java.text.SimpleDataFormat options (##0.#####E0, yyyy.MM.dd");
EJDevPropertyDefinition returnItem = new EJDevPropertyDefinition(COLUMN_RETURN_ITEM, EJPropertyDefinitionType.BLOCK_ITEM);
returnItem.setLabel("Return Item");
returnItem.setDescription("This value will be set to the given value of the specified item when the user chooses a value from the Combo Box");
list.addPropertyDefinition(lovItemName);
list.addPropertyDefinition(lovDisplayItem);
list.addPropertyDefinition(returnItem);
list.addPropertyDefinition(lovItemFormat);
EJDevPropertyDefinition visibleItemCount = new EJDevPropertyDefinition(VISIBLE_ITEM_COUNT, EJPropertyDefinitionType.INTEGER);
visibleItemCount.setLabel("Visible Item Count");
visibleItemCount.setDescription("Indicates how many values should be displayed when the combo box is opened");
visibleItemCount.setMandatory(false);
visibleItemCount.setDefaultValue("10");
visibleItemCount.setNotifyWhenChanged(true);
EJDevPropertyDefinition autorefreshLov = new EJDevPropertyDefinition(AUTO_REFRESH, EJPropertyDefinitionType.BOOLEAN);
autorefreshLov.setLabel("Auto-Refresh");
autorefreshLov.setDescription("Because Combo Boxes are based upon lov definitions, lov query mapping value changes will auto refresh combo content");
autorefreshLov.setDefaultValue("true");
EJDevPropertyDefinition initialiseLov = new EJDevPropertyDefinition(INITIALIES_LOV, EJPropertyDefinitionType.BOOLEAN);
initialiseLov.setLabel("Populate on creation");
initialiseLov.setDescription("Because Combo Boxes are based upon lov definitions, they need to make a query to be created. Thsi could take time dependin on how many combo boxes you are displaying. You can set the Populate On Creation to false to delay the population of the Combo Box until either the items gets set to a value in the action processor or you request that the item renderer be refreshed");
initialiseLov.setDefaultValue("true");
EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(CSS_KEY, EJPropertyDefinitionType.STRING);
customCSSKey.setLabel("Custom CSS Key");
customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize item look and feel. Please refer to Entirej RWT CSS guide.");
mainGroup.addPropertyDefinition(lovDefName);
mainGroup.addPropertyDefinition(initialiseLov);
mainGroup.addPropertyDefinition(autorefreshLov);
mainGroup.addPropertyDefinitionList(list);
mainGroup.addPropertyDefinition(visibleItemCount);
mainGroup.addPropertyDefinition(customCSSKey);
return mainGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinition in project rap by entirej.
the class EJRWTDateTimeItemRendererDefinition method getItemPropertyDefinitionGroup.
public EJDevPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Date Item Renderer");
EJDevPropertyDefinition type = new EJDevPropertyDefinition(PROPERTY_TYPE, EJPropertyDefinitionType.STRING);
type.setLabel("Type");
type.setDescription("Item Dispaly type");
type.setLoadValidValuesDynamically(true);
type.setNotifyWhenChanged(true);
type.setDefaultValue(PROPERTY_TYPE_DATE);
EJDevPropertyDefinition details = new EJDevPropertyDefinition(PROPERTY_DETAILS, EJPropertyDefinitionType.STRING);
details.setLabel("Details");
details.setDescription("Item Details");
details.setLoadValidValuesDynamically(true);
details.setNotifyWhenChanged(true);
details.setDefaultValue(PROPERTY_DETAILS_MEDIUM);
EJDevPropertyDefinition dropDown = new EJDevPropertyDefinition(PROPERTY_DROP_DOWN, EJPropertyDefinitionType.BOOLEAN);
dropDown.setLabel("Drop Down");
dropDown.setDefaultValue("false");
dropDown.setDescription("Indicates if this item should be displayed selection drop down.");
EJDevPropertyDefinition displayValueAsLabel = new EJDevPropertyDefinition(PROPERTY_DISPLAY_VAUE_AS_LABEL, EJPropertyDefinitionType.BOOLEAN);
displayValueAsLabel.setLabel("Display value as label");
displayValueAsLabel.setDefaultValue("false");
displayValueAsLabel.setDescription("Indicates if this item should be displayed as a label. Items displayed as labels cannot be modified by the user.");
EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(PROPERTY_CSS_KEY, EJPropertyDefinitionType.STRING);
customCSSKey.setLabel("Custom CSS Key");
customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize item look and feel. Please refer to Entirej RWT CSS guide.");
mainGroup.addPropertyDefinition(type);
mainGroup.addPropertyDefinition(details);
mainGroup.addPropertyDefinition(dropDown);
mainGroup.addPropertyDefinition(displayValueAsLabel);
mainGroup.addPropertyDefinition(customCSSKey);
return mainGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinition in project rap by entirej.
the class EJRWTListBoxRendererDefinition method getItemPropertyDefinitionGroup.
public EJPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("List Box Renderer");
mainGroup.setDescription("List Boxes contain a list of data which is retreved from an Lov Definition. To give your list boxes static values, create a service tha returns the static data, create an Lov Definition based on this service and then assign the Lov Definition to the List Box");
EJDevPropertyDefinition lovDefName = new EJDevPropertyDefinition(LOV_DEFINITION_NAME, EJPropertyDefinitionType.LOV_DEFINITION_WITH_ITEMS);
lovDefName.setLabel("Lov Definition Item Name");
lovDefName.setDescription("The name of the Lov definition that will provide the data that will be displayed within the List Box");
lovDefName.setNotifyWhenChanged(true);
EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(DISPLAY_COLUMNS, "Display Columns");
list.setDescription("A List Box has a label which the user can see as the selected value and a return value which is the actual value of the item. You can provide a list of columns whos column values will be concatenated together and displayed to the user");
EJDevPropertyDefinition lovItemName = new EJDevPropertyDefinition(COLUMN_NAME, EJPropertyDefinitionType.STRING);
lovItemName.setLabel("Item");
lovItemName.setDescription("The item to display in the List Box value");
lovItemName.setLoadValidValuesDynamically(true);
lovItemName.setMandatory(true);
EJDevPropertyDefinition filter = new EJDevPropertyDefinition(FILTER, EJPropertyDefinitionType.BOOLEAN);
filter.setLabel("Add Filter");
filter.setDescription("If selected, the renderer will display a filter field above the item data. This filter can then be used by users to filter the item displayed data");
filter.setDefaultValue("false");
filter.setDefaultValue("false");
EJDevPropertyDefinition lovDisplayItem = new EJDevPropertyDefinition(COLUMN_DISPLAYED, EJPropertyDefinitionType.BOOLEAN);
lovDisplayItem.setLabel("Displayed");
lovDisplayItem.setDescription("Indicates if the items value will displayed in the List list or just used for mapping of values");
lovDisplayItem.setDefaultValue("true");
EJDevPropertyDefinition lovItemFormat = new EJDevPropertyDefinition(COLUMN_FORMAT, EJPropertyDefinitionType.STRING);
lovItemFormat.setLabel("Datatype Format");
lovItemFormat.setDescription("You can provide a default formatting option for the items value before it is displayed in the List Box. This is most important for Numbers and Dates. EntireJ uses the standard java.text.DecimalFormat and java.text.SimpleDataFormat options (##0.#####E0, yyyy.MM.dd");
EJDevPropertyDefinition returnItem = new EJDevPropertyDefinition(COLUMN_RETURN_ITEM, EJPropertyDefinitionType.BLOCK_ITEM);
returnItem.setLabel("Return Item");
returnItem.setDescription("This value will be set to the given value of the specified item when the user chooses a value from the List Box");
EJDevPropertyDefinition imageItem = new EJDevPropertyDefinition(COLUMN_IMAGE_ITEM, EJPropertyDefinitionType.STRING);
imageItem.setLabel("Image Item");
imageItem.setLoadValidValuesDynamically(true);
list.addPropertyDefinition(lovItemName);
list.addPropertyDefinition(lovDisplayItem);
list.addPropertyDefinition(returnItem);
list.addPropertyDefinition(lovItemFormat);
EJDevPropertyDefinition initialiseLov = new EJDevPropertyDefinition(INITIALIES_LOV, EJPropertyDefinitionType.BOOLEAN);
initialiseLov.setLabel("Populate on creation");
initialiseLov.setDescription("Because List Boxes are based upon lov definitions, they need to make a query to be created. Thsi could take time dependin on how many list boxes you are displaying. You can set the Populate On Creation to false to delay the population of the List Box until either the items gets set to a value in the action processor or you request that the item renderer be refreshed");
initialiseLov.setDefaultValue("true");
EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(CSS_KEY, EJPropertyDefinitionType.STRING);
customCSSKey.setLabel("Custom CSS Key");
customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize item look and feel. Please refer to Entirej RWT CSS guide.");
mainGroup.addPropertyDefinition(lovDefName);
mainGroup.addPropertyDefinition(filter);
mainGroup.addPropertyDefinition(imageItem);
mainGroup.addPropertyDefinition(initialiseLov);
mainGroup.addPropertyDefinition(customCSSKey);
mainGroup.addPropertyDefinitionList(list);
return mainGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinition in project rap by entirej.
the class EJRWTRadioGroupItemRendererDefinition method getItemPropertyDefinitionGroup.
@Override
public EJPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Radio Group Renderer");
mainGroup.setDescription("Radio Groups offer the users a single choice from various options. The radio group can be displayed in wither horizontal format where the choices are alligned next to each other or vertically where they will appear in a list on beneath the other");
EJDevPropertyDefinition showBorder = new EJDevPropertyDefinition(SHOW_BORDER, EJPropertyDefinitionType.BOOLEAN);
showBorder.setLabel("Show Border");
showBorder.setDescription("If chosen, a border will be displayed around the radio group");
showBorder.setMandatory(true);
EJDevPropertyDefinition orientation = new EJDevPropertyDefinition(ORIENTATION, EJPropertyDefinitionType.STRING);
orientation.setLabel("Orientation");
orientation.addValidValue(ORIENTATION_HORIZONTAL, "Horizontal");
orientation.addValidValue(ORIENTATION_VERTICAL, "Vertical");
orientation.setMandatory(true);
orientation.setDescription("Indicates how the radio group will be displayed. Horizontal = in a row, Vertical = in a column");
EJDevPropertyDefinition defaultValue = new EJDevPropertyDefinition(DEFAULT_BUTTON, EJPropertyDefinitionType.STRING);
defaultValue.setLabel("Default Button");
defaultValue.setDescription("The combo box group should normally have one of the items selected as default. Supply the name of the default button here");
EJDevPropertyDefinitionList list = new EJDevPropertyDefinitionList(RADIO_BUTTONS, "Radio Buttons");
EJDevPropertyDefinition radioButtonName = new EJDevPropertyDefinition(NAME, EJPropertyDefinitionType.STRING);
radioButtonName.setLabel("Name");
radioButtonName.setDescription("The name of the actual button. This is important as you can access these buttons within the action processor");
radioButtonName.setMandatory(true);
EJDevPropertyDefinition radioButtonLabel = new EJDevPropertyDefinition(LABEL, EJPropertyDefinitionType.STRING);
radioButtonLabel.setLabel("Label");
radioButtonLabel.setDescription("This value will be displayed to the user or translated and then displayed");
radioButtonLabel.setMandatory(true);
radioButtonLabel.setMultilingual(true);
EJDevPropertyDefinition radioButtonValue = new EJDevPropertyDefinition(VALUE, EJPropertyDefinitionType.STRING);
radioButtonValue.setLabel("Value");
radioButtonValue.setDescription("This is the value of the radio button. The value must be convertable to the data type defined for the item. If the value is left empty, the value will bu null");
EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(CSS_KEY, EJPropertyDefinitionType.STRING);
customCSSKey.setLabel("Custom CSS Key");
customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize item look and feel. Please refer to Entirej RWT CSS guide.");
list.addPropertyDefinition(radioButtonName);
list.addPropertyDefinition(radioButtonLabel);
list.addPropertyDefinition(radioButtonValue);
mainGroup.addPropertyDefinition(showBorder);
mainGroup.addPropertyDefinition(orientation);
mainGroup.addPropertyDefinition(defaultValue);
mainGroup.addPropertyDefinition(customCSSKey);
mainGroup.addPropertyDefinitionList(list);
return mainGroup;
}
use of org.entirej.framework.dev.properties.EJDevPropertyDefinition in project rap by entirej.
the class EJRWTDateItemRendererDefinition method getItemPropertyDefinitionGroup.
public EJDevPropertyDefinitionGroup getItemPropertyDefinitionGroup() {
EJDevPropertyDefinitionGroup mainGroup = new EJDevPropertyDefinitionGroup("Date Item Renderer");
mainGroup.setDescription("The Date Item Renderer is used to select data values from a calendar popup or by entering the date manually. Use the Date Time Item Renderer for further date options");
EJDevPropertyDefinition textAllignment = new EJDevPropertyDefinition(PROPERTY_ALIGNMENT, EJPropertyDefinitionType.STRING);
textAllignment.setLabel("Alignment");
textAllignment.setDescription("The alignment of the text displayed within this item");
textAllignment.setLoadValidValuesDynamically(true);
textAllignment.setNotifyWhenChanged(true);
EJDevPropertyDefinition localeFormat = new EJDevPropertyDefinition(PROPERTY_LOCALE_FORMAT, EJPropertyDefinitionType.STRING);
localeFormat.setLabel("Locale Format");
localeFormat.setDescription("The Locale format will be used when no custom format is provided. The date format as defined by <code>java.text.DataFormat</code>\n\nThe Locale format can be overridden by the manual format if required");
for (DateFormats format : DateFormats.values()) {
localeFormat.addValidValue(format.name(), format.name());
}
EJDevPropertyDefinition format = new EJDevPropertyDefinition(PROPERTY_FORMAT, EJPropertyDefinitionType.STRING);
format.setLabel("Manual Format");
format.setDescription("Overrides the Locale format\nThe format specified must be a valid format for the Java SimpleDateFormat class. \nFormat strings can contain multiple formats to allow partial input of dates: \nThe multipleformats are separated by the '|' character. eg: 'dd.MM.yy|dd.MM|dd' would allow \nthe user to enter either the full dd.mm.yy format or the dd.MM format or just dd. \nMonth and year of incomplete date entries are complemented with the current month and year.");
EJDevPropertyDefinition displayValueAsLabel = new EJDevPropertyDefinition(PROPERTY_DISPLAY_VAUE_AS_LABEL, EJPropertyDefinitionType.BOOLEAN);
displayValueAsLabel.setLabel("Display value as label");
displayValueAsLabel.setDefaultValue("false");
displayValueAsLabel.setDescription("Indicates if this item should be displayed as a label. Items displayed as labels cannot be modified by the user.");
EJDevPropertyDefinition selectOnFocus = new EJDevPropertyDefinition(EJRWTTextItemRendererDefinition.PROPERTY_SELECT_ON_FOCUS, EJPropertyDefinitionType.BOOLEAN);
selectOnFocus.setLabel("Select on focus");
selectOnFocus.setDescription("Indicates if this item should select text on focus");
selectOnFocus.setDefaultValue("false");
EJDevPropertyDefinition customCSSKey = new EJDevPropertyDefinition(PROPERTY_CSS_KEY, EJPropertyDefinitionType.STRING);
customCSSKey.setLabel("Custom CSS Key");
customCSSKey.setDescription("Indicates custom CSS key in project CSS file that can customize item look and feel. Please refer to Entirej RWT CSS guide.");
mainGroup.addPropertyDefinition(textAllignment);
mainGroup.addPropertyDefinition(localeFormat);
mainGroup.addPropertyDefinition(format);
mainGroup.addPropertyDefinition(selectOnFocus);
mainGroup.addPropertyDefinition(displayValueAsLabel);
mainGroup.addPropertyDefinition(customCSSKey);
return mainGroup;
}
Aggregations