Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

presentation layer in JSF  RSS feed

 
Adewale Adebusoye
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello..im just new to JSF, and i got a question thats puzzling me. Do JSF pages support the basic HTML tags like img, etc? What i mean is that if i as the coder finish the application, can a graphic artist work on the pages..like a normal web page? like inserting images, banners etc?
thanks. I mean in a basic servlet/jsp app i wouldnt be asking this. So sorry if this question sounds too elementary.
thanks
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do JSF pages support the basic HTML tags like img, etc?

Yes.


What i mean is that if i as the coder finish the application, can a graphic artist work on the pages..like a normal web page? like inserting images, banners etc?

Yes. But he has to be careful to not disturb JSF code.

Also there are IDEs (Sun, IBM, Oracle, Eclipse plugin etc.) that can paint JSF
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What i mean is that if i as the coder finish the application, can a graphic artist work on the pages..like a normal web page? like inserting images, banners etc?
thanks.

i have been using this approach in this past and it has worked for me:

i code my jsf pages in the following manner:

<u:page>
<f:view>
<!---- jsf code goes here -->
</f:view>
</u:page>

where u:page is a custom tag written by me that prints the <html>,<head> and other <div> elements.

Once i have completed the jsf coding, i ask my graphic designer to work on the template. And I modify my u:page tag to print out his template.

[ May 28, 2006: Message edited by: Mike Corleone ]
[ May 28, 2006: Message edited by: Mike Corleone ]
 
Adewale Adebusoye
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please mike could you give me the <u age> custom tags for formatting the HTML that you wrote?
Also if you could give me some sample code that you wrote that incorporates the tag into it, id really appreciate it.
Thanks
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is recommended that you wrap raw HTML with <verbatim> tags. JSF builds up a component tree, and plopping in other xml-like constucts can occasionally get placed in locations you don't want since they're not "seen" by the JSF tree builder. Especially avoid custom iterator tags.

Someone has implemented a JSF equivalent of almost all the standard HTML tags and if you search this forum you can find out the URL.

From an ideologically pure (gag) perspective, JSF is supposed to let the rendering be done by renderers and avoid any sort of explicit presentation tags in the JSF page, but life is short - and frequently nasty and brutish as well.
 
Henry Lowell
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tim Holloway:
From an ideologically pure (gag) perspective, JSF is supposed to let the rendering be done by renderers and avoid any sort of explicit presentation tags in the JSF page, but life is short - and frequently nasty and brutish as well.


Which is totally the wrong approach IMHO. It's not nasty and brutish to use HTML for what it is good for. There is no reason to wrap static presentation code in custom tags or java code. It's good that JSF 1.2 solves this problem with HTML and JSF tags working together. Wrapping verbatum tags around HTML is too time consuming and "nasty" if I can steal one of your descriptions.
[ May 30, 2006: Message edited by: Henry Lowell ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!