[JBoss JIRA] Created: (SEAMFACES-183) I cannot insert value expressions with the composite components property
by luca stancapiano (JIRA)
I cannot insert value expressions with the composite components property
------------------------------------------------------------------------
Key: SEAMFACES-183
URL: https://issues.jboss.org/browse/SEAMFACES-183
Project: Seam Faces
Issue Type: Bug
Components: UI Components
Affects Versions: 3.0.1
Environment: seam 3.0.1 + mojarra 2.0.3.b5
Reporter: luca stancapiano
Fix For: 3.0.1
If I use a value expression in a composite component, it is rejected and moved to a default value. Here an example of a jsp:
<ui:composition ................
xmlns:p="http://java.sun.com/jsf/composite/components/property"
.........
<p:input id="number" label="#{bundles.messages.receipt_number}">
............
</p:input>
<h:button id="cancel" value="#{bundles.messages.template_linkReset}" outcome="/receipt.xhtml"/>
...........
The problem is inside the encodeBegin method of org.jboss.seam.faces.component.UIInputContainer class:
...............
if (!getAttributes().containsKey(getRequiredAttributeName()) && elements.hasRequiredInput()) {
getAttributes().put(getRequiredAttributeName(), true);
}
if (!getAttributes().containsKey(getLabelAttributeName())) {
getAttributes().put(getLabelAttributeName(), generateLabel(elements, context));
}
...............
The containsKey method of the javax.faces.component.UIComponentBase$AttribuetsMap class ignores all keys from a subclass of the UIComponentBase, in our case the UIInputContainer. Doing an:
getAttributes().get(getLabelAttributeName())
we get the correct result. This achievement is showed in the JSF javadocs (http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/compo...):
If the attribute name specified as a key matches a property of this UIComponent's implementation class, the following methods will have special behavior:
containsKey - Return false.
get() - If the property is readable, call the getter method and return the returned value (wrapping primitive values in their corresponding wrapper classes); otherwise throw IllegalArgumentException.
put() - If the property is writeable, call the setter method to set the corresponding value (unwrapping primitive values in their corresponding wrapper classes). If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw IllegalArgumentException.
remove - Throw IllegalArgumentException.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] Created: (SEAMWICKET-34) Tests are skipped even in the jbossas-remote-6 profile
by Marek Schmidt (JIRA)
Tests are skipped even in the jbossas-remote-6 profile
------------------------------------------------------
Key: SEAMWICKET-34
URL: https://issues.jboss.org/browse/SEAMWICKET-34
Project: Seam for Apache Wicket
Issue Type: Bug
Affects Versions: 3.0.0.Final
Environment: jbossas6
Reporter: Marek Schmidt
mvn clean test -Pjbossas-remote-6
does not run the tests, even though the jbossas-remote-6 profile exists. maven-surefire-plugin should probably only skipTests in a default profile.
Also note that the test does not work when enabled with the following error:
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///home/maschmid/java/jboss-6.0.0.Final/server/default/deploy/test.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Inject org.jboss.seam.wicket.test.application.ConversationObjectProducer.log]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months