tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r295052 - in /jakarta/tapestry/trunk: ./ config/ examples/Vlib/ examples/Vlib/src/context/ examples/Vlib/src/context/WEB-INF/ examples/Vlib/src/java/org/apache/tapestry/vlib/pages/admin/ examples/Workbench/ framework/ framework/src/descript...
Date Wed, 05 Oct 2005 17:46:07 GMT
Author: hlship
Date: Wed Oct  5 10:45:44 2005
New Revision: 295052

URL: http://svn.apache.org/viewcvs?rev=295052&view=rev
Log:
Remove support for BSF and <listener-binding> element in specs
Continue revving Virtual Library for Tapestry 4.0

Removed:
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/binding/ListenerBinding.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/binding/ListenerBindingFactory.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/BSFManagerFactory.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/BSFManagerFactoryImpl.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/IListenerBindingSpecification.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/ListenerBindingSpecification.java
    jakarta/tapestry/trunk/framework/src/scripts/TestListenerBinding.xml
    jakarta/tapestry/trunk/framework/src/test-data/context7/
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/binding/TestListenerBinding.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c7/
Modified:
    jakarta/tapestry/trunk/.classpath
    jakarta/tapestry/trunk/config/common.properties
    jakarta/tapestry/trunk/examples/Vlib/build.xml
    jakarta/tapestry/trunk/examples/Vlib/src/context/EditUsers.html
    jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.page
    jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.properties
    jakarta/tapestry/trunk/examples/Vlib/src/java/org/apache/tapestry/vlib/pages/admin/EditUsers.java
    jakarta/tapestry/trunk/examples/Workbench/build.xml
    jakarta/tapestry/trunk/framework/build.xml
    jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.page.xml
    jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.props.xml
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseMessages.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseStrings.properties
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/BindingType.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/SpecFactory.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/TapestryTestCase.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/ListenerBinding.page
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java
    jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/configuration.xml
    jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/spec.xml
    jakarta/tapestry/trunk/src/documentation/content/xdocs/dependencies.xml

Modified: jakarta/tapestry/trunk/.classpath
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/.classpath?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
Binary files - no diff available.

Modified: jakarta/tapestry/trunk/config/common.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/config/common.properties?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/config/common.properties (original)
+++ jakarta/tapestry/trunk/config/common.properties Wed Oct  5 10:45:44 2005
@@ -17,10 +17,8 @@
 ognl.version=2.6.7
 codec.version=1.3
 fileupload.version=1.0
-bsf.version=2.3.0
 logging.version=1.0.4
 oro.version=2.0.8
 servlet.version=2.3
 log4j.version=1.2.8
-jboss-j2ee.version=4.0.0DR4
-mckoi.version=1.0.2
\ No newline at end of file
+jboss-j2ee.version=4.0.0DR4
\ No newline at end of file

Modified: jakarta/tapestry/trunk/examples/Vlib/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Vlib/build.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Vlib/build.xml (original)
+++ jakarta/tapestry/trunk/examples/Vlib/build.xml Wed Oct  5 10:45:44 2005
@@ -41,7 +41,6 @@
     <project-dependency artifact="tapestry-contrib"    use="run"/>
     <project-dependency artifact="tapestry-annotations" use="run"/>
 
-    <ibiblio-dependency artifact="bsf"                version="${bsf.version}"      group="bsf"               use="run"/>
     <ibiblio-dependency artifact="commons-codec"      version="${codec.version}"    group="commons-codec"     use="run"/>
     <ibiblio-dependency artifact="commons-fileupload" version="${fileupload.version}" group="commons-fileupload" use="run"/>        
     <ibiblio-dependency artifact="commons-logging"    version="${logging.version}"  group="commons-logging"   use="run"/>

Modified: jakarta/tapestry/trunk/examples/Vlib/src/context/EditUsers.html
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Vlib/src/context/EditUsers.html?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Vlib/src/context/EditUsers.html (original)
+++ jakarta/tapestry/trunk/examples/Vlib/src/context/EditUsers.html Wed Oct  5 10:45:44 2005
@@ -1,60 +1,64 @@
+<!DOCTYPE html
+[
+  <!ENTITY nbsp ''>
+]>
 <html jwcid="$content$">
-<body jwcid="@Border">
-<p>This page is used to edit the roster of users on the system.</p>
-<ul>
-	<li>Admin: If checked, the user is an administrator.</li>
-	<li>Locked Out: If checked, the user will not be allowed to login.</li>
-	<li>Change Password:  If checked, the a new password will be assigned to the user.</li>
-	<li>Delete:  If checked, the user will be irrevocably removed from the Virtual Library database.
-Any books owned by the user will be transferred to the current user.</li>
-</ul>
-
-<span jwcid="@ShowMessage"/>
-<span jwcid="@ShowError"/>
-<span jwcid="@ShowValidationError" delegate="ognl:validationDelegate"/>
-
-<form jwcid="@Form" listener="listener:updateUsers" delegate="ognl:validationDelegate">
-	
-  <table width="100%" class="data">
-    <tr>
-      <th>User / E-Mail
-      </th>
-      <th>Admin
-      </th>
-      <th>Locked&nbsp;Out
-      </th>
-      <th>Change&nbsp;Password
-      </th>
-      <th>Delete
-      </th>
-    </tr>
-    <tr jwcid="listEdit">
-      <td><span jwcid="@Insert" value="ognl:user.naturalName">Joe User</span>
-<br>
-<span jwcid="@Insert" value="ognl:user.email">foo@bar.com</span>
-      </td>
-      <td class="checkbox"><input type="checkbox" jwcid="inputAdmin@Checkbox" selected="ognl:user.admin"/>
-      </td>
-      <td class="checkbox"><input type="checkbox" jwcid="inputLockedOut@Checkbox" selected="ognl:user.lockedOut"/>
-      </td>
-      <td class="checkbox"><input type="checkbox" jwcid="inputResetPassword@Checkbox" selected="ognl:listEditMap.resetPassword"/>
-      </td>
-      <td class="checkbox"><input type="checkbox" jwcid="inputDelete@Checkbox" selected="ognl:listEditMap.deleted"/>
-      </td>
-    </tr>
-  </table>
-  
-  <table class="form">
-  <tr>
-  	<th><span jwcid="@FieldLabel" field="ognl:components.inputPassword"/></th>	
-  	<td><input type="text" jwcid="inputPassword" size="20" maxlength="20"/></td>
-  </tr>
-  <tr>
-  	<td></td>	
-  	<td><input type="image" src="images/update.png" width="52" height="20" alt="Update"/></td>
-  </tr>
-  
-  </table>
-</form>
-</body>
+  <body jwcid="border@Border">
+    <p>This page is used to edit the roster of users on the system.</p>
+    <ul>
+      <li>Admin: If checked, the user is an administrator.</li>
+      <li>Locked Out: If checked, the user will not be allowed to login.</li>
+      <li>Change Password: If checked, the a new password will be assigned to the user.</li>
+      <li>Delete: If checked, the user will be irrevocably removed from the Virtual Library database. Any books owned by
+        the user will be transferred to the current user.</li>
+    </ul>
+    <span jwcid="@ShowMessage"/>
+    <span jwcid="@ShowValidationError" delegate="ognl:validationDelegate"/>
+    <form jwcid="form">
+      <table width="100%" class="data">
+        <tr>
+          <th>User / E-Mail </th>
+          <th>Admin </th>
+          <th>Locked&nbsp;Out </th>
+          <th>Change&nbsp;Password </th>
+          <th>Delete </th>
+        </tr>
+        <tr jwcid="loop">
+          <td>
+            <span jwcid="@Insert" value="ognl:user.naturalName">Joe User</span>
+            <br/>
+            <span jwcid="@Insert" value="ognl:user.email">foo@bar.com</span>
+          </td>
+          <td class="checkbox">
+            <input type="checkbox" jwcid="admin@Checkbox" selected="ognl:user.admin"/>
+          </td>
+          <td class="checkbox">
+            <input type="checkbox" jwcid="lockedOut@Checkbox" selected="ognl:user.lockedOut"/>
+          </td>
+          <td class="checkbox">
+            <input type="checkbox" jwcid="resetPassword@Checkbox" selected="ognl:resetPassword"/>
+          </td>
+          <td class="checkbox">
+            <input type="checkbox" jwcid="delete@Checkbox" selected="ognl:deleted"/>
+          </td>
+        </tr>
+      </table>
+      <table class="form">
+        <tr>
+          <th>
+            <span jwcid="@FieldLabel" field="component:password"/>
+          </th>
+          <td>
+            <input type="text" jwcid="password" size="20" maxlength="20"/>
+          </td>
+        </tr>
+        <tr>
+          <td/>
+          <td>
+            <input type="image" src="images/update.png" width="52" height="20" alt="Update"/>
+          </td>
+        </tr>
+      </table>
+    </form>
+  </body>
 </html>

Modified: jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.page
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.page?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.page (original)
+++ jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.page Wed Oct  5 10:45:44 2005
@@ -16,31 +16,27 @@
 -->
 
 <!DOCTYPE page-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
   
 <page-specification class="org.apache.tapestry.vlib.pages.admin.EditUsers">
-
-  <property-specification name="message" type="java.lang.String"/>
-  <property-specification name="error" type="java.lang.String"/>
-  <property-specification name="user" type="org.apache.tapestry.vlib.ejb.Person"/>
-  <property-specification name="listEditMap" type="org.apache.tapestry.vlib.pages.admin.UserListEditMap"/>
-  <property-specification name="password" type="java.lang.String"/>
   
-  <bean name="optional" class="org.apache.tapestry.valid.StringValidator" lifecycle="page"/>
-
-  
-  <component id="listEdit" type="ListEdit">
-  	<binding name="source" expression="listEditMap.keys"/>
-  	<binding name="value" expression="listEditMap.key"/>
-  	<binding name="listener" expression="listeners.synchronizeUser"/>
-  	<static-binding name="element" value="tr"/>
+  <component id="form" type="Form">
+    <binding name="success" value="listener:updateUsers"/>
+    <binding name="delegate" value="validationDelegate"/>
+    <binding name="clientValidationEnabled" value="true"/>
+  </component>
+    
+  <component id="loop" type="For">
+  	<binding name="source" value="userList"/>
+  	<binding name="value" value="user"/>
+  	<binding name="converter" value="userConverter"/>
+  	<binding name="element" value="literal:tr"/>
   </component>
   
-  <component id="inputPassword" type="ValidField">
-    <binding name="value" expression="password"/>
-    <binding name="validator" expression="beans.optional"/>
-    <static-binding name="displayName" value="New Password"/>	
+  <component id="password" type="TextField">
+    <binding name="value" value="password"/>
+    <binding name="displayName" value="message:new-password-label"/>	
   </component>
 
 </page-specification>

Modified: jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.properties?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.properties (original)
+++ jakarta/tapestry/trunk/examples/Vlib/src/context/WEB-INF/EditUsers.properties Wed Oct  5 10:45:44 2005
@@ -16,4 +16,5 @@
 update-failure=Unable to update users.
 read-failure=Unable to read users.
 out-of-date=The data submitted in the form is out of date.  Please try again.
-need-password=You must enter the new password for users who are having their password changed.
\ No newline at end of file
+need-password=You must enter the new password for users who are having their password changed.
+new-password-label=New Password
\ No newline at end of file

Modified: jakarta/tapestry/trunk/examples/Vlib/src/java/org/apache/tapestry/vlib/pages/admin/EditUsers.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Vlib/src/java/org/apache/tapestry/vlib/pages/admin/EditUsers.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Vlib/src/java/org/apache/tapestry/vlib/pages/admin/EditUsers.java (original)
+++ jakarta/tapestry/trunk/examples/Vlib/src/java/org/apache/tapestry/vlib/pages/admin/EditUsers.java Wed Oct  5 10:45:44 2005
@@ -15,18 +15,26 @@
 package org.apache.tapestry.vlib.pages.admin;
 
 import java.rmi.RemoteException;
-import java.util.Collection;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import javax.ejb.FinderException;
 import javax.ejb.RemoveException;
 
 import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.hivemind.HiveMind;
 import org.apache.tapestry.IRequestCycle;
-import org.apache.tapestry.PageRedirectException;
-import org.apache.tapestry.Tapestry;
+import org.apache.tapestry.annotations.InjectComponent;
+import org.apache.tapestry.annotations.InjectState;
+import org.apache.tapestry.annotations.Message;
+import org.apache.tapestry.components.IPrimaryKeyConverter;
+import org.apache.tapestry.event.PageBeginRenderListener;
 import org.apache.tapestry.event.PageEvent;
-import org.apache.tapestry.event.PageRenderListener;
+import org.apache.tapestry.form.IFormComponent;
 import org.apache.tapestry.vlib.AdminPage;
 import org.apache.tapestry.vlib.VirtualLibraryEngine;
 import org.apache.tapestry.vlib.Visit;
@@ -40,47 +48,131 @@
  * 
  * @author Howard Lewis Ship
  */
-
-public abstract class EditUsers extends AdminPage implements PageRenderListener
+public abstract class EditUsers extends AdminPage implements PageBeginRenderListener
 {
     public abstract String getPassword();
 
     public abstract void setPassword(String password);
 
-    public abstract UserListEditMap getListEditMap();
+    public abstract void setUser(Person person);
 
-    public abstract void setListEditMap(UserListEditMap listEditMap);
+    public abstract Person getUser();
 
-    public abstract void setUser(Person person);
+    public abstract void setUserList(List<Person> users);
+
+    public abstract void setUserMap(Map<Integer, Person> map);
+
+    public abstract Map<Integer, Person> getUserMap();
+
+    public abstract void setResetPasswordKeys(Set<Integer> set);
+
+    public abstract Set<Integer> getResetPasswordKeys();
+
+    public abstract void setDeleteKeys(Set<Integer> set);
+
+    public abstract Set<Integer> getDeleteKeys();
+
+    @Message
+    public abstract String outOfDate();
+
+    @Message
+    public abstract String readFailure();
+
+    @Message
+    public abstract String needPassword();
 
-    public void synchronizeUser(IRequestCycle cycle)
+    @Message
+    public abstract String updateFailure();
+
+    @Message
+    public abstract String usersUpdated();
+
+    @InjectState("visit")
+    public abstract Visit getVisitState();
+
+    @InjectComponent("password")
+    public abstract IFormComponent getPasswordField();
+
+    public class UserConverter implements IPrimaryKeyConverter
     {
-        UserListEditMap map = getListEditMap();
 
-        Person user = (Person) map.getValue();
+        public Object getPrimaryKey(Object value)
+        {
+            Person user = (Person) value;
 
-        if (user == null)
+            return user.getId();
+        }
+
+        public Object getValue(Object primaryKey)
         {
-            setError(getMessage("out-of-date"));
-            throw new PageRedirectException(this);
+            Integer id = (Integer) primaryKey;
+
+            return getUserMap().get(id);
+
+            // TODO: Handle null
         }
 
-        setUser(user);
+    }
+
+    public IPrimaryKeyConverter getUserConverter()
+    {
+        return new UserConverter();
+    }
+
+    // public void synchronizeUser(IRequestCycle cycle)
+    // {
+    // UserListEditMap map = getListEditMap();
+    //
+    // Person user = (Person) map.getValue();
+    //
+    // if (user == null)
+    // {
+    // getValidationDelegate().record(null, outOfDate());
+    // throw new PageRedirectException(this);
+    // }
+    //
+    // setUser(user);
+    // }
+
+    public boolean isDeleted()
+    {
+        return false;
+    }
+
+    public void setDeleted(boolean deleted)
+    {
+        if (deleted)
+            getDeleteKeys().add(getUser().getId());
+    }
+
+    public boolean isResetPassword()
+    {
+        return false;
+    }
+
+    public void setResetPassword(boolean resetPassword)
+    {
+        if (resetPassword)
+            getResetPasswordKeys().add(getUser().getId());
     }
 
     public void pageBeginRender(PageEvent event)
     {
-        setupListEditMap();
+        readUsers();
+        setDeleteKeys(new HashSet<Integer>());
+        setResetPasswordKeys(new HashSet<Integer>());
     }
 
-    private void setupListEditMap()
+    private void readUsers()
     {
         VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
-        Visit visit = (Visit) vengine.getVisit();
+        Visit visit = getVisitState();
 
         Integer userId = visit.getUserId();
         Person[] users = null;
 
+        List<Person> userList = new ArrayList<Person>();
+
         int i = 0;
         while (true)
         {
@@ -94,23 +186,27 @@
             }
             catch (RemoteException ex)
             {
-                vengine.rmiFailure(getMessage("read-failure"), ex, i++);
+                vengine.rmiFailure(readFailure(), ex, i++);
             }
         }
 
-        UserListEditMap map = new UserListEditMap();
+        Map<Integer, Person> map = new HashMap<Integer, Person>();
 
         for (i = 0; i < users.length; i++)
         {
             Integer id = users[i].getId();
 
+            // Skip the current user; they can't edit themself
+
             if (id.equals(userId))
                 continue;
 
-            map.add(id, users[i]);
+            map.put(id, users[i]);
+            userList.add(users[i]);
         }
 
-        setListEditMap(map);
+        setUserMap(map);
+        setUserList(userList);
     }
 
     /**
@@ -119,27 +215,27 @@
 
     public void updateUsers(IRequestCycle cycle)
     {
-        if (isInError())
-            return;
+        Visit visit = getVisitState();
 
-        Visit visit = (Visit) getVisit();
         VirtualLibraryEngine vengine = (VirtualLibraryEngine) cycle.getEngine();
 
-        UserListEditMap map = getListEditMap();
+        Map<Integer, Person> userMap = getUserMap();
+
+        Set<Integer> deletedIds = getDeleteKeys();
+        Set<Integer> resetPasswordIds = getResetPasswordKeys();
 
-        List updatedUsers = map.getValues();
+        // Remove any users who have been deleted
 
-        Person[] updates = (Person[]) updatedUsers.toArray(new Person[updatedUsers.size()]);
+        userMap.keySet().removeAll(deletedIds);
 
-        Integer[] resetPasswordUserIds = toArray(map.getResetPasswordKeys());
-        Integer[] deletedUserIds = toArray(map.getDeletedKeys());
+        Person[] updates = userMap.values().toArray(new Person[0]);
 
         String password = getPassword();
         setPassword(null);
 
-        if (Tapestry.isBlank(password) && Tapestry.size(resetPasswordUserIds) != 0)
+        if (HiveMind.isBlank(password) && !resetPasswordIds.isEmpty())
         {
-            setErrorField("inputPassword", getMessage("need-password"));
+            getValidationDelegate().record(getPasswordField(), needPassword());
             return;
         }
 
@@ -154,15 +250,15 @@
 
                 operations.updatePersons(
                         updates,
-                        resetPasswordUserIds,
+                        resetPasswordIds.toArray(new Integer[0]),
                         password,
-                        deletedUserIds,
+                        deletedIds.toArray(new Integer[0]),
                         adminId);
                 break;
             }
             catch (RemoteException ex)
             {
-                vengine.rmiFailure(getMessage("update-failure"), ex, i++);
+                vengine.rmiFailure(updateFailure(), ex, i++);
             }
             catch (RemoveException ex)
             {
@@ -174,16 +270,6 @@
             }
         }
 
-        setMessage(getMessage("users-updated"));
-    }
-
-    private Integer[] toArray(Collection c)
-    {
-        int count = Tapestry.size(c);
-
-        if (count == 0)
-            return null;
-
-        return (Integer[]) c.toArray(new Integer[count]);
+        setMessage(usersUpdated());
     }
 }

Modified: jakarta/tapestry/trunk/examples/Workbench/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/build.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/build.xml (original)
+++ jakarta/tapestry/trunk/examples/Workbench/build.xml Wed Oct  5 10:45:44 2005
@@ -34,7 +34,6 @@
     <project-dependency artifact="tapestry-contrib"    use="run"/>
     <project-dependency artifact="tapestry-annotations" use="run"/>
 
-    <ibiblio-dependency artifact="bsf"                version="${bsf.version}"      group="bsf"               use="run"/>
     <ibiblio-dependency artifact="commons-codec"      version="${codec.version}"    group="commons-codec"     use="run"/>
     <ibiblio-dependency artifact="commons-fileupload" version="${fileupload.version}" group="commons-fileupload" use="run"/>        
     <ibiblio-dependency artifact="commons-logging"    version="${logging.version}"  group="commons-logging"   use="run"/>

Modified: jakarta/tapestry/trunk/framework/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/build.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/build.xml (original)
+++ jakarta/tapestry/trunk/framework/build.xml Wed Oct  5 10:45:44 2005
@@ -34,7 +34,6 @@
   <import file="${hivebuild.dir}/junit-report.xml"/>  
   	
   <target name="compile-dependencies">
-    <ibiblio-dependency artifact="bsf"                version="${bsf.version}"      group="bsf"/>
     <ibiblio-dependency artifact="commons-codec"      version="${codec.version}"    group="commons-codec"/>
     <ibiblio-dependency artifact="commons-fileupload" version="${fileupload.version}" group="commons-fileupload"/>    
     <ibiblio-dependency artifact="commons-logging"    version="${logging.version}"  group="commons-logging"/>
@@ -50,7 +49,6 @@
     <ibiblio-dependency artifact="easymockclassextension" version="1.1"             group="easymock" use="test"/>
     <ibiblio-dependency artifact="cglib-full"         version="2.0.2"               group="cglib"    use="test"/>
     <ibiblio-dependency artifact="jdom"               version="1.0"                 group="jdom"     use="test"/>
-    <ibiblio-dependency artifact="jython"             version="2.1"                 group="jython"   use="test"/>
   </target>
  
   <property name="version-file.dir" value="${java.classes.dir}/org/apache/tapestry"/>

Modified: jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.page.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.page.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.page.xml (original)
+++ jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.page.xml Wed Oct  5 10:45:44 2005
@@ -41,11 +41,8 @@
         <set-service property="componentTemplateLoader" service-id="ComponentTemplateLoader"/>
         <set-service property="establishDefaultParameterValuesVisitor"
           service-id="EstablishDefaultParameterValuesVisitor"/>
-        <set-object property="defaultScriptLanguage"
-                       value="app-property:org.apache.tapestry.default-script-language"/>
         <set-object property="valueConverter" value="infrastructure:valueConverter"/>
         <set-service property="assetSource" service-id="tapestry.asset.AssetSource"/>
-        <set-service property="managerFactory" service-id="BSFManagerFactory"/>
         <set-service property="pageClassProvider" service-id="PageClassProvider"/>
         <set-service property="componentClassProvider" service-id="ComponentClassProvider"/>
         <set-service property="threadLocale" service-id="hivemind.ThreadLocale"/>
@@ -120,19 +117,6 @@
         <set-service property="pageLoader" service-id="PageLoader"/>
         <set-service property="bindingSource" service-id="tapestry.bindings.BindingSource"/>
       </construct>
-    </invoke-factory>
-    
-  </service-point>
-  
-  <!-- This gets lumped in here, because the PageLoader is like a factory for ListenerBindings,
-       and this is needed to instantiate a ListenerBinding. -->
-  <service-point id="BSFManagerFactory" interface="org.apache.tapestry.services.BSFManagerFactory">
-    
-    Injected into ListenerBinding instances so that they can create a BSFManager, used to execute
-    the BSF script associated with the binding.
-    
-    <invoke-factory>
-      <construct class="org.apache.tapestry.services.impl.BSFManagerFactoryImpl"/>
     </invoke-factory>
     
   </service-point>

Modified: jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.props.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.props.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.props.xml (original)
+++ jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.props.xml Wed Oct  5 10:45:44 2005
@@ -183,7 +183,6 @@
     
   <contribution configuration-id="hivemind.FactoryDefaults">
     <default symbol="org.apache.tapestry.engine-class" value="org.apache.tapestry.engine.BaseEngine"/>
-    <default symbol="org.apache.tapestry.default-script-language" value="jython"/>
     <default symbol="org.apache.tapestry.visit-class" value="java.util.HashMap"/>
     <default symbol="org.apache.tapestry.output-encoding" value="UTF-8"/>
     <default symbol="org.apache.tapestry.enhance.disable-abstract-method-validation" value="false"/>

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java Wed Oct  5 10:45:44 2005
@@ -41,12 +41,10 @@
 import org.apache.tapestry.binding.BindingConstants;
 import org.apache.tapestry.binding.BindingSource;
 import org.apache.tapestry.binding.ExpressionBinding;
-import org.apache.tapestry.binding.ListenerBinding;
 import org.apache.tapestry.coerce.ValueConverter;
 import org.apache.tapestry.engine.IPageLoader;
 import org.apache.tapestry.event.ChangeObserver;
 import org.apache.tapestry.resolver.ComponentSpecificationResolver;
-import org.apache.tapestry.services.BSFManagerFactory;
 import org.apache.tapestry.services.ComponentConstructor;
 import org.apache.tapestry.services.ComponentConstructorFactory;
 import org.apache.tapestry.services.ComponentTemplateLoader;
@@ -56,7 +54,6 @@
 import org.apache.tapestry.spec.IBindingSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
 import org.apache.tapestry.spec.IContainedComponent;
-import org.apache.tapestry.spec.IListenerBindingSpecification;
 import org.apache.tapestry.spec.IParameterSpecification;
 import org.apache.tapestry.web.WebContextResource;
 
@@ -78,20 +75,12 @@
 
     /** @since 4.0 */
 
-    private String _defaultScriptLanguage;
-
-    /** @since 4.0 */
-
     private BindingSource _bindingSource;
 
     /** @since 4.0 */
 
     private ComponentTemplateLoader _componentTemplateLoader;
 
-    /** @since 4.0 */
-
-    private BSFManagerFactory _managerFactory;
-
     private List _inheritedBindingQueue = new ArrayList();
 
     /** @since 4.0 */
@@ -290,15 +279,6 @@
                 continue;
             }
 
-            if (type == BindingType.LISTENER)
-            {
-                constructListenerBinding(
-                        component,
-                        parameterName,
-                        (IListenerBindingSpecification) bspec);
-                continue;
-            }
-
             String description = PageloadMessages.parameterName(name);
 
             IBinding binding = convert(container, description, BindingConstants.OGNL_PREFIX, bspec);
@@ -349,35 +329,6 @@
     }
 
     /**
-     * Construct a {@link ListenerBinding} for the component, and add it.
-     * 
-     * @since 3.0
-     */
-
-    private void constructListenerBinding(IComponent component, String parameterName,
-            IListenerBindingSpecification spec)
-    {
-        String language = spec.getLanguage();
-
-        // If not provided in the page or component specification, then
-        // search for a default (factory default is "jython").
-
-        if (HiveMind.isBlank(language))
-            language = _defaultScriptLanguage;
-
-        // Construct the binding. The first parameter is the compononent
-        // (not the DirectLink or Form, but the page or component containing the
-        // link or form).
-
-        String description = PageloadMessages.parameterName(parameterName);
-
-        IBinding binding = new ListenerBinding(description, _valueConverter, spec.getLocation(),
-                component.getContainer(), language, spec.getScript(), _managerFactory);
-
-        addBindingToComponent(component, parameterName, binding);
-    }
-
-    /**
      * Sets up a component. This involves:
      * <ul>
      * <li>Instantiating any contained components.
@@ -750,13 +701,6 @@
 
     /** @since 4.0 */
 
-    public void setDefaultScriptLanguage(String string)
-    {
-        _defaultScriptLanguage = string;
-    }
-
-    /** @since 4.0 */
-
     public void setBindingSource(BindingSource bindingSource)
     {
         _bindingSource = bindingSource;
@@ -794,12 +738,6 @@
     public void setAssetSource(AssetSource assetSource)
     {
         _assetSource = assetSource;
-    }
-
-    /** @since 4.0 */
-    public void setManagerFactory(BSFManagerFactory managerFactory)
-    {
-        _managerFactory = managerFactory;
     }
 
     /** @since 4.0 */

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseMessages.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseMessages.java Wed Oct  5 10:45:44 2005
@@ -14,6 +14,8 @@
 
 package org.apache.tapestry.parse;
 
+import org.apache.hivemind.HiveMind;
+import org.apache.hivemind.Location;
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.impl.MessageFormatter;
 
@@ -190,5 +192,11 @@
                 tagName,
                 new Integer(line),
                 attributeName);
+    }
+
+    public static Object listenerBindingUnsupported(Location location)
+    {
+        return _formatter.format("listener-binding-unsupported", HiveMind
+                .getLocationString(location));
     }
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseStrings.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseStrings.properties?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseStrings.properties (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/ParseStrings.properties Wed Oct  5 10:45:44 2005
@@ -51,6 +51,8 @@
 missing-resource=Resource at {0} does not exist.
 unknown-public-id=Document {0} has an unexpected public id of ''{1}''.
 service-element-not-supported=The <service> element is no longer supported; the HiveMind tapestry.services.ApplicationServices configuration point serves the same purpose.
+listener-binding-unsupported=The <listener-binding> element is no longer supported (at {0}).
 
 range-error={0}: out of range for template length {1}.
-duplicate-tag-attribute=Tag <{0}> on line {1} contains more than one ''{2}'' attribute.
\ No newline at end of file
+duplicate-tag-attribute=Tag <{0}> on line {1} contains more than one ''{2}'' attribute.
+

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java Wed Oct  5 10:45:44 2005
@@ -52,7 +52,6 @@
 import org.apache.tapestry.spec.IContainedComponent;
 import org.apache.tapestry.spec.IExtensionSpecification;
 import org.apache.tapestry.spec.ILibrarySpecification;
-import org.apache.tapestry.spec.IListenerBindingSpecification;
 import org.apache.tapestry.spec.IParameterSpecification;
 import org.apache.tapestry.spec.IPropertySpecification;
 import org.apache.tapestry.spec.InjectSpecification;
@@ -841,11 +840,6 @@
                 endBinding();
                 break;
 
-            case STATE_LISTENER_BINDING:
-
-                endListenerBinding();
-                break;
-
             case STATE_STATIC_BINDING:
 
                 endStaticBinding();
@@ -916,22 +910,6 @@
         spec.instantiateImmediateExtensions();
     }
 
-    private void endListenerBinding()
-    {
-        BindingSetter bs = (BindingSetter) peekObject();
-
-        IListenerBindingSpecification lbs = _factory.createListenerBindingSpecification();
-
-        lbs.setLanguage(bs.getValue());
-
-        // Do we need a check for no body content?
-
-        lbs.setValue(peekContent());
-        lbs.setLocation(getLocation());
-
-        bs.apply(lbs);
-    }
-
     private void endProperty()
     {
         PropertyValueSetter pvs = (PropertyValueSetter) peekObject();
@@ -1264,13 +1242,9 @@
 
     private void enterListenerBinding()
     {
-        String name = getAttribute("name");
-        String language = getAttribute("language");
-
-        IContainedComponent cc = (IContainedComponent) peekObject();
-        BindingSetter bs = new BindingSetter(cc, name, language);
+        _log.warn(ParseMessages.listenerBindingUnsupported(getLocation()));
 
-        push(_elementName, bs, STATE_LISTENER_BINDING, false);
+        push(_elementName, null, STATE_LISTENER_BINDING, false);
     }
 
     private void enterMessageBinding_3_0()

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd Wed Oct  5 10:45:44 2005
@@ -43,6 +43,7 @@
 - Added many alternatives to 'yes' and 'no' for boolean attributes.
 - Added aliases and cache attributes to <parameter>
 - Added deprecated to <component-specification>
+- Removed <listener-binding>
 -->
 <!-- =======================================================
 Entity: attribute-flag
@@ -200,7 +201,7 @@
 
 The Tapestry page loader ensures that either type or copy-of is specified, but not both.
 -->
-<!ELEMENT component (meta | binding | inherited-binding | listener-binding)*>
+<!ELEMENT component (meta | binding | inherited-binding )*>
 <!ATTLIST component
 	id ID #REQUIRED
 	type CDATA #IMPLIED
@@ -342,26 +343,6 @@
 <!ATTLIST page
 	name CDATA #REQUIRED
 	specification-path CDATA #REQUIRED
->
-<!-- =======================================================
-Element: listener-binding
-Appears in: component
-
-Defines an in-place script using the scripting language
-supported by Bean Scripting Framework (http://jakarta.apache.org/bsf).
-The script itself is the element's character data (often, inside
-a CDATA block).
-
-The default language is jython, though this can be overridden.
-
-Attributes:
-  name: The name of the component parameter to bind.
-  language: The language the script is written in.
--->
-<!ELEMENT listener-binding (#PCDATA)>
-<!ATTLIST listener-binding
-	name CDATA #REQUIRED
-	language CDATA #IMPLIED
 >
 <!-- =======================================================
 Element: meta

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/BindingType.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/BindingType.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/BindingType.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/BindingType.java Wed Oct  5 10:45:44 2005
@@ -33,17 +33,6 @@
 
     public static final BindingType INHERITED = new BindingType("INHERITED");
 
-    /**
-     * Indicates a {@link org.apache.tapestry.binding.ListenerBinding}, a specialized kind of
-     * binding that encapsulates a component listener as a script. Uses a subclass of
-     * {@link BindingSpecification},{@link ListenerBindingSpecification}.
-     * {@link IListenerBindingSpecification}.
-     * 
-     * @since 3.0
-     */
-
-    public static final BindingType LISTENER = new BindingType("LISTENER");
-
     private final String _name;
 
     private BindingType(String name)

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/SpecFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/SpecFactory.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/SpecFactory.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/spec/SpecFactory.java Wed Oct  5 10:45:44 2005
@@ -85,18 +85,6 @@
     }
 
     /**
-     * Creates a new concrete instance of {@link IListenerBindingSpecification}for the given
-     * language (which is option) and script.
-     * 
-     * @since 3.0
-     */
-
-    public IListenerBindingSpecification createListenerBindingSpecification()
-    {
-        return new ListenerBindingSpecification();
-    }
-
-    /**
      * Creates a concrete instance of {@link IComponentSpecification}.
      */
 
@@ -122,7 +110,6 @@
     {
         return new ParameterSpecification();
     }
-
 
     /** @since 4.0 */
     public BindingBeanInitializer createBindingBeanInitializer(BindingSource source)

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/TapestryTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/TapestryTestCase.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/TapestryTestCase.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/TapestryTestCase.java Wed Oct  5 10:45:44 2005
@@ -73,6 +73,12 @@
         }
     }
 
+    /** @since 4.0 */
+    protected BindingSourceFixture newBindingSource()
+    {
+        return new BindingSourceFixture();
+    }
+
     protected IComponentSpecification parseComponent(String simpleName) throws Exception
     {
         SpecificationParser parser = new SpecificationParser(_resolver);
@@ -86,7 +92,7 @@
     {
         SpecificationParser parser = new SpecificationParser(_resolver);
 
-        parser.setBindingSource(new BindingSourceFixture());
+        parser.setBindingSource(newBindingSource());
 
         Resource location = getSpecificationResourceLocation(simpleName);
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/ListenerBinding.page
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/ListenerBinding.page?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/ListenerBinding.page (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/ListenerBinding.page Wed Oct  5 10:45:44 2005
@@ -27,6 +27,7 @@
   cycle.page = "Results"
 else:
   page.message = "Please fix errors before continuing.";</listener-binding>
+  <static-binding name="foo" value="bar"/>
   </component>
   	  	
 </page-specification>

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java Wed Oct  5 10:45:44 2005
@@ -16,10 +16,15 @@
 
 import java.util.List;
 
+import org.apache.commons.logging.Log;
 import org.apache.hivemind.Locatable;
+import org.apache.hivemind.Resource;
+import org.apache.hivemind.impl.DefaultClassResolver;
+import org.apache.hivemind.impl.DefaultErrorHandler;
 import org.apache.tapestry.bean.BindingBeanInitializer;
 import org.apache.tapestry.bean.LightweightBeanInitializer;
 import org.apache.tapestry.junit.TapestryTestCase;
+import org.apache.tapestry.parse.SpecificationParser;
 import org.apache.tapestry.spec.BindingType;
 import org.apache.tapestry.spec.IApplicationSpecification;
 import org.apache.tapestry.spec.IAssetSpecification;
@@ -29,11 +34,10 @@
 import org.apache.tapestry.spec.IContainedComponent;
 import org.apache.tapestry.spec.IExtensionSpecification;
 import org.apache.tapestry.spec.ILibrarySpecification;
-import org.apache.tapestry.spec.IListenerBindingSpecification;
 import org.apache.tapestry.spec.IParameterSpecification;
 import org.apache.tapestry.spec.IPropertySpecification;
 import org.apache.tapestry.spec.InjectSpecification;
-import org.apache.tapestry.spec.ListenerBindingSpecification;
+import org.apache.tapestry.spec.SpecFactory;
 import org.apache.tapestry.util.xml.DocumentParseException;
 
 /**
@@ -466,38 +470,32 @@
 
     public void testListenerBinding() throws Exception
     {
-        IComponentSpecification spec = parsePage("ListenerBinding.page");
+        Log log = (Log) newMock(Log.class);
 
-        checkLine(spec, 22);
-        IContainedComponent c = spec.getComponent("c");
+        SpecificationParser parser = new SpecificationParser(new DefaultErrorHandler(), log,
+                new DefaultClassResolver(), new SpecFactory());
 
-        checkLine(c, 24);
+        parser.setBindingSource(newBindingSource());
 
-        IListenerBindingSpecification lbs = (ListenerBindingSpecification) c.getBinding("listener");
+        Resource location = getSpecificationResourceLocation("ListenerBinding.page");
 
-        checkLine(lbs, 25);
+        log
+                .warn("The <listener-binding> element is no longer supported (at classpath:/org/apache/tapestry/junit/parse/ListenerBinding.page, line 25, column 56).");
 
-        String expectedScript = buildExpectedScript(new String[]
-        { "if page.isFormInputValid():", "  cycle.page = \"Results\"", "else:",
-                "  page.message = \"Please fix errors before continuing.\";" });
+        replayControls();
 
-        assertEquals("jython", lbs.getLanguage());
-        assertEquals(expectedScript, lbs.getScript());
-    }
+        IComponentSpecification spec = parser.parsePageSpecification(location);
 
-    private String buildExpectedScript(String[] lines)
-    {
-        StringBuffer buffer = new StringBuffer();
+        verifyControls();
 
-        for (int i = 0; i < lines.length; i++)
-        {
-            if (i > 0)
-                buffer.append("\n");
+        IContainedComponent cc = spec.getComponent("c");
 
-            buffer.append(lines[i]);
-        }
+        assertNull(cc.getBinding("listener"));
 
-        return buffer.toString();
+        IBindingSpecification bs = cc.getBinding("foo");
+
+        assertEquals(BindingType.PREFIXED, bs.getType());
+        assertEquals("literal:bar", bs.getValue());
     }
 
     /** @since 3.0 * */

Modified: jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/configuration.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/configuration.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/configuration.xml (original)
+++ jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/configuration.xml Wed Oct  5 10:45:44 2005
@@ -368,17 +368,6 @@
 </tr>
 
 <tr>
-	<td>org.apache.tapestry.default-script-language</td>
-	
-  <td>
-	The name of a &BSF;-supported language, used when a
-	&spec.listener-binding; element does not specify
-	a language.  If not overridden, the default is "jython".
-  </td>
-	
-	</tr>
-
-<tr>
 	<td>org.apache.tapestry.disable-caching</td>
 	
   <td>

Modified: jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/spec.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/spec.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/spec.xml (original)
+++ jakarta/tapestry/trunk/src/documentation/content/xdocs/UsersGuide/spec.xml Wed Oct  5 10:45:44 2005
@@ -143,6 +143,7 @@
   <li>Added the aliases and cache attributes to the &spec.parameter; element.</li>
   <li>Added the deprecated attribute to &spec.component-specification; and &spec.parameter;.</li>
   <li>Renamed property-name attribute to property (in several places)</li>
+  <li>Removed the &lt;listener-binding&gt; element</li>
 </ul>
 
 <p>
@@ -642,7 +643,7 @@
 	
 <p>&component; Elements</p>
 <source>
-  (&spec.meta; | &spec.binding; | &spec.listener-binding;) *
+  (&spec.meta; | &spec.binding;) *
 </source>
 
 	
@@ -1068,81 +1069,6 @@
 </source>
 
 </section> <!-- spec.library-specification -->
-
-
-
-<section id="spec.listener-binding">
-	<title>&lt;listener-binding&gt; element</title>
-
-<p>
-Appears in: &spec.component;
-</p>
-
-
-<p>
-A listener binding is used to create application logic, in the form
-of a listener (for a &DirectLink;, &ActionLink;, &Form;, etc.)
-in place within the specification, in 
-a scripting language (such as &Jython; or JavaScript).  The script itself
-is the wrapped character data for the &lt;listener-binding&gt; 
-element.
-</p>
-
-<p>
-When the listener is triggered, the script is executed.  Three beans,
-page, component and cycle
-are pre-declared.
-</p>
-
-<p>
-The page is the page activated by the request.  Usually, this is
-the same as the page which contains the component ... in fact,
-usually page and compoment are identical.
-</p>
-
-<p>
-The component is the component from whose specification
-the binding was created (that is, not the &DirectLink;, but the page or component
-which embeds the &DirectLink;).
-</p>
-
-<p>
-The cycle is the active request cycle, from which service parameters
-may be obtained.
-</p>
-
-
-<table>
-
-<tr>
-  <th>Name</th>
-  <th>Type</th>
-  <th>Required ?</th>
-  <th>Default Value</th>
-  <th>Description</th>
-</tr>
-
-<tr>
-	<td>name</td>
-	<td>string</td>
-	<td>yes</td>
-	<td/>
-	<td>The name of the listener parameter to bind.</td>
-</tr>
-<tr>
-	<td>language</td>
-	<td>string</td>
-	<td>no</td>
-	<td/>
-	<td>The name of a &BSF;-supported language that the script is written in.  The default,
-	if not specified, is jython.
-	</td>
-</tr>
-
-</table>
-
-
-</section> <!-- spec.listener-binding -->
 
 
 <section id="spec.meta">

Modified: jakarta/tapestry/trunk/src/documentation/content/xdocs/dependencies.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/src/documentation/content/xdocs/dependencies.xml?rev=295052&r1=295051&r2=295052&view=diff
==============================================================================
--- jakarta/tapestry/trunk/src/documentation/content/xdocs/dependencies.xml (original)
+++ jakarta/tapestry/trunk/src/documentation/content/xdocs/dependencies.xml Wed Oct  5 10:45:44 2005
@@ -24,117 +24,87 @@
   <header>
     <title>Library Dependencies</title>
   </header>
-  
-<body>
-<p>
-  Tapestry is a quite comprehensive framework, but it gets a lot of support from other
-  open-source frameworks.  The following libraries, in addition to the Tapestry libraries
-  themselves, must be in the web application classpath (typically, by copying them into the
-  WEB-INF/libs directory of the WAR file).
-</p>
-
-<p>
-The Ant build script for Tapestry will automatically download dependencies.
-</p>
-
-<p>
-  Alternately, the links below will download from the Maven repository on ibiblio.org.
-</p>
-
-<table>
-  <tr>
-    <th>Library</th>
-    <th>Version</th>
-    <th>License</th>
-    <th>Description</th>
-  </tr>
-  <tr>
-    <td><link href="&maven;/bsf/jars/">bsf</link></td> <td>2.3.0</td> <td>ASL</td>
-    <td>
-  Bean Script Framework.      Used to support creation of listeners as scripts in Jython or other
-      BSF-supported languages.
-    </td>
-  </tr>
-    <tr>
-    <td><link href="&maven;/commons-codec/jars/">commons-codec</link></td>
-    <td>1.3</td> <td>ASL</td>
-    <td>
-      Used to encode and decode URL information.
-    </td>
-  </tr>
-  
-  <tr>
-    <td><link href="&maven;/commons-fileupload/jars/">commons-fileupload</link></td> <td>1.0</td> <td>ASL</td>
-    <td>File upload support.</td>
-  </tr>
-  
-  <tr>
-    <td>
-      <link href="&maven;/commons-logging/jars/">commons-logging</link>
-    </td>
-    <td>
-      1.0.4
-    </td>
-    <td>
-      ASL
-    </td>
-    <td>
-      Logging framework that acts as a wrapper around JDK 1.4 logging, Log4J or others.
-    </td>
-  </tr>
-  
-  <tr>
-    <td>
-      <link href="&maven;/hivemind/jars/">hivemind</link>
-    </td>
-    <td>
-      1.1
-    </td>
-    <td>
-      ASL
-    </td>
-    <td>
-      Services and configuration microkernel; provides service infrastructure for the framework.
-    </td>
-  </tr>
-  
-  <tr>
-    <td><link href="&maven;/hivemind/jars/">hivemind-lib</link></td> <td>1.1</td> <td>ASL</td>
-    <td>
-      Library of additional HiveMind services.
-    </td>
-  </tr>
-  
-  <tr>
-    <td><link href="&maven;/javassist/jars/">javassist</link></td> <td>3.0</td> <td>MPL</td>
-    <td>
-      Runtime bytecode enhancement library.
-    </td>
-  </tr>
-  
-  <tr>
-    <td><link href="&maven;/ognl/jars/">ognl</link></td> <td>2.6.7</td> <td>BSD</td>
-    <td>Object Graph Navigation Langage; expression language used throughout Tapestry.</td>
-  </tr>
-  
-  <tr>
-    <td><link href="&maven;/oro/jars/">oro</link></td> <td>2.0.8</td> <td>ASL</td>
-    <td>Regular expression matching library.</td>
-  </tr>
- 
-  
-</table>
-
-<p>
-Tapestry is expressly designed to be source compatible with <strong>JDK 1.3</strong> and <strong>Servlet API 2.2</strong>.  It does use a few features
-of Servlet API 2.3 if available. 
-</p>
-
-<p>
-  The <link href="tapestry-annotations/index.html">JDK 1.5 annotation support</link> does require JDK 1.5 to run.  The Workbench 
-  example makes use of some of the annnotations, so it also requires JDK 1.5 to operate.
-</p>
-
-</body>  
-  
-</document>
\ No newline at end of file
+  <body>
+    <p> Tapestry is a quite comprehensive framework, but it gets a lot of support from other open-source frameworks. The
+      following libraries, in addition to the Tapestry libraries themselves, must be in the web application classpath
+      (typically, by copying them into the WEB-INF/libs directory of the WAR file).</p>
+    <p> The Ant build script for Tapestry will automatically download dependencies.</p>
+    <p> Alternately, the links below will download from the Maven repository on ibiblio.org.</p>
+    <table>
+      <tr>
+        <th>Library</th>
+        <th>Version</th>
+        <th>License</th>
+        <th>Description</th>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/commons-codec/jars/">commons-codec</link>
+        </td>
+        <td>1.3</td>
+        <td>ASL</td>
+        <td> Used to encode and decode URL information. </td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/commons-fileupload/jars/">commons-fileupload</link>
+        </td>
+        <td>1.0</td>
+        <td>ASL</td>
+        <td>File upload support.</td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/commons-logging/jars/">commons-logging</link>
+        </td>
+        <td> 1.0.4 </td>
+        <td> ASL </td>
+        <td> Logging framework that acts as a wrapper around JDK 1.4 logging, Log4J or others. </td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/hivemind/jars/">hivemind</link>
+        </td>
+        <td> 1.1 </td>
+        <td> ASL </td>
+        <td> Services and configuration microkernel; provides service infrastructure for the framework. </td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/hivemind/jars/">hivemind-lib</link>
+        </td>
+        <td>1.1</td>
+        <td>ASL</td>
+        <td> Library of additional HiveMind services. </td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/javassist/jars/">javassist</link>
+        </td>
+        <td>3.0</td>
+        <td>MPL</td>
+        <td> Runtime bytecode enhancement library. </td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/ognl/jars/">ognl</link>
+        </td>
+        <td>2.6.7</td>
+        <td>BSD</td>
+        <td>Object Graph Navigation Langage; expression language used throughout Tapestry.</td>
+      </tr>
+      <tr>
+        <td>
+          <link href="&maven;/oro/jars/">oro</link>
+        </td>
+        <td>2.0.8</td>
+        <td>ASL</td>
+        <td>Regular expression matching library.</td>
+      </tr>
+    </table>
+    <p> Tapestry is expressly designed to be source compatible with <strong>JDK 1.3</strong> and <strong>Servlet API
+      2.2</strong>. It does use a few features of Servlet API 2.3 if available.</p>
+    <p> The <link href="tapestry-annotations/index.html">JDK 1.5 annotation support</link> does require JDK 1.5 to run.
+      The Workbench example makes use of some of the annnotations, so it also requires JDK 1.5 to operate.</p>
+  </body>
+</document>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message