This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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.
Thank you, Dileep
jeroen dijkmeijer
Ranch Hand
Joined: Sep 26, 2003
Posts: 131
posted
0
hmm my first throw would be to abuse the rendered attribute for that. How many variants are you looking at?
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.
Mark
dileep Chappalli
Greenhorn
Joined: Oct 08, 2007
Posts: 8
posted
0
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 ?
Thanks, Dileep
Dennis Hopfer
Ranch Hand
Joined: Dec 02, 2010
Posts: 37
posted
0
How do you get from UIComponent land to JSF markup land?
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.
Dennis Hopfer
Ranch Hand
Joined: Dec 02, 2010
Posts: 37
posted
0
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.