2 Replies Latest reply on Jan 7, 2009 10:12 AM by aditya bora

    Dynamic ui:include, how?

    Tobias Hill Newbie

      I like to include snippets on a page based on a variable ... as this:

      <ui:include src="foo/bar/#{var}.xhtml"/>

      It works fine as long as var matches a file in that directory. Unfortunately the ui:include seems to be evaluated regardless of whether I surround it with a tag where rendered evaluates to false. Hence, when var is not set the path expression is still evaluated.

      As a consequence I get feedback page with this error:

      /foo/bar/dsn.xhtml not found at jndi:/localhost/foo/bar/dsn.xhtml

      So ... anyone with any ideas to accomplish this dynamic inclusion for a subset of my pages?