facebook

Very Strange behavior with rendered attribute!

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #237479 Reply

    Robin zou
    Member

    hi, i have the following code piece:

    <h:panelGrid columns="1" id="movieCenterMenu" columnClasses="displayPanel" styleClass="menuStyle">  
         <h:panelGrid rendered=[b]"not #{MovieCenter.doSearch}" [/b]columns="1" id="[b]tempGrid[/b]" columnClasses="displayPanel" styleClass="menuStyle">
           <h:commandLink value="#{bundle.searchLink}" action="#{MovieCenter.search}" id="goSearch" styleClass="headerLinkStyle">
           </h:commandLink>
         </h:panelGrid>
           <h:inputText rendered=[b]"#{MovieCenter.doSearch}" [/b]required="false" id="[b]searchField[/b]"
                    value="#{MovieCenter.searchMovie}" />
           <h:commandButton value="#{bundle.searchButtonLabel}" rendered="#{MovieCenter.doSearch}"
                    action="#{MovieCenter.display}" id="searchButton" />
      
           <h:dataTable value="#{MovieCenter.movies}" rendered="not #{MovieCenter.doSearch}" first="0"
                    var="movie" border="1" id="moviesTable">
              <h:column>
                 <f:facet name="header">
                    <h:outputText value="#{bundle.movieTableHeader}" ></h:outputText>
                 </f:facet>
                <h:commandLink actionListener="#{MovieCenter.showDetailAction}" value="#{movie}">
                </h:commandLink>
              </h:column>
           </h:dataTable>
    </h:panelGrid>

    As you see, the panal grid “tempGrid” should not display together with the inputText “searchField“, as their rendered attribute values will always controdict!
    But when i run it on tomcat, they are displayed together, but the dataTable is working in the right way, that is not displayed together with the inputText “searchField“.
    What’s happening?
    Best Regards:)

    #237538 Reply

    Riyad Kalla
    Member

    In addition to posting here try and cross-post to the Sun JSF forums: http://forums.java.sun.com/forum.jspa?forumID=427

    Those guys are pretty sharp cookies.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Very Strange behavior with rendered attribute!

You must be logged in to post in the forum log in