In a previous web app I had made, I had used a String stored in my Managed bean to store a table in HTML, and returned it using a textOutput using JSF. I was wondering if this is possible with the HTML being returned containing JSF tags as well. For example:
My Managed Bean:
@ManagedBean(name = "account")
@ViewScoped
public class Account{
String subForm = "";
/* getters and setters */
public String login()
{
boolean a = true;
subForm = "<div id='userdivcor' class='form-inline has-success'>"
+ "<h:inputText id='corruser' type='text' value='#{account.username}'/>"
+ "</div>";
return "loginError.xhtml";
}
My .xhtml file:
//some code leading to my form
<h:form id='form' method='post' onsubmit='return fullCheck()'>
<h:outputText id="htmlStuffTwo" value="#{account.subForm}" escape="false"/>
</h:form>
//remainder of code
Using h:outputText, could I render my returned String value without any errors? Currently, I am trying this on a larger scale, but when the text goes to render, my value is something crazy like:
"hdOMomYGEH3QfwJfNhPPECOG2Pv3gt/2F1n7dFGGp6ItPlhzDREjEJTSax3NjvsVDdiBZQsB"
Just curious, please let me know!