cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jheym...@apache.org
Subject svn commit: r330548 [118/132] - in /cocoon/whiteboard/maven2/cocoon-flat-layout: ./ cocoon-ajax-block/ cocoon-ajax-block/api/ cocoon-ajax-block/api/src/ cocoon-ajax-block/api/src/main/ cocoon-ajax-block/api/src/main/java/ cocoon-ajax-block/api/src/main...
Date Thu, 03 Nov 2005 14:00:48 GMT
Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Contact.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Contact.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Contact.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Contact.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,73 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples;
+
+/**
+ * Contact belongs to the {@link Form2Bean} demo.
+ * 
+ * @version $Id: Contact.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class Contact {
+    private long id;
+    private String firstName;
+    private String lastName;
+    private String phone;
+    private String email;
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String toString() {
+        return "< id = " + id + ", firstName = " + firstName + ", lastName = " + lastName + ", phone = " + phone + ", email = " + email + " >";
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Contact.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/DateTestJavaSelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/DateTestJavaSelectionList.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/DateTestJavaSelectionList.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/DateTestJavaSelectionList.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import org.apache.cocoon.forms.datatype.AbstractJavaSelectionList;
+
+public class DateTestJavaSelectionList extends AbstractJavaSelectionList {
+
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.forms.datatype.AbstractJavaSelectionList#build()
+     */
+    protected boolean build() throws Exception {
+        Calendar c = Calendar.getInstance();
+        c.set(2003, 0, 1);
+        this.addItem(c.getTime(), (String)null);
+        c.set(2004, 0, 1);
+        this.addItem(c.getTime(), (String)null);
+        this.addItem(new Date(), (String)null);
+        return false;
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/DateTestJavaSelectionList.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form1Handler.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form1Handler.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form1Handler.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form1Handler.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,36 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples;
+
+import org.apache.cocoon.forms.event.AbstractFormHandler;
+import org.apache.cocoon.forms.event.ActionEvent;
+import org.apache.cocoon.forms.event.ValueChangedEvent;
+
+/**
+ * Example FormHandler for the "Form1" sample form.
+ * This implementation currently doesn't do anything interesting.
+ * 
+ * @version $Id: Form1Handler.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class Form1Handler extends AbstractFormHandler {
+    public void handleActionEvent(ActionEvent actionEvent) {
+        //System.out.println("action event reported to Form1Handler: " + actionEvent.getActionCommand());
+    }
+
+    public void handleValueChangedEvent(ValueChangedEvent valueChangedEvent) {
+        //System.out.println("value changed reported to Form1Handler");
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form1Handler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form2Bean.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form2Bean.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form2Bean.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form2Bean.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,160 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ * Sample bean used in the form2 binding demo.
+ * 
+ * @version $Id: Form2Bean.java 161264 2005-04-14 12:32:26Z sylvain $
+ */
+public class Form2Bean {
+    private String email;
+
+    private String phoneCountry;
+    private String phoneZone;
+    private String phoneNumber;
+
+    private String ipAddress;
+    private Date birthday;
+    private int aNumber;
+    private boolean choose;
+    private Sex sex;
+    private Boolean enable;
+
+    private Collection contacts = new ArrayList();
+    private Collection drinks = new ArrayList();
+
+    /**
+     * @return Returns the sex.
+     */
+    public Sex getSex() {
+        return sex;
+    }
+
+    /**
+     * @param sex The sex to set.
+     */
+    public void setSex(Sex sex) {
+        this.sex = sex;
+    }
+
+    public Form2Bean() {
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getPhoneCountry() {
+        return phoneCountry;
+    }
+
+    public void setPhoneCountry(String phoneCountry) {
+        this.phoneCountry = phoneCountry;
+    }
+
+    public String getPhoneZone() {
+        return phoneZone;
+    }
+
+    public void setPhoneZone(String phoneZone) {
+        this.phoneZone = phoneZone;
+    }
+
+    public String getPhoneNumber() {
+        return phoneNumber;
+    }
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
+    public String getIpAddress() {
+        return ipAddress;
+    }
+
+    public void setIpAddress(String ipAddress) {
+        this.ipAddress = ipAddress;
+    }
+
+    public Date getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(Date birthday) {
+        this.birthday = birthday;
+    }
+
+    public int getaNumber() {
+        return aNumber;
+    }
+
+    public void setaNumber(int aNumber) {
+        this.aNumber = aNumber;
+    }
+
+    public boolean isChoose() {
+        return choose;
+    }
+
+    public void setChoose(boolean choose) {
+        this.choose = choose;
+    }
+    
+    public Boolean getEnable() {
+        return enable;
+    }
+
+    public void setEnable(Boolean enable) {
+        this.enable = enable;
+    }
+
+    public Collection getDrinks() {
+        return drinks;
+    }
+
+    public void setDrinks(Collection drinks) {
+        this.drinks = drinks;
+    }
+
+    public void addDrink(String drink) {
+        drinks.add(drink);
+    }
+
+    public Collection getContacts() {
+        return contacts;
+    }
+
+    public void setContacts(Collection contacts) {
+        this.contacts = contacts;
+    }
+
+    public void addContact(Contact contact) {
+        contacts.add(contact);
+    }
+
+    public String toString() {
+        return "email = " + email + ", phoneCountry = " + phoneCountry + ", phoneZone = " + phoneZone + ", phoneNumber = " + phoneNumber + ", ipAddress = " + ipAddress + ", contacts = " + contacts.toString();
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Form2Bean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,64 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples;
+
+import org.apache.cocoon.environment.Redirector;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.forms.acting.AbstractFormsAction;
+import org.apache.cocoon.forms.formmodel.Field;
+import org.apache.cocoon.forms.formmodel.Form;
+import org.apache.cocoon.forms.formmodel.Repeater;
+import org.apache.avalon.framework.parameters.Parameters;
+
+import java.util.Map;
+import java.util.Date;
+
+/**
+ * An action that creates an instance of a specific example form included with
+ * Cocoon Forms, and adds some rows to its repeater widget. This example is
+ * meant to illustrate how you can prepopulate a Form instance before its
+ * initial display.
+ * 
+ * @version $Id: InitForm1Action.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class InitForm1Action extends AbstractFormsAction {
+    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
+            throws Exception {
+        String formSource = parameters.getParameter("form-definition");
+        String formAttribute = parameters.getParameter("attribute-name");
+
+        Form form = formManager.createForm(resolver.resolveURI(formSource));
+
+        Field birthDate = (Field)form.getChild("birthdate");
+        birthDate.setValue(new Date());
+
+        Repeater repeater = (Repeater)form.getChild("contacts");
+        repeater.addRow();
+        Field field = (Field)repeater.getWidget(0, "firstname");
+        field.setValue("Jules");
+
+        repeater.addRow();
+        field = (Field)repeater.getWidget(1, "firstname");
+        field.setValue("Lucien");
+
+        Request request = ObjectModelHelper.getRequest(objectModel);
+        request.setAttribute(formAttribute, form);
+
+        return null;
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/InitForm1Action.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Sex.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Sex.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Sex.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Sex.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples;
+
+
+/**
+ * Description of Sex.
+ * @version $Id: Sex.java 151179 2005-02-03 16:55:16Z tim $
+ */
+public class Sex {
+
+    public static final Sex MALE = new Sex("M");
+    public static final Sex FEMALE = new Sex("F");
+    private String code;
+
+    private Sex(String code) { this.code = code; }
+
+    public String toString() {
+      // Will probably have some i18n support here
+      switch(code.charAt(0)) {
+          case 'M' : return this.getClass().getName() + ".MALE";
+          case 'F' : return this.getClass().getName() + ".FEMALE";
+          default : return "unknown"; // Should never happen
+      }
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/Sex.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/CustomValueWrapBinding.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/CustomValueWrapBinding.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/CustomValueWrapBinding.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/CustomValueWrapBinding.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,99 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.bindings;
+
+import org.apache.cocoon.forms.binding.AbstractCustomBinding;
+import org.apache.cocoon.forms.binding.Binding;
+import org.apache.cocoon.forms.binding.BindingException;
+import org.apache.cocoon.forms.formmodel.Widget;
+import org.apache.cocoon.forms.util.DomHelper;
+import org.apache.commons.jxpath.JXPathContext;
+import org.w3c.dom.Element;
+
+/**
+ * CustomValueWrapBinding
+ */
+public class CustomValueWrapBinding extends AbstractCustomBinding {
+
+    private static final char DEFAULT_DELIMITER = '*';
+    private final String prefix;
+    private final String suffix;
+    
+    public CustomValueWrapBinding() {
+        this(DEFAULT_DELIMITER);
+    }
+
+    public CustomValueWrapBinding(char delimiter) {
+        this(delimiter, delimiter);
+    }
+    
+    public CustomValueWrapBinding(char prefix, char suffix) {
+        this.prefix = ""+ prefix + prefix;
+        this.suffix = "" + suffix + suffix;
+    }
+
+    /**
+     * This unwraps the value from the model by removing the 2 prefix and suffix-chars 
+     * before setting it onto the model
+     * 
+     * Method signature and semantics complies to {@link AbstractCustomBinding#doLoad(Widget, JXPathContext)}
+     */
+    public void doLoad(Widget frmModel, JXPathContext jxpc) throws BindingException {
+        String appValue = (String)jxpc.getValue(".");
+        String formValue= null;
+        if (appValue.startsWith(this.prefix) 
+                && appValue.endsWith(suffix) 
+                && appValue.length() >= this.prefix.length() + this.suffix.length()) {
+            formValue = appValue.substring(this.prefix.length(), 
+                                           appValue.length() - this.suffix.length());
+        }        
+        frmModel.setValue(formValue);
+    }
+
+    /**
+     * This wraps the value from the form between 2 prefix and suffix-chars 
+     * before saving to the model 
+     * 
+     * Method signature and semantics complies to {@link AbstractCustomBinding#doSave(Widget, JXPathContext)}
+     */
+    public void doSave(Widget frmModel, JXPathContext jxpc) throws BindingException {
+        Object formValue = frmModel.getValue();       
+        jxpc.setValue(".", "" + this.prefix + formValue + this.suffix);        
+    }
+    
+    
+    /** 
+     * Builds the actual binding class based on its XML config.
+     * 
+     * @param config the {@link Element} holding the config for the binding to create.
+     * @return the configured binding
+     * @throws BindingException when the creation fails
+     */
+    public static Binding createBinding(Element config) throws BindingException{
+        
+        try {
+            String pfx = DomHelper.getAttribute(config, "prefixchar", null);
+            String sfx = DomHelper.getAttribute(config, "suffixchar", null);
+            
+            final char prefixChar = (pfx!=null) ? pfx.charAt(0) : DEFAULT_DELIMITER;
+            final char suffixChar = (sfx!=null) ? sfx.charAt(0) : DEFAULT_DELIMITER;
+            
+            return new CustomValueWrapBinding(prefixChar, suffixChar);
+        } catch (Exception e) {
+            throw new BindingException("Could not create instance of CustomValueWrapBinding." ,e);
+        }
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/CustomValueWrapBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/DateWrapper.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/DateWrapper.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/DateWrapper.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/DateWrapper.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,97 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.bindings;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+/**
+ * DateWrapper is a specific sample test-class to demo the aggregate-binding.
+ * This class must loook quite awkward, but is specially designed to look 
+ * similar to the XML structure used in the same sample.
+ * 
+ * That is also why all field types here are simply kept to String
+ * This will cause the binding-conversion to be applied.
+ */
+public class DateWrapper {
+
+    private Map split = new HashMap();
+    
+    public DateWrapper(String day, String month, String year) {
+        setDay(day);
+        setMonth(month);
+        setYear(year);        
+    }
+    
+    public String getCombined() {
+        return "" + getDay() +"/" + getMonth() + "/" + getYear();
+    }
+
+
+    public void setCombined(String fullDate) {
+        StringTokenizer st = new StringTokenizer(fullDate, "/");
+        setDay(st.nextToken());
+        setMonth(st.nextToken());
+        setYear(st.nextToken());
+    }
+
+    public Map getSplit() {
+        return this.split;
+    }
+
+    /**
+     * @return Returns the day.
+     */
+    public String getDay() {
+        return split.get("day").toString();
+    }
+    /**
+     * @param day The day to set.
+     */
+    public void setDay(String day) {
+        split.put("day", day);
+    }
+    /**
+     * @return Returns the month.
+     */
+    public String getMonth() {
+        return split.get("month").toString();
+    }
+    /**
+     * @param month The month to set.
+     */
+    public void setMonth(String month) {
+        split.put("month", month);
+    }
+    /**
+     * @return Returns the year.
+     */
+    public String getYear() {
+        return split.get("year").toString();
+    }
+    /**
+     * @param year The year to set.
+     */
+    public void setYear(String year) {
+        split.put("year", year);
+    }
+
+    public String toString() {
+        return "Wrapped Date as combined='" + getCombined() + "' as split=[" 
+                + getDay() + ", " + getMonth() + ", " + getYear() + "]";
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/DateWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientBaseBean.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientBaseBean.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientBaseBean.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientBaseBean.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cocoon.forms.samples.bindings;
+
+/**
+ * LenientBaseBean
+ * @author Marc Portier
+ * @version $Id: LenientBaseBean.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class LenientBaseBean {
+    protected String breakingField;
+    protected String surviveField;
+
+    protected LenientBaseBean(String initVal) {
+        this.breakingField = initVal;
+        this.surviveField = initVal;
+    }
+
+    public String toString() {
+        final String className = this.getClass().getName();
+        final String state = "[breakingField=" +breakingField + "|surviveField="+ surviveField+"]";
+        return className + state;
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientBaseBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientNotOKBean.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientNotOKBean.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientNotOKBean.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientNotOKBean.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.bindings;
+
+/**
+ * LenientNotOKBean
+ * @author Marc Portier
+ * @version $Id: LenientNotOKBean.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class LenientNotOKBean extends LenientBaseBean{
+    public LenientNotOKBean(String initVal) {
+        super(initVal);
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientNotOKBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientOKBean.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientOKBean.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientOKBean.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientOKBean.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,42 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.bindings;
+
+/**
+ * LenientOKBean
+ * @author Marc Portier
+ * @version $Id: LenientOKBean.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class LenientOKBean extends LenientBaseBean{
+
+    public LenientOKBean(String initVal) {
+        super(initVal);
+    }
+
+    /**
+     * @return Returns the breakingField.
+     */
+    public String getBreakingField() {
+        return breakingField;
+    }
+
+    /**
+     * @param breakingField The breakingField to set.
+     */
+    public void setBreakingField(String breakingField) {
+        this.breakingField = breakingField;
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/LenientOKBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/ValuesBean.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/ValuesBean.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/ValuesBean.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/ValuesBean.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,188 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.bindings;
+
+/**
+ * ValuesBean used in the 01values test.
+ * @author Marc Portier
+ * @version $Id: ValuesBean.java 56582 2004-11-04 10:16:22Z sylvain $
+ */
+public class ValuesBean {
+    private String simple = "Simple";
+    private String writeOnly = "Write-Only";
+    private String readOnly = "Read-Only";
+    private String date = "19700506";
+    private String diffIn = "Diff-in/out";
+    private String diffOut;
+    private String onUpdate = "On Update";
+    private int updateCount = 0;
+    private boolean bool = true;
+    private String other = "This field is not involved in the form.";
+
+    public String toString() {
+        return "ValuesBean[\n"
+        +"\tsimple=" +simple +"\n"
+        +"\treadonly=" +readOnly +"\n"
+        +"\twriteonly=" +writeOnly +"\n"
+        +"\tdiff-in=" +diffIn +"\n"
+        +"\tdiff-out=" +diffOut +"\n"
+        +"\tdate=" +date +"\n"
+        +"\tbool=" +bool +"\n"
+        +"\tonupdate=" + onUpdate +"\n"
+        +"\tupdateCount=" + updateCount +"\n"
+        +"\tother=" + other +"\n";
+    }
+
+    /**
+     * @return Returns the bool.
+     */
+    public boolean isBool() {
+        return bool;
+    }
+
+    /**
+     * @param bool The bool to set.
+     */
+    public void setBool(boolean bool) {
+        this.bool = bool;
+    }
+
+    /**
+     * @return Returns the date.
+     */
+    public String getDate() {
+        return date;
+    }
+
+    /**
+     * @param date The date to set.
+     */
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    /**
+     * @return Returns the diffIn.
+     */
+    public String getDiffIn() {
+        return diffIn;
+    }
+
+    /**
+     * @param diffIn The diffIn to set.
+     */
+    public void setDiffIn(String diffIn) {
+        this.diffIn = diffIn;
+    }
+
+    /**
+     * @return Returns the diffOut.
+     */
+    public String getDiffOut() {
+        return diffOut;
+    }
+
+    /**
+     * @param diffOut The diffOut to set.
+     */
+    public void setDiffOut(String diffOut) {
+        this.diffOut = diffOut;
+    }
+
+    /**
+     * @return Returns the onUpdate.
+     */
+    public String getOnUpdate() {
+        return onUpdate;
+    }
+
+    /**
+     * @param onUpdate The onUpdate to set.
+     */
+    public void setOnUpdate(String onUpdate) {
+        this.onUpdate = onUpdate;
+    }
+
+    /**
+     * @return Returns the other.
+     */
+    public String getOther() {
+        return other;
+    }
+
+    /**
+     * @param other The other to set.
+     */
+    public void setOther(String other) {
+        this.other = other;
+    }
+
+    /**
+     * @return Returns the readOnly.
+     */
+    public String getReadOnly() {
+        return readOnly;
+    }
+
+    /**
+     * @param readOnly The readOnly to set.
+     */
+    public void setReadOnly(String readOnly) {
+        this.readOnly = readOnly;
+    }
+
+    /**
+     * @return Returns the simple.
+     */
+    public String getSimple() {
+        return simple;
+    }
+
+    /**
+     * @param simple The simple to set.
+     */
+    public void setSimple(String simple) {
+        this.simple = simple;
+    }
+
+    /**
+     * @return Returns the updateCount.
+     */
+    public int getUpdateCount() {
+        return updateCount;
+    }
+
+    /**
+     * @param updateCount The updateCount to set.
+     */
+    public void setUpdateCount(int updateCount) {
+        this.updateCount = updateCount;
+    }
+
+    /**
+     * @return Returns the writeOnly.
+     */
+    public String getWriteOnly() {
+        return writeOnly;
+    }
+
+    /**
+     * @param writeOnly The writeOnly to set.
+     */
+    public void setWriteOnly(String writeOnly) {
+        this.writeOnly = writeOnly;
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/bindings/ValuesBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Manager.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Manager.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Manager.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Manager.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,136 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.dreamteam;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * Manager
+ */
+public class Manager {
+    private static Manager manager = new Manager();
+    private List allPersons = null;
+    private Team dreamTeam = null;
+
+    private Manager() {
+        super();
+    }
+
+    public static Manager getManager() {
+        if (manager == null) {
+            manager = new Manager();
+        }
+        return manager;
+    }
+    public Hashtable getAllPersonsByPosition() {
+        Hashtable list = new Hashtable();
+        Team team = null;
+        TeamMember teamMember = null;
+        String position = null;
+        for (int i = 0; i < allPersons.size(); i++) {
+            teamMember = (TeamMember)allPersons.get(i);
+            position = teamMember.getPosition();
+            if (list.containsKey(position)) {
+                team = (Team)list.get(position);
+            }
+            else {
+                team = new Team();
+                list.put(position, team);
+            }
+            team.addMember(teamMember);
+        }
+        return list;
+
+    }
+    public TeamMember getPerson(String memberID) {
+        TeamMember member = null;
+        if (allPersons == null) {
+            return null;
+        }
+        for (Iterator iter = allPersons.iterator(); iter.hasNext();) {
+            member = (TeamMember) iter.next();
+            if (member.getMemberId().equals(memberID)) {
+                return member;
+            }
+        }
+        return null;
+    }
+
+    public void buildDreamTeam(Team dreamlist) {
+        if (dreamTeam != null) {
+            dreamTeam.getTeam().clear();
+        }
+        dreamTeam = new Team();
+        TeamMember listMember = null;
+        TeamMember dreamMember = null;
+        for (Iterator iter = dreamlist.getTeam().iterator(); iter.hasNext();) {
+            listMember = (TeamMember) iter.next();
+            dreamMember = getPerson(listMember.getMemberId());
+            dreamTeam.addMember(dreamMember);
+        }
+    }
+
+    public Team getDreamTeam() {
+        if (dreamTeam == null) {
+            dreamTeam = new Team();
+            dreamTeam.setTeam(allPersons);
+        }
+        return dreamTeam;
+    }
+
+    public void readPlayers(Document doc) {
+        NodeList players = doc.getElementsByTagName("player");
+        Node player = null;
+        int size = players.getLength();
+        for (int i = 0; i < size; i++) {
+            player = players.item(i);
+            addPlayer((Element)player);
+        }
+    }
+
+    private void addPlayer(Element player) {
+        // convert the XML node to a TeamMember
+        if (allPersons == null) {
+            allPersons = new ArrayList();
+        }
+        TeamMember member = null;
+        member = new TeamMember();
+        member.setMemberId("" + (allPersons.size() + 1));
+        member.setName(getElementValue(player, "name"));
+        member.setPosition(getElementValue(player, "position"));
+        member.setCountry(getElementValue(player, "country"));
+//        System.out.println(member.toString());
+        allPersons.add(member);
+    }
+
+    private String getElementValue(Element element, String tag) {
+        String result = null;
+        NodeList nodes = element.getElementsByTagName(tag);
+        result = nodes.item(0).getFirstChild().getNodeValue();
+//        System.out.println("element: " + tag + "=" + result);
+        return result;
+    }
+
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Manager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Team.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Team.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Team.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Team.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,57 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.dreamteam;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+/**
+ * Team
+ */
+public class Team {
+
+    private Collection team = new ArrayList();
+
+    public Team() {
+    }
+
+    public Collection getTeam() {
+        return team;
+    }
+
+    public void setTeam(Collection _team) {
+        team = _team;
+    }
+
+    public void addMember(TeamMember member) {
+        team.add(member);
+    }
+
+    public TeamMember getMember(String memberID) {
+        TeamMember member = null;
+        if (team == null) {
+            return null;
+        }
+        for (Iterator iter = team.iterator(); iter.hasNext();) {
+            member = (TeamMember) iter.next();
+            if (member.getMemberId().equals(memberID)) {
+                return member;
+            }
+        }
+        return null;
+    }
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/Team.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/TeamMember.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/TeamMember.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/TeamMember.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/TeamMember.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,81 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms.samples.dreamteam;
+
+/**
+ * TeamMember
+ */
+public class TeamMember {
+    private String memberId = null;
+    private String name = null;
+    private String position = null;
+    private String country = null;
+
+    public TeamMember() {
+        super();
+    }
+
+    public String getMemberId() {
+        return memberId;
+    }
+
+    public void setMemberId(String memberID) {
+        this.memberId = memberID;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getLastName() {
+        if (name == null) {
+            return "Name not set!";
+        }
+        String lastName = name.substring(name.indexOf(" ") + 1);
+        if (lastName.equals("")) {
+            lastName = name;
+        }
+        return lastName;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String profession) {
+        this.position = profession;
+    }
+
+    public String getCountry() {
+        return country;
+    }
+
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    public String toString() {
+        String result = "<member id='" + memberId + "'><name>" + name
+                + "</name><position>" + position + "</position><country>"
+                + country + "</country></member>";
+        return result;
+    }
+
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-forms-block/samples/src/main/java/org/apache/cocoon/forms/samples/dreamteam/TeamMember.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/pom.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/pom.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/pom.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--+
+    | @version $Id:$
+    |
+    +-->
+<project>
+  <parent>
+    <groupId>apache-cocoon</groupId>
+    <artifactId>cocoon</artifactId>
+    <version>2.2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>apache-cocoon</groupId>
+  <artifactId>cocoon-mocks</artifactId>
+  <version>2.2-SNAPSHOT</version>
+  <packaging>jar</packaging>
+  <name>Core Mocks</name>
+</project>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/com/sun/tools/javac/Main.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/com/sun/tools/javac/Main.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/com/sun/tools/javac/Main.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/com/sun/tools/javac/Main.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.sun.tools.javac;
+
+import java.io.PrintWriter;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code when
+ * the actual library is not present.
+ * 
+ * @version CVS $Id: Main.java 30932 2004-07-29 17:35:38Z vgritsenko $
+ */
+public class Main {
+
+	public Main() {
+       throw new UnsupportedOperationException("This is a mock object");
+	}
+
+	public static int compile(String[] strings, PrintWriter p) {
+	   throw new UnsupportedOperationException("This is a mock object");
+	}
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/com/sun/tools/javac/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/DOMConfiguration.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/DOMConfiguration.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/DOMConfiguration.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/DOMConfiguration.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.w3c.dom;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code when
+ * the actual library is not present. This class is required due to incompatible
+ * changes between JDK 1.4 and JDK 5.0 wrt the DOM interfaces (level 2 to level 3).
+ * 
+ * @version $Id: DOMConfiguration.java 156528 2005-03-08 14:33:33Z cziegeler $
+ */
+public interface DOMConfiguration {
+
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/DOMConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/TypeInfo.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/TypeInfo.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/TypeInfo.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/TypeInfo.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.w3c.dom;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code when
+ * the actual library is not present. This class is required due to incompatible
+ * changes between JDK 1.4 and JDK 5.0 wrt the DOM interfaces (level 2 to level 3).
+ * 
+ * @version $Id: TypeInfo.java 156528 2005-03-08 14:33:33Z cziegeler $
+ */
+public interface TypeInfo {
+
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/TypeInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/UserDataHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/UserDataHandler.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/UserDataHandler.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/UserDataHandler.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.w3c.dom;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code when
+ * the actual library is not present. This class is required due to incompatible
+ * changes between JDK 1.4 and JDK 5.0 wrt the DOM interfaces (level 2 to level 3).
+ * 
+ * @version $Id: UserDataHandler.java 156528 2005-03-08 14:33:33Z cziegeler $
+ */
+public interface UserDataHandler {
+
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/org/w3c/dom/UserDataHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/sun/tools/javac/Main.java
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/sun/tools/javac/Main.java?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/sun/tools/javac/Main.java (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/sun/tools/javac/Main.java Thu Nov  3 05:41:06 2005
@@ -0,0 +1,36 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package sun.tools.javac;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * Mock class providing the declarations required to compile the Cocoon code when
+ * the actual library is not present.
+ * 
+ * @version CVS $Id: Main.java 30941 2004-07-29 19:56:58Z vgritsenko $
+ */
+public class Main {
+
+	public Main(OutputStream err, String string) {
+       throw new UnsupportedOperationException("This is a mock object");
+	}
+
+	public boolean compile(String[] strings) throws IOException {
+	   throw new UnsupportedOperationException("This is a mock object");
+	}
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/cocoon-mocks/src/main/java/sun/tools/javac/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/pom.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/pom.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/pom.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--+
+    | @version $Id:$
+    |
+    +-->
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>apache-cocoon</groupId>
+  <artifactId>cocoon</artifactId>
+  <version>2.2-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <name>Cocoon</name>
+  <modules>
+    <module>cocoon-core</module>
+    <module>cocoon-mocks</module>
+    <module>cocoon-ajax-block</module>
+    <!--<module>cocoon-asciiart-block</module>-->
+    <module>cocoon-forms-block</module>
+    <module>webapp</module>
+  </modules>
+</project>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/pom.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/pom.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/pom.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--+
+    | @version $Id:$
+    |
+    +-->
+<project>
+  <parent>
+    <groupId>apache-cocoon</groupId>
+    <artifactId>cocoon</artifactId>
+    <version>2.2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>apache-cocoon</groupId>
+  <artifactId>cocoon-webapp</artifactId>
+  <version>2.2-SNAPSHOT</version>
+  <packaging>war</packaging>
+  <name>Cocoon Webapp</name>
+</project>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/Manifest.mf
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/Manifest.mf?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/Manifest.mf (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/Manifest.mf Thu Nov  3 05:41:06 2005
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Ant-Version: Apache Ant 1.6.5
+Created-By: 1.4.2_06-b03 (Sun Microsystems Inc.)
+Bundle-Name: cocoon_webapp
+Bundle-SymbolicName: org.apache.cocoon:cocoon_webapp:1.0.0
+Bundle-Version: 1.0.0
+Bundle-Description: Cocoon webapp
+Bundle-Vendor: Apache
+Bundle-DocURL: http://cocoon.apache.org
+Bundle-ContactAddress: http://cocoon.apache.org
+Bundle-Activator: org.apache.cocoon.core.osgi.CoreBlockActivator
+Bundle-Category: sitemap
+Import-Package: 
+ org.osgi.framework,
+ org.apache.cocoon,
+ org.apache.excalibur.source,
+ org.apache.excalibur.store,
+ org.apache.excalibur.xml,
+ org.apache.excalibur.xml.sax,
+ org.apache.excalibur.xml.xpath,
+ org.apache.excalibur.xml.xslt,
+ org.apache.excalibur.xmlizer
+DynamicImport-Package: org.apache.cocoon.*
+Bundle-UUID: org.apache.cocoon:cocoon_webapp:1.0.0:impl

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/Manifest.mf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/block.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/block.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/block.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/webapp/1.0">
+  <name>webapp</name>
+  <description href="http://cocoon.apache.org/blocks/webapp/1.0">
+    Cocoon core samples
+  </description>
+  <state href="http://cocoon.apache.org/blocks/wbapp/1.0/state.html" 
+         community="supported" 
+         interfaces="unstable" 
+         implementation="unstable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <components>
+    <include src="context://WEB-INF/xconf/cocoon-core.xconf"/>
+    <include src="context://WEB-INF/xconf/cocoon-core-sitemap.xconf"/>
+    <include src="context://WEB-INF/sitemap-additions/cocoon-core-sitemap-additions.xconf"/>
+  </components>
+  <sitemap src="sitemap.xmap"/>
+</block>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/block.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/COB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/COB-INF/block.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/COB-INF/block.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/COB-INF/block.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/mysample/1.0">
+  <name>my sample</name>
+  <description href="http://cocoon.apache.org/blocks/mysample/1.0">
+    An example sample
+  </description>
+  <state href="http://cocoon.apache.org/blocks/mysample/1.0/state.html" 
+         community="contributed" 
+         interfaces="unstable" 
+         implementation="unstable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <sitemap src="sitemap.xmap"/>
+  <extends block="http://cocoon.apache.org/blocks/sample/1.0"/>
+</block>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/COB-INF/block.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/samples.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/samples.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/samples.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/samples.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--+
+    | An example samples page
+    |
+    | $Id: samples.xml 192973 2005-06-22 18:41:29Z danielf $
+    +-->
+
+<samples name="My Samples">
+
+  <group name="My Group of Samples">
+    <sample name="My sample" href="test1">
+      The complete separation between content and style
+      leads to a very powerful multi-channeling solution where you can
+      apply different stylesheets to the same content and generate different
+      flavors of it.
+    </sample>
+    <sample name="Another sample" href="test2">
+      A couple of existing web sites have been xml-ized to show you
+      how easier it is to handle pure-content markup.
+    </sample>   
+  </group>
+
+</samples>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/samples.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/sitemap.xmap?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/sitemap.xmap (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/sitemap.xmap Thu Nov  3 05:41:06 2005
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- SVN $Id: sitemap.xmap 192973 2005-06-22 18:41:29Z danielf $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <source-factories>
+      <component-instance class="org.apache.cocoon.components.source.impl.BlockSourceFactory" name="block"/>
+    </source-factories>
+
+    <map:generators default="file">
+      <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
+    </map:generators>
+
+    <map:serializers default="xml">
+      <map:serializer mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
+    </map:serializers>
+
+    <map:readers default="resource">
+      <map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
+    </map:readers>
+
+    <map:matchers default="wildcard">
+      <map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
+    </map:matchers>
+
+    <map:pipes default="noncaching">
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline">
+      </map:pipe>
+    </map:pipes>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+
+      <map:match pattern="samples.xml">
+        <map:generate src="samples.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="test*">
+        <map:generate src="test.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="**">
+        <map:read src="block:super:/{1}"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/test.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/test.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/test.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><mytest/>
\ No newline at end of file

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/mysample/test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/COB-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/COB-INF/block.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/COB-INF/block.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/COB-INF/block.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+       xsi:schemaLocation="http://apache.org/cocoon/blocks/cob/1.0 cob-schema-1.0.xsd"
+       id="http://cocoon.apache.org/blocks/sample/1.0">
+  <name>sample</name>
+  <description href="http://cocoon.apache.org/blocks/sample/1.0">
+    Styling of Cocoon samples
+  </description>
+  <state href="http://cocoon.apache.org/blocks/mysample/1.0/state.html" 
+         community="contributed" 
+         interfaces="unstable" 
+         implementation="unstable"/>
+  <license href="http://www.apache.org/licenses/">Apache License 2.0</license>
+  <author href="http://cocoon.apache.org">Apache Cocoon community</author>
+  <sitemap src="sitemap.xmap"/>
+</block>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/COB-INF/block.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/images/cocoon.gif
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/images/cocoon.gif?rev=330548&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/images/cocoon.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/styles/main.css
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/styles/main.css?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/styles/main.css (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/styles/main.css Thu Nov  3 05:41:06 2005
@@ -0,0 +1,81 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+body { background-color: white; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 80%; }
+
+h1 { color: #336699; text-align: center; font-size: 3em; padding-bottom: 10px; margin: 0px; }
+h2 { color: #336699; }
+h3 { color: #336699; }
+h4 { color: #336699; }
+
+a:link { color: #336699; }
+a:visited { color: #800080; }
+a:hover { color: #800080; background-color: #ffff80; }
+a:active { color: #006666; }
+
+img { border: 0; }
+.figure { text-align: center; }
+
+span.year { color: #336699; }
+
+p.copyright { text-align: center; padding-top: 10px; border-width: 1px 0px 0px 0px; border-style: solid; border-color: #336699; }
+p.author { color: #336699; padding-bottom: 10px; }
+p.block { text-align: center; }
+
+hr { height: 0px; color: #336699; }
+
+span.description { color: #336699; font-weight: bold; }
+span.switch { cursor: pointer; margin-left: 5px; text-decoration: underline; }
+
+/* Samples */
+
+.samplesGroup {
+    /* a tasteful shade of blue */
+    background-color: #BFCCDF;
+    color: black;
+    border-width: 0px 0px 2px 0px;
+    border-style: solid;
+    border-color: #336699;
+    font-size:120%;
+    padding-left: 0.2em;
+    padding-top: 0.2em;
+    padding-bottom: 0.2em;
+    margin-top: 1em;
+    margin-bottom: 0;
+ 
+    /* mozilla and some others support the fancy CSS3 borders */
+    -moz-border-radius-bottomleft: 1em;
+    border-radius-bottomleft: 1em;
+}
+
+.samplesNote {
+    color: #333333;
+    margin: 0.5em;
+    padding: 0.2em;
+    background-color: #ffffcc;
+    font-style: italic;
+}
+
+.samplesText {
+    margin-top: 0.2em;
+}
+
+div.resources {
+    text-align: right;
+}
+
+div.resources a {
+    margin: 5px;
+}

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/resources/styles/main.css
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/samples.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/samples.xml?rev=330548&view=auto
==============================================================================
--- cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/samples.xml (added)
+++ cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/samples.xml Thu Nov  3 05:41:06 2005
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--+
+    | An example samples page
+    |
+    | $Id: samples.xml 192973 2005-06-22 18:41:29Z danielf $
+    +-->
+
+<samples name="Example Samples">
+
+  <group name="A Group of Samples">
+    <sample name="A sample" href="test1">
+      The complete separation between content and style
+      leads to a very powerful multi-channeling solution where you can
+      apply different stylesheets to the same content and generate different
+      flavors of it.
+    </sample>
+    <sample name="Another sample" href="test2">
+      A couple of existing web sites have been xml-ized to show you
+      how easier it is to handle pure-content markup.
+    </sample>   
+  </group>
+
+  <group name="More Samples">
+    <sample name="Still another sample" href="test3">
+      This example shows the usage of Input Modules in sitemap attribute expressions.
+    </sample>
+  </group>
+
+</samples>

Propchange: cocoon/whiteboard/maven2/cocoon-flat-layout/webapp/src/main/webapp/WEB-INF/blocks/sample/samples.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message