This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Form Being Rendered Outside of the Page

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to do the following have one standard header.jsp file, but when I try to create a h:form in the header file the actual HTML form tag is rendered outside of the entire HTML tags.

home.jsp file



My header.jsp file


For whatever reason my form is rendered before anything else. Any ideas as to why?
 
Ranch Hand
Posts: 376
Scala Monad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jason Thiesse:
I am trying to do the following have one standard header.jsp file, but when I try to create a h:form in the header file the actual HTML form tag is rendered outside of the entire HTML tags.

...

For whatever reason my form is rendered before anything else. Any ideas as to why?


Yes, if I remember correctly, JSF tags are processed before the normal html code.
Try surrounding your html code with "<f:verbatim>" tags.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have one comprehension question to the first code snippet. Doesnt the subview have to be nested inside the view tag and it is not better to just include a file and set the subview tag inside the included file?

Cu
Alex
 
Gabriel Claramunt
Ranch Hand
Posts: 376
Scala Monad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can see one advantage of not having the subview tags in the included file: you can include it in non-jsf context...
 
Jason Thiesse
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gagriel - I do not seem to have any problem with JSF tags rendering outside of the HTML other than the spot noted above.

Alexander - You are correct. I noticed my other forms at the site were not binding to the action methods until I moved my f:view to enclose the subviews.


Does anyone know if having the f:view outside of the html tag may be causing this behavior?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic