【问题标题】:Passing a value to bean in commandButton in JSF 1.2在 JSF 1.2 的 commandButton 中将值传递给 bean
【发布时间】:2014-03-25 14:56:18
【问题描述】:

如何在 JSF 1.2 中使用 h:commandButton 将变量传递给托管 bean。我们有 <f:param><f:attribute> 在 JSF 2 中工作。在 JSF 1.2 中有没有类似的方式来传递值。

谢谢。

【问题讨论】:

    标签: jsf-1.2


    【解决方案1】:

    您可以为此使用f:setPropertyActionListener

        <h:commandButton style="display: none;"
            action="#{chAction.selectClient}" immediate="true">
            <f:setPropertyActionListener target="#{chAction.selectedClientId}"
                value="#{res.clientId}" />
        </h:commandButton>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-27
      • 2012-08-10
      • 1970-01-01
      • 1970-01-01
      • 2011-06-09
      • 1970-01-01
      • 1970-01-01
      • 2011-02-02
      相关资源
      最近更新 更多