Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form Being Rendered Outside of the Page

 
Jason Thiesse
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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?
 
Gabriel Claramunt
Ranch Hand
Posts: 375
Monad Scala
  • Mark post as helpful
  • send pies
  • 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.
 
a
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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: 375
Monad Scala
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic