How to create commandlink programmatically

后端 未结 1 1687
醉酒成梦
醉酒成梦 2021-01-21 09:56

We have a system built on seam/richfaces. There\'s this webpage where the tables are rendered from dynamic context (from multiple different datasources, and each of them uses a

相关标签:
1条回答
  • 2021-01-21 10:10
    HtmlAjaxCommandLink commandLink = new HtmlAjaxCommandLink();
    commandLink.addActionListener(new SetPropertyActionListener(target, value));
    column.getChildren().add(commandLink);
    

    where target and value are ValueExpression's. These can be created with:

    ExpressionFactory.getInstance().createValueExpression(ctx, expression, expectedType)

    And the required ELContext can be obained via FacesContext.getCurrentContext().getELContext()

    0 讨论(0)
提交回复
热议问题