• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help with Display Data in JSF Web Page

 
Charles Sexton
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

I am relatively new to JSF. I am trying to display data into a web page sorta like a jTextArea or at least onto a panel that is on the webpage, something similar to that. I can display the data in a particular format but it won't appear onto a panel in a specific location or the panel being a particular size. Can someone point me into the right direction of what I need to learn in order to do this. The simpler the better as I believe in simplicity.

Thank Charles
 
Tim Holloway
Bartender
Posts: 18417
58
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
None of the AWT, Swing or SWT desktop UI functions work on a web application (unless you're running in an applet). JSF web pages, like all web pages, are rendered in HTML and therefore subject to the same layout issues and controls as any other HTML.

The HTML equivalent of jTextArea is TEXTAREA, which is supported in JSF View Template Language by the "h:inputTextarea" tag. Which is case-sensitive, unlike the HTML tag. As this is a JSF input/output control, JSF will automatically sync the backing bean with the contents of a inputTextArea when the JSF form is submitted.

Layout in JSF is supported by several different tags, including the h:panelGrid tag, the h:dataTable tag (for tabular formatting), and other. Brute-force HTML div tags also work, although I recommend keeping raw HTML to a minimum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!