jsf - Facelet Custom Component - prevent rendering -


after reading this answer, still stumped. agree jstl should avoided , understand how evaluation occurs in wrong phase. however, per documentation on facelets development site, appears <ui:fragment> tags supports 2 attributes, id , binding. so, if implementation support rendered, seems tempting fate make use of it. other suggestion use <h:panelgroup>, however, inserts <div> element in response cause undesirable side effects (like changing content inline block). know way around this? in particular, attempting following:

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"  "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">  <html xmlns:ice="http://www.icesoft.com/icefaces/component"    xmlns:f="http://java.sun.com/jsf/core"   xmlns:ui="http://java.sun.com/jsf/facelets">   <ui:composition>      <ice:selectonelistbox binding="#{binding}" rendered="#{modeexisting}">       <f:selectitems         value="#{binding.alltagsselectitems}" />     </ice:selectonelistbox>     <ice:inputtext binding="#{binding.name}" />     <ice:inputtext binding="#{binding.description}" />   </ui:composition>  </html> 

which listbox used select element name , description when selected allow user edit them. put <ice:panelgroup> around block, , use rendered attribute of it, again, there side effects of injecting additional div. there way make work?

also, may worth mentioning using above custom component paired facelet-taglib:

<?xml version="1.0"?> <!doctype facelet-taglib public  "-//sun microsystems, inc.//dtd facelet taglib 1.0//en"  "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">   <facelet-taglib>   <namespace>http://www.mitre.org/asias/jsf</namespace>   <tag>     <tag-name>configurationtageditor</tag-name>     <source>../component/configurationtageditor.xhtml</source>   </tag>   <tag>     <tag-name>configurationtagselector</tag-name>     <source>../component/configurationtagselector.xhtml</source>   </tag>   <tag>     <tag-name>configurationtagregextable</tag-name>     <source>../component/configurationtagregextable.xhtml</source>   </tag> </facelet-taglib> 

to allow me use in jsf xhtml:

... <ice:paneltab label="existing" styleclass="configurationtagsexisting">   <m:configurationtageditor tag="#{configuration.existingtag}" /> </ice:paneltab> ... 

the other suggestion use <h:panelgroup>, however, inserts <div> element in response

the <h:panelgroup> doesn't render <div> default. renders if add layout="block". other html attributes (like id, styleclass, etc), renders <span>. if no layout attribute present , other html attributes absent, renders nothing.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -