Hi Jesse,

The problem is I don't know the HTML ID until the page is rendered, and that ID is the one I want to refer in code, as it will be the input to a _javascript_ method.

2006/1/19, Jesse Alexander (KBSA 21) < [EMAIL PROTECTED]>:
Do you know the parent bean?
Do you know the id of the other component?
 
  findComponent(java.lang.String expr)
          Search for and return the
UIComponent with an id that matches the specified search _expression_ (if any), according to the algorithm described below.
 
This method exists in UIComponent
 
Could this be a ticket to ride?
Alexander


From: Enrique Medina [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 19, 2006 2:48 PM
To: MyFaces Discussion
Subject: Re: Dynamically refer to a component from another component

But I don't want to inject another bean. When I talk about components I mean view components in the model component; e.g. refer to an HtmlInputText from another HtmlOutputText.

The problem I have is that I need to refer to the value of one component from another one in code, and both of them are dynamically created in the same backing bean.

2006/1/19, Mario Ivankovits <[EMAIL PROTECTED]>:
Hi Enrique!

But this is what Simon tries to show you.
Its possible to inject the other bean instance or to look it up through
the context.

Ciao,
Mario
> Hi Simon,
>
> I mean accesing one component to another from inside the same bean
>
> 2006/1/19, Simon Kitching <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>:
>
>     http://wiki.apache.org/myfaces/AccessingOneManagedBeanFromAnother
>     < http://wiki.apache.org/myfaces/AccessingOneManagedBeanFromAnother>
>
>     On Thu, 2006-01-19 at 12:57 +0100, Enrique Medina wrote:
>     > Anyone can give me some hints on how to refer from one component to
>     > another using EL, or maybe when creating the components dynamically
>     > through code?
>
>
>


--
Mario



Reply via email to