use of jakarta.faces.component.UISelectItem in project myfaces by apache.
the class HtmlEscapeRendererTest method tryUISelectNoEscapeValue.
public void tryUISelectNoEscapeValue(UIComponent component, String contentType, String encoding) throws Exception {
StringWriter swriter = new StringWriter();
HtmlResponseWriterImpl writer = new HtmlResponseWriterImpl(swriter, contentType, encoding);
facesContext.setResponseWriter(writer);
UISelectItem uiSelectItem = new UISelectItem();
SelectItem item = new SelectItem("Output", TEST_STRING, "", false, false);
uiSelectItem.setValue(item);
component.getChildren().add(uiSelectItem);
component.encodeAll(facesContext);
facesContext.renderResponse();
String output = swriter.toString();
Assert.assertTrue(output.contains(TEST_STRING));
}
use of jakarta.faces.component.UISelectItem in project myfaces by apache.
the class HtmlSelectManyCheckboxClientBehaviorRendererTest method createComponentToTest.
@Override
protected UIComponent createComponentToTest() {
UIComponent component = new HtmlSelectManyCheckbox();
UISelectItem item = new UISelectItem();
item.setItemValue("value1");
component.getChildren().add(item);
return component;
}
use of jakarta.faces.component.UISelectItem in project myfaces by apache.
the class HtmlSelectManyMenuClientBehaviorRendererTest method createComponentToTest.
@Override
protected UIComponent createComponentToTest() {
UIComponent component = new HtmlSelectManyMenu();
UISelectItem item = new UISelectItem();
item.setItemValue("value1");
component.getChildren().add(item);
return component;
}
use of jakarta.faces.component.UISelectItem in project myfaces by apache.
the class HtmlSelectOneMenuClientBehaviorRendererTest method createComponentToTest.
@Override
protected UIComponent createComponentToTest() {
UIComponent component = new HtmlSelectOneMenu();
UISelectItem item = new UISelectItem();
item.setItemValue("value1");
component.getChildren().add(item);
return component;
}
use of jakarta.faces.component.UISelectItem in project myfaces by apache.
the class HtmlSelectOneRadioClientBehaviorRendererTest method createComponentToTest.
@Override
protected UIComponent createComponentToTest() {
UIComponent component = new HtmlSelectOneRadio();
UISelectItem item = new UISelectItem();
item.setItemValue("value1");
component.getChildren().add(item);
return component;
}
Aggregations