• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF & Struts 2gether in Jetspeed

 
Greg Belyea
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have deployed portlets in jetspeed, some JSF and some struts and they can communicate with each other through session just fine, so maybe no need to choose just one!!!

My question is I have a requirement to not use Javascript, JSF seems to generate Javascript in the background. What are my options..... is JSF completely dependant on using javascript???

Greg B
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Greg Belyea:
I have deployed portlets in jetspeed, some JSF and some struts and they can communicate with each other through session just fine, so maybe no need to choose just one!!!

My question is I have a requirement to not use Javascript, JSF seems to generate Javascript in the background. What are my options..... is JSF completely dependant on using javascript???

Greg B


Sun's JSF implementation generates no javascript whatsoever. Other implementations, like MyFaces's components will generate some javascript.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From JSF specification section 3.1.12

encodeBegin/Children/End methods are called during the Render Response phase of the request processing lifecycle, and have the responsibility of creating the response data
.......
Typically, this will involve generating markup for the output technology being supported, such as creating an HTML <input> element for a UIInput component. For clients that support it, the encode methods might also generate client-side scripting code (such as JavaScript), and/or stylesheets (such as CSS). The default implementations in UIComponentBase delegate to a corresponding Renderer, if the rendererType property is true, and do nothing otherwise.


Hence it's upto you, if you want - it will generate,
but by default - it doesn't !!!
 
Greg Belyea
Greenhorn
Posts: 27
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, that makes sense... I am using the myfaces implementation... That is good news because i had been lobbying to use both technologies to take advantage of JSF and learn how to use it, while the majority of the team wanted to use Struts because of familiarity. We are not allowed to depend on Javascript at all with the project so i was'nt sure if Sun's Implentation depended on it or not....

Thanks Guys
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!