Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Sometimes I find myself creating <h:panelGroup> or containers just to use the rendered attribute on some html markup. It would be quite amazing if I could annotate any html with the jsf:rendered attribute and have JSF create a component behind the scenes to encapsulate that markup. that way I could just do <div jsf:rendered="#

      {isLoggedIn}

      >...content...</div>. Maybe a component dedicated for that purpose could be created (just to hold the html markup that is), excuse me is this is already possible, but I often find myself wishing this feature were available.

        Activity

        gabz90 created issue -
        Ed Burns made changes -
        Field Original Value New Value
        Assignee Ed Burns [ edburns ]
        Hide
        Ed Burns added a comment -

        I'm happy to report this just works with the HTML5 passthrough element support. Check this:

        <!DOCTYPE html>
        <html xmlns="http://www.w3.org/1999/xhtml"
              xmlns:myNS="http://xmlns.jcp.org/jsf">
            
            <div myNS:rendered="true">
        
        <form myNS:id="form">
            
            <input name="textField" type="text" myNS:value="#{bean.text1}" />
        
            <input type="submit" myNS:id="submitButton" value="submit" />
            
            <p>submitted text: #{bean.text1}.</p>
        
        </form>
                
            </div>
        
        </html>
        

        The rhs of the rendered attribute can just as well be an EL expression.

        Show
        Ed Burns added a comment - I'm happy to report this just works with the HTML5 passthrough element support. Check this: <!DOCTYPE html> <html xmlns= "http: //www.w3.org/1999/xhtml" xmlns:myNS= "http: //xmlns.jcp.org/jsf" > <div myNS:rendered= " true " > <form myNS:id= "form" > <input name= "textField" type= "text" myNS:value= "#{bean.text1}" /> <input type= "submit" myNS:id= "submitButton" value= "submit" /> <p>submitted text: #{bean.text1}.</p> </form> </div> </html> The rhs of the rendered attribute can just as well be an EL expression.
        Ed Burns made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Works as designed [ 7 ]
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out
        Manfred Riem made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            gabz90
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: