CVS: Tapestry/framework/src/net/sf/tapestry/spec ListenerBindingSpecification.java,NONE,1.1.2.1 SpecFactory.java,1.11,1.11.2.1 BindingType.java,1.9,1.9.2.1
Howard Lewis Ship <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/spec
In directory sc8-pr-cvs1:/tmp/cvs-serv2336/framework/src/net/sf/tapestry/spec
Modified Files:
Tag: hship-2-3
SpecFactory.java BindingType.java
Added Files:
Tag: hship-2-3
ListenerBindingSpecification.java
Log Message:
Add support for <listener-binding>.
Use a ResourceBundle for "factory default" configuration properties.
--- NEW FILE: ListenerBindingSpecification.java ---
package net.sf.tapestry.spec;
/**
* Special subclass of {@link net.sf.tapestry.spec.BindingSpecification} used
* to encapsulate additional information the additional information
* specific to listener bindings. In a ListenerBindingSpecification, the
* value property is the actual script (and is aliased as property script),
* but an additional property,
* language, (which may be null) is needed. This is the language
* the script is written in.
*
* @author Howard Lewis Ship
* @version $Id: ListenerBindingSpecification.java,v 1.1.2.1 2003/01/04 02:46:48 hship Exp $
* @since 2.4
*
**/
public class ListenerBindingSpecification extends BindingSpecification
{
protected String _language;
public ListenerBindingSpecification(String language, String script)
{
super(BindingType.LISTENER, script);
_language = language;
}
public String getLanguage()
{
return _language;
}
public String getScript()
{
return getValue();
}
}
Index: SpecFactory.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/spec/SpecFactory.java,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -d -r1.11 -r1.11.2.1
*** SpecFactory.java 27 Nov 2002 17:58:52 -0000 1.11
--- SpecFactory.java 4 Jan 2003 02:46:47 -0000 1.11.2.1
***************
*** 78,81 ****
--- 78,94 ----
return new BindingSpecification(type, value);
}
+
+ /**
+ * Creates a new instance of {@link ListenerBindingSpecification} for the
+ * given language (which is option) and script.
+ *
+ * @since 2.4
+ *
+ **/
+
+ public ListenerBindingSpecification createListenerBindingSpecification(String language, String script)
+ {
+ return new ListenerBindingSpecification(language, script);
+ }
/**
Index: BindingType.java
===================================================================
RCS file: /cvsroot/tapestry/Tapestry/framework/src/net/sf/tapestry/spec/BindingType.java,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C2 -d -r1.9 -r1.9.2.1
*** BindingType.java 27 Nov 2002 17:58:52 -0000 1.9
--- BindingType.java 4 Jan 2003 02:46:48 -0000 1.9.2.1
***************
*** 41,48 ****
--- 41,63 ----
* Indicates a {@link net.sf.tapestry.binding.FieldBinding}.
*
+ * <p>
+ * Field bindings are only available in the 1.3 DTD. The 1.4 DTD
+ * does not support them (since OGNL expressions can do the same thing).
+ *
**/
public static final BindingType FIELD = new BindingType("FIELD");
+ /**
+ * Indicates a {@link net.sf.tapestry.binding.ListenerBinding}, a
+ * specialized kind of binding that encapsulates a component listener
+ * as a script. Uses a subclass of {@link BindingSpecification},
+ * {@link ListenerBindingSpecification}.
+ *
+ * @since 2.4
+ *
+ **/
+
+ public static final BindingType LISTENER = new BindingType("LISTENER");
/**
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf