• Post Reply Bookmark Topic Watch Topic
  • New Topic

Do JSF UI components "implement" interface?  RSS feed

 
massimo tarantelli
Ranch Hand
Posts: 35
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
Infact the question in the subject is not realy a question, I know that is true...
Anyway I don't understand how this framework works.
For UI componenet I imagine something like a :


Simple xhtml code...so how you can say that for example a commandButton like this one implements the ActionSource interface?
is there a kind of java rappresentation in the JSF lib as well as the XHTML's one?
thanks
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The technical definition for the xhtml is View Definition Language (VDL). Which, considering that it's an XML represention of a View definition, is pretty straightforward.

JSF (Facelets) compiles the VDL to construct a UIComponent tree, which is an in-memory Java directed acyclic object graph that's used for referencing control information. The <h:commandButton> element compiles to a HTMLCommandButton class instance, and the HTMLCommandButton implements the ActionSource interface, per the JSF API spec.

Most people won't need to know that. It's sufficient that when you code "action=" on a commandButton (or commandLink) that the end result will be to navigate to the indicated target, which can either be statically named (as you did in your example), or the returned result from an EL-defined action method.
 
massimo tarantelli
Ranch Hand
Posts: 35
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you couldn't be more clear, thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!