/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param message * (Required) The transalted text to set as the visible option. */ public void addOption(String returnValue, Message message) throws WingException { Option option = this.addOption(returnValue); option.addContent(message); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. */ public Option addOption(String returnValue) throws WingException { Option option = new Option(context, returnValue); options.add(option); return option; }
/** * Translate this element and all contained elements into SAX events. The * events should be routed to the contentHandler found in the WingContext. * * @param contentHandler * (Required) The registered contentHandler where SAX events * should be routed too. * @param lexicalHandler * (Required) The registered lexicalHandler where lexical events * (such as CDATA, DTD, etc) should be routed too. * @param namespaces * (Required) SAX Helper class to keep track of namespaces able * to determine the correct prefix for a given namespace URI. */ public void toSAX(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces) throws SAXException { AttributeMap attributes = new AttributeMap(); attributes.put(A_RETURN_VALUE, this.returnValue); startElement(contentHandler, namespaces, E_OPTION, attributes); super.toSAX(contentHandler, lexicalHandler, namespaces); endElement(contentHandler, namespaces, E_OPTION); } }
option.toSAX(contentHandler, lexicalHandler, namespaces);
/** * Add a select option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param message * (Required) The transalted text to set as the visible option. */ public void addOption(String returnValue, Message message) throws WingException { Option option = this.addOption(returnValue); option.addContent(message); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. */ public Option addOption(String returnValue) throws WingException { Option option = new Option(context, returnValue); options.add(option); return option; }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param characters * (Required) The text to set as the visible option. */ public void addOption(String returnValue, String characters) throws WingException { Option option = this.addOption(returnValue); option.addContent(characters); }
/** * Add a select option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. */ public Option addOption(String returnValue) throws WingException { Option option = new Option(context, returnValue); options.add(option); return option; }
/** * Add a select option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param characters * (Required) The text to set as the visible option. */ public void addOption(int returnValue, String characters) throws WingException { Option option = this.addOption(String.valueOf(returnValue)); option.addContent(characters); }
/** * Add a select option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param message * (Required) The transalted text to set as the visible option. */ public void addOption(int returnValue, Message message) throws WingException { Option option = this.addOption(String.valueOf(returnValue)); option.addContent(message); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param message * (Required) The transalted text to set as the visible option. */ public void addOption(String returnValue, Message message) throws WingException { Option option = this.addOption(returnValue); option.addContent(message); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param characters * (Required) The text to set as the visible option. */ public void addOption(int returnValue, String characters) throws WingException { Option option = this.addOption(String.valueOf(returnValue)); option.addContent(characters); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * checked. * @param characters * (Required) The text to set as the visible option. */ public void addOption(String returnValue, String characters) throws WingException { Option option = this.addOption(returnValue); option.addContent(characters); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param message * (Required) The transalted text to set as the visible option. */ public void addOption(int returnValue, Message message) throws WingException { Option option = this.addOption(String.valueOf(returnValue)); option.addContent(message); }
/** * Add a select option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param characters * (Required) The text to set as the visible option. */ public void addOption(String returnValue, String characters) throws WingException { Option option = this.addOption(returnValue); option.addContent(characters); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * selected. * @param message * (Required) The transalted text to set as the visible option. */ public void addOption(int returnValue, Message message) throws WingException { Option option = this.addOption(String.valueOf(returnValue)); option.addContent(message); }
/** * Add an option. * * @param returnValue * (Required) The value to be passed back if this option is * checked. * @param characters * (Required) The text to set as the visible option. */ public void addOption(int returnValue, String characters) throws WingException { Option option = this.addOption(String.valueOf(returnValue)); option.addContent(characters); }
/** * Build a conjunction field in the given for the given cell. A * conjunction consists of logical the operators AND, OR, NOT. * * @param row The current row * @param cell The current cell */ private void buildConjunctionField(int row, Cell cell) throws WingException { // No conjunction for the first row. if (row == 1) { return; } Request request = ObjectModelHelper.getRequest(objectModel); String current = request.getParameter("conjunction" + row); // default to AND if nothing specified. if (current == null || current.length() == 0) { current = "AND"; } Select select = cell.addSelect("conjunction" + row); select.addOption("AND".equals(current), "AND").addContent(T_and); select.addOption("OR".equals(current), "OR").addContent(T_or); select.addOption("NOT".equals(current), "NOT").addContent(T_not); }
select.addOption((current == null), "ANY").addContent( message("xmlui.ArtifactBrowser.AdvancedSearch.type_ANY")); select.addOption(field.equals(current), field).addContent(message("xmlui.ArtifactBrowser.AdvancedSearch.type_" + field));