]
Dupont Dupont updated SEAMFACES-250:
------------------------------------
Attachment: UIInputContainer.java
UIInputContainer tested with JBoss 7.1.0 and WAS 8.0.? (myfaces 2.0.5).
It fixes both this issue and SEAMFACES-248.
UIInputContainer enclose attribute doesn't work
-----------------------------------------------
Key: SEAMFACES-250
URL:
https://issues.jboss.org/browse/SEAMFACES-250
Project: Seam Faces
Issue Type: Feature Request
Reporter: Dupont Dupont
Attachments: UIInputContainer.java
UIInputContainer enclose attribute doesn't work
Using enclose attribute with UIInputContainer should generate an HTML div.
This is not the case.
It is due to the fact that UIInputContainer expects a java.lang.Boolean and jsf
implementation return a java.lang.String (see
[
JAVASERVERFACES-2142|http://java.net/jira/browse/JAVASERVERFACES-2142] and
[
MYFACES-3027|https://issues.apache.org/jira/browse/MYFACES-3027]).
Also when fixing this issue, there's a possible NPE in startContainerElement() method
(style and styleClass can be null when calling .length()).
Sample use case :
Composite
{code:xml}
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:cc="http://java.sun.com/jsf/composite">
<cc:interface componentType="org.jboss.seam.faces.InputContainer">
<cc:attribute name="label" required="true" />
<cc:attribute name="ajax" default="false" />
<cc:attribute name="inputs" default="1" />
<cc:attribute name="labelClass"/>
<cc:attribute name="enclose" default="true"/>
</cc:interface>
<cc:implementation>
<h:outputLabel id="label" for="" styleClass="control-label
#{cc.attrs.labelClass}">
<ui:fragment rendered="#{cc.attrs.invalid}">
<i class="icon-msg-err"></i>
</ui:fragment>
#{cc.attrs.label}
<h:panelGroup styleClass="required"
rendered="#{cc.attrs.required}">*</h:panelGroup> :
</h:outputLabel>
<div class="controls">
<ui:fragment>
<cc:insertChildren />
</ui:fragment>
<ui:fragment rendered="#{cc.attrs.invalid}">
<p class="help-block"><h:message id="message#{1}"
for=""/></p>
</ui:fragment>
</div>
</cc:implementation>
</ui:composition>
{code}
Composite usage :
{code:xml}
<field:edit id="nom"
label="#{messages['chargeClientele.nom.label']}">
<h:inputText id="input"
value="#{chargeClienteleController.instance.nom}"
styleClass="input-small" required="true"/>
</field:edit>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: