• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with my FacesContext

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I have the following problem in my application, I am using a method called timer () and inside of the not recognize me the visual of the application ie the different components of the view that if they are in that moment .. Cheers and thanks beforehand

 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We've got a FAQ topic called "ItdoesntworkisUseless". Because truthfully, I don't know what your problem is.

Well, actually, I may, but it isn't the problem that you are thinking of.

J2EE request/response handling objects are forbidden by the J2EE spec from spawning threads. Anything that you do on a timer needs to be in a resource that isn't running under request/response processing. Which means that in particular, spawning a thread and/or waiting on a resource is not allowed in JSF backing beans or in code that they invoke.

Beyond that, a common beginner fault is being too swift to consider grabbing UIComponent objects and mucking around with them, JSF is designed to work primarily with POJO objects, so when you start touching stuff that's outside of the javax.faces model classes, it's usually an indication that you're doing it wrong.

Speaking of common beginner stuff, the FacesContext is something that's built by the FacesServlet to serve a single HTTP request/response processing cycle and immediately destroyed as soon as the response has been sent back. People who attempt to obtain and work with the FacesContext in a non-JSF context, such as a generic servlet or JSP are often frustrated to discover that what they get back is null, not a FacesContext.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic