Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing UI Components within Managed (Backing) Beans

 
Lucas Vicente
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I use to program in .Net and now I'm trying to learn Servlets, JSP and JFS.
I have a question regarding accessing ui components in managed (backing) beans like is done in .net's codebehind.
For example if I have a hutputText (Label ?) in the UI how do I access this component in the managed bean to change its attributes, to make it visible or not and etc ? Do I need to use another lib besides the regular JSF libs ?
I'm asking this cause I downloaded the Netbeans 6.0 RC2 and noticed that it uses another lib instead the regular jsf one to make this kind of behavior.

Thanks in advance

Lucas

[ November 23, 2007: Message edited by: Lucas Vicente ]
[ November 23, 2007: Message edited by: Lucas Vicente ]
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



MyBean.java
 
Lucas Vicente
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Richard,

I see what you're saying work fine but this was not exactly what I was looking for. I think that I found now what it is but I'm not completely sure if this is a good approach.
I found something like this:



MyBean.java


Doing this way I have access for the component's attributes inside of MyBean so then I could do something like this:



I think that this is the other people's question too and I hope this topic could help them.
But thank you for the reply, I really appreciated it.

Lucas Vicente
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic