require(name, "The 'name' parameter is required for all lists."); restrict( type,
/** * Add a label element, they are associated with an item and annotates that * item with a number, a textual description of some sort, or a simple * bullet. * * @param key * (Required) Key to the i18n catalogue to translate the content * into the language preferred by the user. */ public void addLabel(Message key) throws WingException { require(key, "The 'key' parameter is required for list labels."); Label label = new Label(context, null, null); label.addContent(key); contents.add(label); }
/** * Add an item element that contains only translated content. * * @param key * (Required) Key to the i18n catalogue to translate the content * into the language preferred by the user. */ public void addItem(Message key) throws WingException { require(key, "The 'key' parameter is required for list items."); Item item = this.addItem(null, null); item.addContent(key); }
/** * Add a label element, they are associated with an item and annotates that * item with a number, a textual description of some sort, or a simple * bullet. * * @param characters * (Required) Untranslated character data to be included. */ public void addLabel(String characters) throws WingException { require(characters, "The 'characters' parameter is required for list labels."); Label label = new Label(context, null, null); label.addContent(characters); contents.add(label); }
/** * Add an item element that contains only character content. * * @param characters * (Required) Untranslated character data to be included. */ public void addItem(String characters) throws WingException { require(characters, "The 'characters' parameter is required for list items."); Item item = this.addItem(null, null); item.addContent(characters); }