我想从 UIComponent 生成 facelets 代码,例如:
org.primefaces.component.commandbutton.CommandButton;
CommandButton btn=new CommandButton();
btn.setValue("Click");
对于此代码,必须生成以下标签
<p:commandButton value="Click" />
我需要的是在 bean 中生成与 UIComponent 对象相对应的 facelet 代码,并且代码必须在以后存储和使用。
是否可以??