Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,29 +197,29 @@
<XModelAttribute PROPERTIES="category=general" name="default" xmlname="default"/>
<XModelAttribute PROPERTIES="category=general" default="false"
name="required" xmlname="required">
<Constraint loader="List">
<Constraint loader="ListString">
<value name="true"/>
<value name="false"/>
</Constraint>
<Editor name="List"/>
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general" name="applyTo" xmlname="applyTo"/>
<XModelAttribute PROPERTIES="category=general" name="type" xmlname="type"/>
<XModelAttribute PROPERTIES="category=general" default="false"
name="preferred" xmlname="preferred">
<Constraint loader="List">
<Constraint loader="ListString">
<value name="true"/>
<value name="false"/>
</Constraint>
<Editor name="List"/>
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general" default="false"
name="expert" xmlname="expert">
<Constraint loader="List">
<Constraint loader="ListString">
<value name="true"/>
<value name="false"/>
</Constraint>
<Editor name="List"/>
<Editor name="ListString"/>
</XModelAttribute>
<XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
<Editor name="Note"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!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:composite="http://java.sun.com/jsf/composite">

<composite:interface>
<composite:attribute name="label"/>
<composite:attribute name="value" required="#{cc.attrs.label}"/>
<composite:attribute name="action" required="true" method-signature="java.lang.String f()"/>
<composite:attribute name="submitlabel"/>
</composite:interface>

<composite:implementation>
<h:form>
<h:outputText value="#{cc.attrs.label}" />
<h:inputText value="#{cc.attrs.value}" />
<h:commandButton action="#{cc.attrs.action}" value="#{cc.attrs.submitlabel}" />
</h:form>
</composite:implementation>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,12 @@ private boolean isMarkerExist(IMarker[] markers, String markerMesssage) throws C
}
return false;
}

public void testJSF2ComponentsConstraint() throws Exception {
IResource resource = project.findMember("/WebContent/resources/xdata/data.xhtml"); //$NON-NLS-1$
assertTrue(resource.exists());
IMarker[] markers = resource.findMarkers("org.jboss.tools.jst.web.constraintsmarker", true, 0);
assertEquals(0, markers.length);
}

}