[seam-issues] [JBoss JIRA] (SEAMFACES-250) UIInputContainer enclose attribute doesn't work

Dupont Dupont (JIRA) jira-events at lists.jboss.org
Tue Jan 15 08:53:21 EST 2013


    [ https://issues.jboss.org/browse/SEAMFACES-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745889#comment-12745889 ] 

Dupont Dupont commented on SEAMFACES-250:
-----------------------------------------

Also with when using myfaces, MYFACES-3182 will prevent default composite value to work when calling getAttributes().

You'll need get the value calling the el #{cc.attrs.enclose} if you want to be compatible with myfaces 2.0.7 and 2.1.1.
                
> 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
>
> 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: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list