Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JavaServer Faces » UIComponents and its bean
UIComponents and its bean [message #475091] Thu, 27 September 2007 15:52 Go to next message
Eclipse UserFriend
Originally posted by: jamarijr.gmail.com

Given a UIComponent how can you get the bean that it is associated with?

<h:button ... action="#{sb.action}">...

How can I get the sb instance that is being used? This is during a call to
a custom validator...
Re: UIComponents and its bean [message #475092 is a reply to message #475091] Fri, 28 September 2007 18:39 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> Given a UIComponent how can you get the bean that it is associated with?
> <h:button ... action="#{sb.action}">...
> How can I get the sb instance that is being used? This is during a call to
> a custom validator...

It depends on the property you interrogating. In this case, I believe
that you would call getAction on the instance of the button component to
get the MethodBinding (JSF 1.1) or MethodExpression (>JSF 1.2). This
would give you the runtime representation of "sb.action".



--Cam
Re: UIComponents and its bean [message #614434 is a reply to message #475091] Fri, 28 September 2007 18:39 Go to previous message
Cameron Bateman is currently offline Cameron BatemanFriend
Messages: 481
Registered: July 2009
Senior Member
> Given a UIComponent how can you get the bean that it is associated with?
> <h:button ... action="#{sb.action}">...
> How can I get the sb instance that is being used? This is during a call to
> a custom validator...

It depends on the property you interrogating. In this case, I believe
that you would call getAction on the instance of the button component to
get the MethodBinding (JSF 1.1) or MethodExpression (>JSF 1.2). This
would give you the runtime representation of "sb.action".



--Cam
Previous Topic:UIComponents and its bean
Next Topic:Web Page Editor Property Page Sections Extension-point
Goto Forum:
  


Current Time: Thu Apr 25 17:20:12 GMT 2024

Powered by FUDForum. Page generated in 0.03218 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top