@FindBy(id = INPUT_ID)
private Input firstInput;
@Deployment(testable = false)
public static WebArchive createDeployment() {
RichDeployment deployment = new RichDeployment(ITPlaceholderInputText.class);
deployment.archive().addClasses(PlaceHolderValueConverter.class, PlaceHolderValue.class);
deployment.webXml(new Function<WebAppDescriptor, WebAppDescriptor>() {
public WebAppDescriptor apply(WebAppDescriptor input) {
return input.getOrCreateContextParam()
.paramName("javax.faces.PROJECT_STAGE")
.paramValue("SystemTest")
.up();
}
});
FaceletAsset p;
p = placeholderFacelet("index.xhtml", deployment);
p.body("<h:inputText id='input' >");
p.body(" <rich:placeholder id='placeholderID' styleClass='#{param.styleClass}' value='Placeholder Text' />");
p.body("</h:inputText>");
p = placeholderFacelet("selector.xhtml", deployment);
p.body("<h:panelGroup id='panel'>");
p.body("<h:inputText id='input' />");
p.body("<rich:placeholder id='placeholderID' value='Placeholder Text' selector='[id=input]' />");
p.body("</h:panelGroup>");
p = placeholderFacelet("rendered.xhtml", deployment);
p.body("<h:inputText id='input' >");
p.body(" <rich:placeholder id='placeholderID' value='Placeholder Text' rendered='false' />");
p.body("</h:inputText>");
p = placeholderFacelet("converter.xhtml", deployment);
p.body("<h:inputText id='input' >");
p.body(" <rich:placeholder id='placeholderID' converter='placeHolderValueConverter' value='#{placeHolderValue}' />");
p.body("</h:inputText>");
p = placeholderFacelet("submit.xhtml", deployment);
p.form("<h:inputText id='input' value='#{placeHolderValue.value2}' >");
p.form(" <rich:placeholder id='placeholderID' value='Placeholder Text' />");
p.form("</h:inputText>");
p.form("<br />");
p.form("<a4j:commandButton id='ajaxSubmit' value='ajax submit' execute='@form' render='output' />");
p.form("<h:commandButton id='httpSubmit' value='http submit' />");
p.form("<br />");
p.form("<h:outputText id='output' value='#{placeHolderValue.value2}' />");
return deployment.getFinalArchive();
}