开发者

Using ViewHandler.writeState with JSF

开发者 https://www.devze.com 2023-02-28 20:44 出处:网络
I\'ve Overwritten the ViewHandler so that i can hide some elements. what I do is for a given element in writeState

I've Overwritten the ViewHandler so that i can hide some elements. what I do is for a given element in writeState i put

component.setRendered(false);

I'm having a strange behaviour.

In this example i render false the component with id = "masterTabs" if my page contains this

    <h:form></h:form&开发者_StackOverflow中文版gt;
    <h:panelGroup  id="masterTabs">
      part that should be hidden
    </h:panelGroup>

It works Correctly, but if i omit the <h:form> It always shows it.

So when in my page i have only

<h:panelGroup  id="masterTabs">
  part that should be hidden
</h:panelGroup>

It is always visible, even though in debug mode i can see that in writeState it is setting render to false for this component.

Thank you.

0

精彩评论

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