is the init sequence by jsf so that the application frist set
component bindings? really interesting, in that case thanks for the
hint.

2007/4/10, Kito D. Mann <[EMAIL PROTECTED]>:
> From: David Steinkopff [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 10:06 AM
> To: MyFaces Discussion
> Subject: Re: [ Tobago ] problem with component binding
>
> I construct a UIInput object
>
> textfield = new UIInput();
> textfield.setValue("hello UIInput");
> textfield.setId("textfield");
>
> getter and setter
>
> public UIInput getTextfield() {
>     return textfield;
> }
> public void setTextfield(UIInput textfield) {
>     this.textfield = textfield;
> }
>

This is probably unrelated to your problem, but in general you should avoid
creating a component via new. You should either use
Application.createComponent or simply initialize the component in your
setter:

 public void setTextfield(UIInput textfield) {
   this.textfield = textfield;
   textfield.setValue("hello UIInput");
   textfield.setId("textfield");
 }

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann ([EMAIL PROTECTED])
Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info


Reply via email to