users@woodstock.java.net

setId() breaks Ajax?

From: autozoom <cioni_mauro_at_yahoo.com>
Date: Tue, 5 Feb 2008 07:17:19 -0800 (PST)

I am adding a button to the page using:

public void prerender() {
  Button button = new Button();
  button.setId("ciao");
  JSFActionManager.setValueExpression(button, "text", "#{Page1.txt}");
  button.setStyle("left: 210px; top: 3px; position: absolute");
  form1.getChildren().add(button);
}
...
public String getTxt() {
   return (new Date()).toString();
}

public void setTxt(String t) {
}

this renders the button but calling
$("form1:ciao").refresh() via Javascript doesn't refresh the button as it
should.

But if I remove the button.setId("ciao"), everything works fine.

Does this mean that I cannot use my own ids when dynamically adding
components to the page?

-- 
View this message in context: http://www.nabble.com/setId%28%29-breaks-Ajax--tp15291220p15291220.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.