【问题标题】:All embeded components in TapestryTapestry 中的所有嵌入组件
【发布时间】:2017-03-31 13:16:44
【问题描述】:

我正在使用 Tapestry 5.3.8。我想找到一种方法来告诉我给定容器中是否有某些特定元素。我发现了这样的东西:

containerResources.getEmbeddedComponent(elementId)

但是这种方法的问题是,当没有时,它会抛出异常。我看不到任何其他方法。

问题:是否有任何其他方法可以检查某个元素是否在给定的容器内,或者是否有任何方法可以检查。列出给定容器中的所有可用组件?

【问题讨论】:

    标签: java tapestry


    【解决方案1】:

    【讨论】:

    • 看起来很有希望。但是,当我尝试这个时,我收到一个空列表:((使用 containerResources.getEmbeddedComponent(elementId) 返回正确的元素)
    • 啊,它似乎只包括由@Component 注释定义的嵌入式组件。我猜ComponentModel#getEmbeddedComponentModel(...) 那时差不多。
    猜你喜欢
    • 2011-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-11
    • 2014-02-27
    • 2021-05-08
    相关资源
    最近更新 更多