Win a copy of Kotlin for Android App Development this week in the Kotlin 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Form Being Rendered Outside of the Page  RSS feed

 
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?
 
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.
 
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?
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!