• Type: Sub-task Sub-task
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Facelets/VDL
    • Labels:
    • Status Whiteboard:

      size_medium importance_medium

      size_medium importance_medium


      Currently there is no way to find out (except from ugly and/or implementation-specific hacks) to find out if a user provided content for a <ui:insert name="xxx"/> or not.

      Scenario: Imagine you want to provide an optional search form, which the user can define via <ui:define name="searchForm">. Then you can insert it via <ui:insert name="searchForm" />. However, what if you have to render some additional markup around the user provided search form, but you don't want to render it if the user did not provide a search form?

      One very ugly workaround is to use a h:panelGroup, which you bind to a bean, use <ui:insert name="searchForm" /> as the only child and check via the binding if the h:panelGroup has any children.

      It would be very nice to have an EL expression to check this stuff, or maybe to have a special facelets tag which only renders its content if a specific template is available, e.g. (note that I am not very good with names) <ui:ifTemplateAvailable name="">....<ui:insert name="xxx" /> ...</ui:...>

      From the MyFaces-impl point of view, I think it is not very hard to implement.


        Jakob Korherr created issue -
        Ed Burns made changes -
        Field Original Value New Value
        Status Whiteboard size_medium importance_medium
        Ed Burns made changes -
        Parent JAVASERVERFACES_SPEC_PUBLIC-717 [ 20322 ]
        Issue Type Improvement [ 4 ] Sub-task [ 5 ]
        Ed Burns made changes -
        Assignee Ed Burns [ edburns ]
        Ed Burns made changes -
        Priority Major [ 3 ] Trivial [ 5 ]
        Manfred Riem made changes -
        Priority Trivial [ 5 ] Minor [ 4 ]


          • Assignee:
            Jakob Korherr
          • Votes:
            1 Vote for this issue
            2 Start watching this issue


            • Created: