开发者

Grouping tag in JSF not rendering anything?

Is there any tag in JSF which can be used to assign some id to group of child tags, but not rendering any content? Something like this:

<h:unknowntag id="grou开发者_运维知识库p">
  <h:inputText id="name" value="#{bean.name}" required="true">
    <f:ajax event="blur" execute="name" render="group" />
  </h:inputText>
  <h:message for="name"/>
</h:unknowntag>

I don't need <h:unknowntag> to render any content, but I need it to set id to whole group which I want to rerender after ajax event. Is there such a tag in JSF 2.0?


You can use the <h:panelGroup> for this. It renders a <span>, but that does not harm since it has no special meaning in HTML markup. You need an element anyway since the id has to be put somewhere in HTML DOM so that JS/Ajax can locate it for re-render.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜