We are using Primefaces library for development of JSF components in our application. I need different subviews(subcomponents) to be embedded in primary views(components). For example : I need to embed securityXXX.xhtml in both clientXXX.xhtml and marketXXX.xhtml.securityXXX.xhtml itself contains sub-menus(Example : checkbox,drop-down etc).
securityXXX.xhtml is already embedded in clientXXX.xhtml.Now I need to embed securityXXX.xhtml in marketXXX.xhtml but I need to introduce a new sub-menu in securityXXX.xhtml which is required in case of marketXXX.xhtml but not in clientXXX.xhtml.
Is there any way I can hide/show sub-menus in securityXXX.xhtml and display same in clientXXX.xhtml and marketXXX.xhtml according to my need.Can securityXXX.xhtml be re-usable? I know one of the rendered and visible attributes can be useful for this.Please correct me if I am wrong.I am new to JSF.Please provide me a demonstration/example if possible