use of jakarta.faces.component.html.HtmlSelectManyMenu in project myfaces by apache.
the class HtmlMenuRendererTest method setUp.
public void setUp() throws Exception {
super.setUp();
selectOneMenu = new HtmlSelectOneMenu();
selectManyMenu = new HtmlSelectManyMenu();
writer = new MockResponseWriter(new StringWriter(), null, null);
facesContext.setResponseWriter(writer);
facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
facesContext.getRenderKit().addRenderer(selectOneMenu.getFamily(), selectOneMenu.getRendererType(), new HtmlMenuRenderer());
facesContext.getRenderKit().addRenderer(selectManyMenu.getFamily(), selectManyMenu.getRendererType(), new HtmlMenuRenderer());
facesContext.getAttributes().put("org.apache.myfaces.RENDERED_FACES_JS", Boolean.TRUE);
}
use of jakarta.faces.component.html.HtmlSelectManyMenu in project myfaces by apache.
the class HtmlEscapeRendererTest method setUp.
public void setUp() throws Exception {
super.setUp();
outputText = new HtmlOutputText();
outputLabel = new HtmlOutputLabel();
selectOneRadio = new HtmlSelectOneRadio();
selectOneListbox = new HtmlSelectOneListbox();
selectOneMenu = new HtmlSelectOneMenu();
selectManyCheckbox = new HtmlSelectManyCheckbox();
selectManyListbox = new HtmlSelectManyListbox();
selectManyMenu = new HtmlSelectManyMenu();
// TODO remove these two lines once myfaces-test goes alpha, see MYFACES-1155
facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
facesContext.getRenderKit().addRenderer(outputText.getFamily(), outputText.getRendererType(), new HtmlTextRenderer());
facesContext.getRenderKit().addRenderer(outputLabel.getFamily(), outputLabel.getRendererType(), new HtmlLabelRenderer());
facesContext.getRenderKit().addRenderer(selectOneRadio.getFamily(), selectOneRadio.getRendererType(), new HtmlRadioRenderer());
facesContext.getRenderKit().addRenderer(selectOneListbox.getFamily(), selectOneListbox.getRendererType(), new HtmlListboxRenderer());
facesContext.getRenderKit().addRenderer(selectOneMenu.getFamily(), selectOneMenu.getRendererType(), new HtmlMenuRenderer());
facesContext.getRenderKit().addRenderer(selectManyCheckbox.getFamily(), selectManyCheckbox.getRendererType(), new HtmlCheckboxRenderer());
facesContext.getRenderKit().addRenderer(selectManyListbox.getFamily(), selectManyListbox.getRendererType(), new HtmlListboxRenderer());
facesContext.getRenderKit().addRenderer(selectManyMenu.getFamily(), selectManyMenu.getRendererType(), new HtmlMenuRenderer());
facesContext.getAttributes().put("org.apache.myfaces.RENDERED_FACES_JS", Boolean.TRUE);
}
use of jakarta.faces.component.html.HtmlSelectManyMenu 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;
}
Aggregations