You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2004/02/04 15:18:15 UTC
cvs commit: cocoon-2.1/src/blocks/ojb/samples/woody employee.js
joerg 2004/02/04 06:18:15
Modified: src/blocks/ojb/samples/woody employee.js
Log:
fixed line endings issue
Revision Changes Path
1.7 +32 -32 cocoon-2.1/src/blocks/ojb/samples/woody/employee.js
Index: employee.js
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/samples/woody/employee.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- employee.js 18 Oct 2003 06:39:58 -0000 1.6
+++ employee.js 4 Feb 2004 14:18:15 -0000 1.7
@@ -1,32 +1,32 @@
-cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/woody2.js");
-
-function employeeform_jdo(form) {
-
- // Get OJB factory
- var factory = cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROLE);
-
- // Create a empty Bean
- var bean = new Packages.org.apache.cocoon.ojb.samples.Employee();
- var ojbEmployee = Packages.org.apache.cocoon.ojb.samples.EmployeeImpl();
-
- // Fill some initial data to the bean
- bean.setId(1);
- // Load bean based on the given PrimaryKey
- ojbEmployee.retrieve(bean, factory);
-
- // Load the Bean to the form
- form.load(bean);
- // Let woody handle the form
- form.showForm("jdo/woody/employee-form-display");
- // Update the Bean based on user input
- form.save(bean);
-
- // Update Bean in Database
- ojbEmployee.update(bean, factory);
- // Clean up the operation
- cocoon.releaseComponent(factory);
-
- // Send response to the user
- cocoon.request.setAttribute("employeeform", form.getWidget());
- cocoon.sendPage("jdo/woody/employee-form-success");
-}
+cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/woody2.js");
+
+function employeeform_jdo(form) {
+
+ // Get OJB factory
+ var factory = cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROLE);
+
+ // Create a empty Bean
+ var bean = new Packages.org.apache.cocoon.ojb.samples.Employee();
+ var ojbEmployee = Packages.org.apache.cocoon.ojb.samples.EmployeeImpl();
+
+ // Fill some initial data to the bean
+ bean.setId(1);
+ // Load bean based on the given PrimaryKey
+ ojbEmployee.retrieve(bean, factory);
+
+ // Load the Bean to the form
+ form.load(bean);
+ // Let woody handle the form
+ form.showForm("jdo/woody/employee-form-display");
+ // Update the Bean based on user input
+ form.save(bean);
+
+ // Update Bean in Database
+ ojbEmployee.update(bean, factory);
+ // Clean up the operation
+ cocoon.releaseComponent(factory);
+
+ // Send response to the user
+ cocoon.request.setAttribute("employeeform", form.getWidget());
+ cocoon.sendPage("jdo/woody/employee-form-success");
+}
Re: cvs commit: cocoon-2.1/src/blocks/ojb/samples/woody employee.js
Posted by Joerg Heinicke <jo...@gmx.de>.
On 04.02.2004 15:18, joerg@apache.org wrote:
> Modified: src/blocks/ojb/samples/woody employee.js
> Log:
> fixed line endings issue
>
> Revision Changes Path
> 1.7 +32 -32 cocoon-2.1/src/blocks/ojb/samples/woody/employee.js
This file was broken in that way that I had unix line ends on a windows
machine. Viewing the file in notepad made this more than clear, opening
it in jEdit shows this too as jEdit is line ends aware. I converted it
to Windows line ends using jEdit. But from below it does not look that
good, does it? These "2 lines per 1 line" in the commit mail has been a
good hint on broken line ends until now. Can somebody fix it or point on
a tool for verifying such issues and fixing them?
Joerg
> +cocoon.load("resource://org/apache/cocoon/woody/flow/javascript/woody2.js");
>
> +
>
> +function employeeform_jdo(form) {
>
> +
>
> + // Get OJB factory
>
> + var factory = cocoon.getComponent(Packages.org.apache.cocoon.ojb.jdo.components.JdoPMF.ROLE);