Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-alpha
-
None
-
None
Description
I created a simple custom behavior, that requires (more ships ) a simple JS file. On the RI (run-time testing) it works. Not so on myfaces2 trunk
My class:
package net.wessendorf;
import java.util.EnumSet;
import java.util.Set;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.behavior.ClientBehaviorBase;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.component.behavior.ClientBehaviorHint;
import javax.faces.component.behavior.FacesBehavior;
@FacesBehavior("net.wessendorf.Confirm")
@ResourceDependencies({
@ResourceDependency(name="tester.js", library="wessi", target="head")
})
public class TestConfirmBehavior extends ClientBehaviorBase
{
@Override
public String getScript(ClientBehaviorContext behaviorContext)
@Override
public Set<ClientBehaviorHint> getHints()
}
taglib.xml file:
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
version="2.0">
<namespace>http://wessendorf.net/behavior</namespace>
<tag>
<tag-name>confirm</tag-name>
<behavior>
<behavior-id>net.wessendorf.Confirm</behavior-id>
</behavior>
</tag>
</facelet-taglib>
tester.js file:
test = function()
{
alert('HALLO JSF2');
}