• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bean Access  RSS feed

 
francisco roman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Daniel Prene,
from a bean you should always be able to access
a component with

FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();
ValueBinding binding = app.createValueBinding("#{ResultTableBean}");
ResultTableBean rtb = (ResultTableBean)binding.getValue(ctx);

cheers.
 
francisco roman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.. the example I wrote is related to access beans from beans
but there exists a very similar way to access a component too.
I am not writing it now but if you want we can have a look at it
together.

cheers
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not sure if you are asking anything here? :roll:
 
francisco roman
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure not, I just gave an answer to Daniel.
 
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 francisco roman:
sure not, I just gave an answer to Daniel.


In the future try answering questions in the thread where the question was asked. It causes less confusion.
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! This will most definitely come in handy. I'm sure others will find this post usefull aswell.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!