`

augmentIdReference 错误

    博客分类:
  • JSF
阅读更多

把HtmlMessage写在后台的BackBean如下所示:

 

HtmlAjaxOutputPanel outputPanel = (HtmlAjaxOutputPanel) context
					.getApplication().createComponent(
							HtmlAjaxOutputPanel.COMPONENT_TYPE);
			outputPanel.setId(extType.getPropertyName()+"_outputPanelId");
			outputPanel.setStyleClass("pfoutpanel");
			outputPanel.setAjaxRendered(true);

			HtmlMessage message = (HtmlMessage) context.getApplication()
					.createComponent(HtmlMessage.COMPONENT_TYPE);
			message.setFor("pfAuto-" + extType.getPropertyName());
			outputPanel.getChildren().add(message);
 

会报augmentIdReference 错误

原因是没给message赋一个id,加下面一句话就可以了。

 

message.setId(extType.getPropertyName()+"_messageId");

 

 

 

 

参见:http://forum.java.sun.com/thread.jspa?messageID=10063594&tstart=0

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics