JSF tags represent a component

G

gk

"Struts tags generate HTML directly, whereas JSF tags represent a
component and renderer that generate HTML"

I'm not getting this part...is not both of them generate HTML ? where
is the key difference then ?

Could you please clarify the text "JSF tags represent a component
and renderer" ? I am not clear at this part.
 
G

gk

Struts tags are more templates for HTML.  They front for things that are more
like HTML in their concept - there's no hierarchy of user-interface thingies
lurking under the surface to handle the logic.

JSF tags are front faces to underlying components containing behaviors, logic
of their own.  JSF is more like Swing in its programming model.

With JSF the browser posts requests to the server which the JSF framework
intercepts and forwards to the underlying components, which in turn form an
underlying application model maintained by the server.  The components do
things like invoke business logic, perform surface validations, update the
state of the component model and produce results.  The JSF mechanism then
transforms the view part of the actions into HTML and renders that to the client.


I read your comment. Not yet clear.

may be an example could be useful . Are you trying to say , for
example , a JSF can have some tags which could do some action events
unlike struts. say <insert> tag in JSF can do a database insert
action event but in Struts you can't have this ...we can make any
cutstom tag events for any kind kind of action in JSF.....is it some
sort of like this ?
 
L

Lew

gk said:
I read your comment. Not yet clear.

may be an example could be useful . Are you trying to say , for
example , a JSF can have some tags which could do some action events
unlike struts. say<insert> tag in JSF can do a database insert
action event but in Struts you can't have this ...we can make any
cutstom tag events for any kind kind of action in JSF.....is it some
sort of like this ?

No, it's more about how the pieces fit together. I'm saying that a JSF
"commandButton" is an object that is part of a structure of objects that work
together, not just a textual substitution for "<input type='submit' ..."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top