5 Replies Latest reply on Oct 11, 2007 10:54 AM by Pete Muir

    <h:selectBooleanCheckbox>

    Andrew Batman Newbie

      I have <h:selectBooleanCheckbox value="true" /> inside and outside of the loop. The property "value" isn't rendered inside the loop but when it is outside, everything is ok.
      what is the problem in?

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:ui="http://java.sun.com/jsf/facelets">
       <head>
       <title></title>
       </head>
       <body>
       <h:form>
       <h:selectBooleanCheckbox value="true" />
       <ui:repeat value="#{testListCommodities.commodities}" var="currentCommodity">
       <h:selectBooleanCheckbox value="true" />
       </ui:repeat>
       </h:form>
       </body>
      </html>


      Resulted Html :
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
      <html xmlns="http://www.w3.org/1999/xhtml">
       <head>
       <title></title>
       </head>
       <body>
      <form id="j_id2" name="j_id2" method="post" action="/mageric-start-web/test/test.seam" enctype="application/x-www-form-urlencoded">
      <input type="hidden" name="j_id2" value="j_id2" />
      
      <input type="checkbox" name="j_id2:j_id3" checked="checked" />
      
      <input type="checkbox" name="j_id2:j_id4:0:j_id5" />
      <input type="checkbox" name="j_id2:j_id4:1:j_id5" />
      <input type="checkbox" name="j_id2:j_id4:2:j_id5" />
      <input type="checkbox" name="j_id2:j_id4:3:j_id5" />
      <input type="checkbox" name="j_id2:j_id4:4:j_id5" />
      <input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id1" />
      </form>
       </body>
      
      </html>