Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF including HTML within a method

 
mar mm
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, is anyone able to help me? I'am still new with JSF.
I would like to create a method that holds HTML code. Then, i would like just to call that method inside my JSF page, to insert the HTML. And if there is a need to change something, i would do it in one place only.

To explain you more detaily, i'll show you how I made this in PHP.
I made file named fje.php:

Offcourse, there is a lot more HTML and JavaScript code inside functions.
Then, i would create PHP page:


Is it possible to create something like this with JSF. Or is there other way to do this?
Thanks in advance
 
bert brutzel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure, you can do this with templates ...
 
mar mm
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you explain me little closer?
 
bert brutzel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have a look a this: Coreservlets
 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a good place to starting learning facelets.

http://jsflessons.blogspot.com/2009/03/intorduction-to-facelets.html
 
mar mm
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic