@Override protected Map<String, String> createObject(Locale locale, String listName, Object... params) throws Exception { Map<String, String> listMap = new HashMap<String, String>(); for (Listable listable : staticLists.get(locale, listName, params)) { listMap.put(listable.getListKey(), listable.getListDescription()); } return Collections.unmodifiableMap(listMap); } };
public String[] getSubPatternDescriptions() { String[] values = new String[list.size()]; for (int i = 0; i < values.length; i++) { values[i] = list.get(i).getListDescription(); } return values; }
public String[] getSubPatternKeys() { String[] values = new String[list.size()]; for (int i = 0; i < values.length; i++) { values[i] = list.get(i).getListKey(); } return values; }
private void writeResultList(ResponseWriter writer, SearchField searchField) throws UnifyException { List<? extends Listable> listableList = searchField.getListables(); int length = listableList.size(); writer.write("<div"); writeTagStyleClass(writer, "sflist"); writer.write(">"); for (int i = 0; i < length; i++) { writer.write("<a"); writeTagId(writer, searchField.getNamingIndexedId(i)); if (i % 2 == 0) { writeTagStyleClass(writer, "odd"); } else { writeTagStyleClass(writer, "even"); } writer.write(">"); writer.writeWithHtmlEscape(listableList.get(i).getListDescription()); writer.write("</a>"); } writer.write("</div>"); }
int j = 0; for (Listable listable : listableList) { if (listable.getListKey().equals(value)) { break;
@Override public Map<String, String> getListMap(Locale locale, String listName, Object... params) throws UnifyException { if (staticListNames.contains(listName)) { return staticListMaps.get(locale, listName); } Map<String, String> listMap = new HashMap<String, String>(); for (Listable listable : executeListCommand(listName, locale, params)) { listMap.put(listable.getListKey(), listable.getListDescription()); } return listMap; }
@Override protected void doWriteStructureAndContent(ResponseWriter writer, Widget widget) throws UnifyException { ListArea listArea = (ListArea) widget; String styleClass = listArea.getUplAttribute(String.class, "styleClass"); writer.write("<div "); writeTagAttributes(writer, listArea); writer.write("><ul class=\"").write(styleClass).write("-body\">"); for (Listable listable : listArea.getListables()) { writer.write("<li class=\"").write(styleClass).write("-item\">"); writer.writeWithHtmlEscape(listable.getListDescription()); writer.write("</li>"); } writer.write("</ul></div>"); }
appendSym1 = true; writeJsonQuote(listable.getListKey());
String key = listable.getListKey(); String description = HtmlUtils.getStringWithHtmlEscape(listable.getListDescription()); if (key.equals(value)) { valueIndex = i;
writer.writeWithHtmlEscape(listable.getListDescription()); writer.write("</a>");
List<ListData> newList = new ArrayList<ListData>(); for (Listable listable : list) { String key = listable.getListKey(); String description = listable.getListDescription(); if (keyProperty != null) { key = String.valueOf(ReflectUtils.getBeanProperty(listable, keyProperty));
Map<String, String> map = new HashMap<String, String>(); for (Listable listable : list) { String key = listable.getListKey(); String description = listable.getListDescription(); if (keyProperty != null) { key = String.valueOf(ReflectUtils.getBeanProperty(listable, keyProperty));
@SuppressWarnings("unchecked") @Override protected void doWriteStructureAndContent(ResponseWriter writer, Widget widget) throws UnifyException { CheckBoxList checkBoxList = (CheckBoxList) widget; writeHiddenPush(writer, checkBoxList, PushType.CHECKBOX); List<String> values = checkBoxList.getValue(ArrayList.class, String.class); List<? extends Listable> listableList = checkBoxList.getListables(); int breaks = listableList.size(); boolean appendSym = !checkBoxList.getUplAttribute(boolean.class, "flow"); for (Listable listable : listableList) { writer.write("<input type=\"checkbox\""); writeTagName(writer, checkBoxList); writeTagStyleClass(writer, checkBoxList); writeTagStyle(writer, checkBoxList); String key = listable.getListKey(); if (values != null && values.contains(key)) { writer.write(" checked=\"checked\""); } writer.write(" value=\"").write(key).write("\"/>"); writer.writeWithHtmlEscape(listable.getListDescription()); if (appendSym && ((--breaks) > 0)) { writer.write("<br />"); } } } }
@Override protected void doWriteStructureAndContent(ResponseWriter writer, Widget widget) throws UnifyException { RadioButtons radioButtons = (RadioButtons) widget; writeHiddenPush(writer, radioButtons, PushType.RADIO); String value = radioButtons.getValue(String.class); List<? extends Listable> listableList = radioButtons.getListables(); boolean isNotFlow = !radioButtons.getUplAttribute(boolean.class, "flow"); int breaks = listableList.size(); for (Listable listable : listableList) { writer.write("<input type=\"radio\""); writeTagName(writer, radioButtons); writeTagStyleClass(writer, radioButtons); writeTagStyle(writer, radioButtons); String key = listable.getListKey(); if (key.equals(value)) { writer.write(" checked"); } writer.write(" value=\"").write(key).write("\"/>"); writer.writeWithHtmlEscape(listable.getListDescription()); if (isNotFlow) { if ((--breaks) > 0) { writer.write("<br />"); } } } }
@Override protected void appendPopupContent(ResponseWriter writer, AbstractPopupTextField popupTextField) throws UnifyException { MoneyField moneyField = (MoneyField) popupTextField; writer.write("<div id=\"").write(moneyField.getFramePanelId()) .write("\" class=\"mfborder\" style=\"overflow-y:auto;overflow-x:hidden;\" tabindex=\"0\">"); writer.write("<div id=\"").write(moneyField.getListPanelId()).write("\" class=\"mflist\">"); List<? extends Listable> listableList = moneyField.getListables(); int length = listableList.size(); String currencyCode = getCurrencyCode(moneyField); for (int i = 0; i < length; i++) { Listable listable = listableList.get(i); String key = listable.getListKey(); writer.write("<a"); writeTagId(writer, moneyField.getNamingIndexedId(i)); if (key.equals(currencyCode)) { writeTagStyleClass(writer, "sel"); } else { writeTagStyleClass(writer, "norm"); } writer.write(">"); writer.writeWithHtmlEscape(listable.getListDescription()); writer.write("</a>"); } writer.write("</div>"); writer.write("</div>"); }
for (int i = 0; i < length; i++) { Listable listable = listableList.get(i); String key = listable.getListKey(); writer.write("<a"); writeTagId(writer, multiSelect.getNamingIndexedId(i)); writer.writeWithHtmlEscape(listable.getListDescription()); writer.write("</a>"); String key = listable.getListKey(); writer.write("<option value=\"").write(key).write("\""); if (values != null && values.contains(key)) {
String key = listable.getListKey(); writer.write("<a"); writeTagId(writer, singleSelect.getNamingIndexedId(i)); writer.writeWithHtmlEscape(listable.getListDescription()); writer.write("</a>");
writeTagId(writer, dropdownCheckList.getNamingIndexedId(i)); writeTagName(writer, groupId); String key = listable.getListKey(); if (values != null && values.contains(key)) { writer.write(" checked=\"checked\""); writer.writeWithHtmlEscape(listable.getListDescription()); writer.write("</td>"); } else {