Hi, Can we create the JSF components based on the input the user has submitted in on page. For example if the user submits some data in first page the next page is to be generated based on the input he gives.
You can definitely do that. I many ways. One is that the user input can be used as the navigation result, so the user enters data there is a button to go to the next page, you call a backing bean method that just returns what the user entered as a String and the navigation rules you set send it to a different page depending on what the String that was entered.
Or you can also code up JSF components dynamically with UIComponent and make the component tree yourself, but I would hold back on that as a last resort, and only if you really understand JSF.
Joined: Oct 08, 2007
The project Iam working used web services and JSF. As the webservices uses XML as inputs and output format. The area I am working on is to show the response( output ) XML data as UI and from that UI the user is asked to choose the solution and the solution is sent as a request for other service. Here to do this I used XSL to convert the XML into HTML and used this HTML as a UI. As the Components are of HTML type and not of JSF components. I want to make them as JSF components. Is my approach correct to use JSF here ?
Dennis Hopper wrote:How do you get from UIComponent land to JSF markup land?
JSF markup is compiled into UIComponents under control of the FacesServlet.
But the cynical among us are inclined to wonder if you're taking Mark's admonition about fictitious names to heart.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Dec 02, 2010
What's the proper process for creating JSF components dynamically? I'd like a JSP/JSF page to populate a table from a database. However since it seems JSF pages need to be event listeners to get into the backing bean logic, do I use a PhaseListener to intercept the page before it loads and to get into my bean's logic?
The solution I have now is to stick <f:phaseListener> into a JSF page and intercept it at the beforePhase method. Is this right? Seems convoluted.