myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r427657 [41/42] - in /myfaces: core/trunk/api/src/main/java/javax/faces/component/ core/trunk/api/src/test/java/javax/faces/ core/trunk/api/src/test/java/javax/faces/application/ core/trunk/api/src/test/java/javax/faces/component/ core/trun...
Date Tue, 01 Aug 2006 17:44:01 GMT
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/timer/resource/timer.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/timer/resource/timer.js?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/timer/resource/timer.js (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/timer/resource/timer.js Tue Aug  1 10:43:28 2006
@@ -1,76 +1,76 @@
-function MakeArrayday(size)
-{
-  this.length = size;
-  for(var i = 1; i <= size; i++)
-    this[i] = "";
-  return this;
-}
-function MakeArraymonth(size)
-{
-  this.length = size;
-  for(var i = 1; i <= size; i++)
-    this[i] = "";
-  return this;
-}
-
-var hours;
-var minutes;
-var seconds;
-var timer=null;
-function sClock()
-{
-  hours=12;
-  minutes=59;
-  seconds=58;
-  if(timer){clearInterval(timer);timer=null;}
-  timer=setInterval("work();",1000);
-}
-
-function twoDigit(_v)
-{
-  if(_v<10)_v="0"+_v;
-  return _v;
-}
-
-function work()
-{
-  if (!document.layers && !document.all && !document.getElementById) return;
-  var runTime = new Date();
-  var dn = "AM";
-  var shours = hours;
-  var sminutes = minutes;
-  var sseconds = seconds;
-  if (shours >= 12)
-  {
-    dn = "PM";
-    shours-=12;
-  }
-  if (!shours) shours = 12;
-  sminutes=twoDigit(sminutes);
-  sseconds=twoDigit(sseconds);
-  shours  =twoDigit(shours  );
-  movingtime = ""+ shours + ":" + sminutes +":"+sseconds+"" + dn;
-  if (document.getElementById)
-    document.getElementById("clock").innerHTML=movingtime;
-  else if (document.layers)
-  {
-    document.layers.clock.document.open();
-    document.layers.clock.document.write(movingtime);
-    document.layers.clock.document.close();
-  }
-  else if (document.all)
-    clock.innerHTML = movingtime;
-
-  if(++seconds>59)
-  {
-    seconds=0;
-    if(++minutes>59)
-    {
-      minutes=0;
-      if(++hours>23)
-      {
-        hours=0;
-      }
-    }
-  }
+function MakeArrayday(size)
+{
+  this.length = size;
+  for(var i = 1; i <= size; i++)
+    this[i] = "";
+  return this;
+}
+function MakeArraymonth(size)
+{
+  this.length = size;
+  for(var i = 1; i <= size; i++)
+    this[i] = "";
+  return this;
+}
+
+var hours;
+var minutes;
+var seconds;
+var timer=null;
+function sClock()
+{
+  hours=12;
+  minutes=59;
+  seconds=58;
+  if(timer){clearInterval(timer);timer=null;}
+  timer=setInterval("work();",1000);
+}
+
+function twoDigit(_v)
+{
+  if(_v<10)_v="0"+_v;
+  return _v;
+}
+
+function work()
+{
+  if (!document.layers && !document.all && !document.getElementById) return;
+  var runTime = new Date();
+  var dn = "AM";
+  var shours = hours;
+  var sminutes = minutes;
+  var sseconds = seconds;
+  if (shours >= 12)
+  {
+    dn = "PM";
+    shours-=12;
+  }
+  if (!shours) shours = 12;
+  sminutes=twoDigit(sminutes);
+  sseconds=twoDigit(sseconds);
+  shours  =twoDigit(shours  );
+  movingtime = ""+ shours + ":" + sminutes +":"+sseconds+"" + dn;
+  if (document.getElementById)
+    document.getElementById("clock").innerHTML=movingtime;
+  else if (document.layers)
+  {
+    document.layers.clock.document.open();
+    document.layers.clock.document.write(movingtime);
+    document.layers.clock.document.close();
+  }
+  else if (document.all)
+    clock.innerHTML = movingtime;
+
+  if(++seconds>59)
+  {
+    seconds=0;
+    if(++minutes>59)
+    {
+      minutes=0;
+      if(++hours>23)
+      {
+        hours=0;
+      }
+    }
+  }
 }

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/timer/resource/timer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/ManagedFoo.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/ManagedFoo.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/ManagedFoo.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/ManagedFoo.java Tue Aug  1 10:43:28 2006
@@ -1,93 +1,93 @@
-/*
- * Copyright 2006 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.myfaces.custom.template;
-
-import java.io.InputStream;
-
-/**
- * Simple class to be used as a ManagedBean in testing.
- *
- * @author Sean Schofield
- */
-public class ManagedFoo
-{
-    private String content;
-    private String stylesheet;
-    private String contentLocation;
-    private String stylesheetLocation;
-    private InputStream contentStream;
-    private InputStream styleStream;
-
-    public String getContent()
-    {
-        return content;
-    }
-
-    public void setContent(String content)
-    {
-        this.content = content;
-    }
-
-    public String getStylesheet()
-    {
-        return stylesheet;
-    }
-
-    public void setStylesheet(String stylesheet)
-    {
-        this.stylesheet = stylesheet;
-    }
-
-    public String getContentLocation()
-    {
-        return contentLocation;
-    }
-
-    public void setContentLocation(String contentLocation)
-    {
-        this.contentLocation = contentLocation;
-    }
-
-    public String getStylesheetLocation()
-    {
-        return stylesheetLocation;
-    }
-
-    public void setStylesheetLocation(String stylesheetLocation)
-    {
-        this.stylesheetLocation = stylesheetLocation;
-    }
-
-    public InputStream getContentStream()
-    {
-        return contentStream;
-    }
-
-    public void setContentStream(InputStream contentStream)
-    {
-        this.contentStream = contentStream;
-    }
-
-    public InputStream getStyleStream()
-    {
-        return styleStream;
-    }
-
-    public void setStyleStream(InputStream styleStream)
-    {
-        this.styleStream = styleStream;
-    }
-}
+/*
+ * Copyright 2006 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.myfaces.custom.template;
+
+import java.io.InputStream;
+
+/**
+ * Simple class to be used as a ManagedBean in testing.
+ *
+ * @author Sean Schofield
+ */
+public class ManagedFoo
+{
+    private String content;
+    private String stylesheet;
+    private String contentLocation;
+    private String stylesheetLocation;
+    private InputStream contentStream;
+    private InputStream styleStream;
+
+    public String getContent()
+    {
+        return content;
+    }
+
+    public void setContent(String content)
+    {
+        this.content = content;
+    }
+
+    public String getStylesheet()
+    {
+        return stylesheet;
+    }
+
+    public void setStylesheet(String stylesheet)
+    {
+        this.stylesheet = stylesheet;
+    }
+
+    public String getContentLocation()
+    {
+        return contentLocation;
+    }
+
+    public void setContentLocation(String contentLocation)
+    {
+        this.contentLocation = contentLocation;
+    }
+
+    public String getStylesheetLocation()
+    {
+        return stylesheetLocation;
+    }
+
+    public void setStylesheetLocation(String stylesheetLocation)
+    {
+        this.stylesheetLocation = stylesheetLocation;
+    }
+
+    public InputStream getContentStream()
+    {
+        return contentStream;
+    }
+
+    public void setContentStream(InputStream contentStream)
+    {
+        this.contentStream = contentStream;
+    }
+
+    public InputStream getStyleStream()
+    {
+        return styleStream;
+    }
+
+    public void setStyleStream(InputStream styleStream)
+    {
+        this.styleStream = styleStream;
+    }
+}

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/ManagedFoo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/XmlTemplateTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/XmlTemplateTest.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/XmlTemplateTest.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/XmlTemplateTest.java Tue Aug  1 10:43:28 2006
@@ -1,394 +1,394 @@
-/*
- * Copyright 2006 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.myfaces.custom.template;
-
-import org.apache.shale.test.base.AbstractJsfTestCase;
-import org.apache.shale.test.mock.MockResponseWriter;
-import org.apache.shale.test.mock.MockRenderKitFactory;
-import org.apache.shale.test.mock.MockHttpServletRequest;
-import org.apache.shale.test.mock.MockValueBinding;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import java.io.*;
-import java.net.URL;
-
-/**
- * Test case for XmlTemplate
- *
- * @author Sean Schofield
- */
-public class XmlTemplateTest extends AbstractJsfTestCase
-{
-    private static final String PETS_STYLESHEET = "pets.xsl";
-    private static final String PETS_CONTENT = "pets.xml";
-    private static final String EXPECTED_TEXT = "Iguana";
-
-    private XmlTemplate xmlTemplate;
-    private ManagedFoo fooBean;
-    private String stylesheet;
-    private String stylesheetLocation = PETS_STYLESHEET;
-    private InputStream styleStream;
-    private String content;
-    private String contentLocation = PETS_CONTENT;
-    private InputStream contentStream;
-
-    private StringWriter mockWriter = new StringWriter();
-
-    /**
-     * Constructor
-     * @param name String
-     */
-    public XmlTemplateTest(String name)
-    {
-        super(name);
-    }
-
-    /**
-     * See abstract class
-     */
-    public void setUp()
-    {
-        super.setUp();
-
-        xmlTemplate = new XmlTemplate();
-
-        // additional setup not provided automatically by the shale mock stuff
-        facesContext.setResponseWriter(new MockResponseWriter(mockWriter, null, null));
-
-        // TODO remove these two lines once shale-test goes alpha, see MYFACES-1155
-        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
-
-        fooBean = new ManagedFoo();
-        fooBean.setContentLocation(PETS_CONTENT);
-        fooBean.setStylesheetLocation(PETS_STYLESHEET);
-
-        // put the foo bean in the request scope
-        MockHttpServletRequest request = (MockHttpServletRequest)facesContext.getExternalContext().getRequest();
-        request.setAttribute("foo", fooBean);
-
-        // setup input stream to be used in some of the test cases
-        ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        if (loader == null)
-        {
-            loader = XmlTemplate.class.getClassLoader();
-        }
-
-        URL url = loader.getResource(PETS_CONTENT);
-        try
-        {
-            contentStream = new FileInputStream(new File(url.getFile()));
-
-            // now also populate the String variable for certain test cases
-            FileInputStream cs = new FileInputStream(new File(url.getFile()));
-            int x= cs.available();
-            byte b[]= new byte[x];
-            //noinspection ResultOfMethodCallIgnored
-            cs.read(b);
-            content = new String(b);
-        }
-        catch (IOException io)
-        {}  // do nothing - test will fail eventually
-
-        // setup stylesheet text to be used in some of the test cases
-        url = loader.getResource(PETS_STYLESHEET);
-        try
-        {
-            styleStream = new FileInputStream(new File(url.getFile()));
-
-            // now also populate the String variable for certain test cases
-            FileInputStream ss = new FileInputStream(new File(url.getFile()));
-            int x= ss.available();
-            byte b[]= new byte[x];
-            //noinspection ResultOfMethodCallIgnored
-            ss.read(b);
-            stylesheet = new String(b);
-        }
-        catch (IOException io)
-        {}  // do nothing - test will fail eventually
-
-        fooBean.setContent(content);
-        fooBean.setStylesheet(stylesheet);
-        fooBean.setContentStream(contentStream);
-        fooBean.setStyleStream(styleStream);
-    }
-
-    /**
-     * Test the save and restore state methods.
-     */
-    public void testSaveAndRestoreState()
-    {
-        /**
-         * NOTE: Normally you would not set all of these properties together in the component, but for the
-         * purposes of testing, we want to make sure all fields are saved and restored properly.
-         */
-        xmlTemplate.setContent(content);
-        xmlTemplate.setContentLocation(contentLocation);
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.setStylesheetLocation(stylesheetLocation);
-        xmlTemplate.setContentStream(contentStream);
-        xmlTemplate.setStyleStream(styleStream);
-
-        Object state = xmlTemplate.saveState(facesContext);
-        xmlTemplate = new XmlTemplate();
-        xmlTemplate.restoreState(facesContext, state);
-
-        assertEquals(content, xmlTemplate.getContent());
-        assertEquals(contentLocation, xmlTemplate.getContentLocation());
-        assertEquals(stylesheet, xmlTemplate.getStylesheet());
-        assertEquals(stylesheetLocation, xmlTemplate.getStylesheetLocation());
-        assertNull("contentStream should be null since it cannot be serialized", xmlTemplate.getContentStream());
-        assertNull("styleStream should be null since it cannot be serialized", xmlTemplate.getStyleStream());
-    }
-
-    /**
-     * Test the save and restore state methods with all values as value binding expressions.  This also tests
-     * the value bindings themselves to make sure they are working.
-     */
-    public void testSaveAndRestoreStateValueBinding()
-    {
-        /**
-         * NOTE: Normally you would not set all of these properties together in the component, but for the
-         * purposes of testing, we want to make sure all fields are saved and restored properly.
-         */
-        xmlTemplate.setValueBinding("content", new MockValueBinding(application, "#{foo.content}"));
-        xmlTemplate.setValueBinding("contentLocation", new MockValueBinding(application, "#{foo.contentLocation}"));
-        xmlTemplate.setValueBinding("stylesheet", new MockValueBinding(application, "#{foo.stylesheet}"));
-        xmlTemplate.setValueBinding("stylesheetLocation", new MockValueBinding(application, "#{foo.stylesheetLocation}"));
-        xmlTemplate.setValueBinding("contentStream", new MockValueBinding(application, "#{foo.contentStream}"));
-        xmlTemplate.setValueBinding("styleStream", new MockValueBinding(application, "#{foo.styleStream}"));
-
-        Object state = xmlTemplate.saveState(facesContext);
-        xmlTemplate = new XmlTemplate();
-        xmlTemplate.restoreState(facesContext, state);
-
-        assertEquals(content, xmlTemplate.getContent());
-        assertEquals(contentLocation, xmlTemplate.getContentLocation());
-        assertEquals(stylesheet, xmlTemplate.getStylesheet());
-        assertEquals(stylesheetLocation, xmlTemplate.getStylesheetLocation());
-        assertEquals(contentStream, xmlTemplate.getContentStream());
-    }
-
-    public void testSetContent()
-    {
-        xmlTemplate.setContent("foo");
-        assertEquals("foo", xmlTemplate.getContent());
-
-        // reset property so we can test value binding
-        xmlTemplate.setContent(null);
-        xmlTemplate.setValueBinding("content", new MockValueBinding(application, "#{foo.content}"));
-        assertEquals(fooBean.getContent(), xmlTemplate.getContent());
-    }
-
-    public void testSetContentStream()
-    {
-        xmlTemplate.setContentStream(fooBean.getContentStream());
-        assertEquals(fooBean.getContentStream(), xmlTemplate.getContentStream());
-    }
-
-    public void testSetContentStreamValueBinding()
-    {
-        xmlTemplate.setValueBinding("contentStream", new MockValueBinding(application, "#{foo.contentStream}"));
-        assertEquals(fooBean.getContentStream(), xmlTemplate.getContentStream());
-    }
-
-    public void testSetStylesheet()
-    {
-        xmlTemplate.setStylesheet("foo");
-        assertEquals("foo", xmlTemplate.getStylesheet());
-
-        // reset property so we can test value binding
-        xmlTemplate.setStylesheet(null);
-        xmlTemplate.setValueBinding("stylesheet", new MockValueBinding(application, "#{foo.stylesheet}"));
-        assertEquals(fooBean.getStylesheet(), xmlTemplate.getStylesheet());
-    }
-
-    /**
-     * Component should throw NPE if no stylesheet or template is provided
-     */
-    public void testNoTransformInfo() throws IOException
-    {
-        try
-        {
-            xmlTemplate.encodeBegin(facesContext);
-        }
-        catch (NullPointerException e)
-        {
-            return;
-        }
-
-        fail("Expected exception when no template or stylesheet provided");
-    }
-
-    /**
-     * Component should throw NPE if no content is provided
-     */
-    public void testStylesheetNoContent() throws IOException
-    {
-        // stylesheet is not sufficient, content must be provided
-        xmlTemplate.setStylesheet("blah");
-
-        try
-        {
-            xmlTemplate.encodeBegin(facesContext);
-        }
-        catch (NullPointerException e)
-        {
-            return;
-        }
-
-        fail("Expected exception when stylesheet but no content provided");
-    }
-
-    public void testStyleSheet() throws IOException
-    {
-        xmlTemplate.setContentLocation(contentLocation);
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testStyleSheetValueBinding() throws IOException
-    {
-        xmlTemplate.setContent(content);
-        xmlTemplate.setValueBinding("stylesheet", new MockValueBinding(application, "#{foo.stylesheet}"));
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testStylesheetLocation() throws IOException
-    {
-        xmlTemplate.setContent(content);
-        xmlTemplate.setStylesheetLocation(stylesheetLocation);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testStylesheetLocationValueBinding() throws IOException
-    {
-        xmlTemplate.setContent(content);
-        xmlTemplate.setValueBinding("stylesheetLocation", new MockValueBinding(application, "#{foo.stylesheetLocation}"));
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testStylesheetStream() throws IOException
-    {
-        xmlTemplate.setStyleStream(styleStream);
-        xmlTemplate.setContent(content);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testStylesheetStreamValueBinding() throws IOException
-    {
-        xmlTemplate.setValueBinding("styleStream", new MockValueBinding(application, "#{foo.styleStream}"));
-        xmlTemplate.setContent(content);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testContent() throws IOException
-    {
-        xmlTemplate.setContent(content);
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testContentValueBinding() throws IOException
-    {
-        xmlTemplate.setValueBinding("content", new MockValueBinding(application, "#{foo.content}"));
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testContentLocation() throws IOException
-    {
-        xmlTemplate.setContentLocation(contentLocation);
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public void testContentLocationValueBinding() throws IOException
-    {
-        xmlTemplate.setValueBinding("contentLocation", new MockValueBinding(application, "#{foo.contentLocation}"));
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    /**
-     * Tests the actual transformation process using an InputStream as the source for content.
-     * @throws IOException
-     */
-    public void testContentStream() throws IOException
-    {
-        xmlTemplate.setContentStream(contentStream);
-        xmlTemplate.setStylesheet(stylesheet);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    /**
-     * Tests the actual transformation process using an InputStream as the source for content.  This test
-     * sets the property to a value binding (as you would through use of XmlTemplateTag) instead of setting
-     * the value of the contentStream on the component directly.
-     *
-     * @throws IOException
-     */
-    public void testContentStreamValueBinding() throws IOException
-    {
-        xmlTemplate.setValueBinding("contentStream", new MockValueBinding(application, "#{foo.contentStream}"));
-        xmlTemplate.setStylesheetLocation(stylesheetLocation);
-        xmlTemplate.encodeBegin(facesContext);
-
-        String responseText = mockWriter.toString();
-        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
-    }
-
-    public static Test suite()
-    {
-        return new TestSuite(XmlTemplateTest.class);
-    }
-
-}
+/*
+ * Copyright 2006 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.myfaces.custom.template;
+
+import org.apache.shale.test.base.AbstractJsfTestCase;
+import org.apache.shale.test.mock.MockResponseWriter;
+import org.apache.shale.test.mock.MockRenderKitFactory;
+import org.apache.shale.test.mock.MockHttpServletRequest;
+import org.apache.shale.test.mock.MockValueBinding;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import java.io.*;
+import java.net.URL;
+
+/**
+ * Test case for XmlTemplate
+ *
+ * @author Sean Schofield
+ */
+public class XmlTemplateTest extends AbstractJsfTestCase
+{
+    private static final String PETS_STYLESHEET = "pets.xsl";
+    private static final String PETS_CONTENT = "pets.xml";
+    private static final String EXPECTED_TEXT = "Iguana";
+
+    private XmlTemplate xmlTemplate;
+    private ManagedFoo fooBean;
+    private String stylesheet;
+    private String stylesheetLocation = PETS_STYLESHEET;
+    private InputStream styleStream;
+    private String content;
+    private String contentLocation = PETS_CONTENT;
+    private InputStream contentStream;
+
+    private StringWriter mockWriter = new StringWriter();
+
+    /**
+     * Constructor
+     * @param name String
+     */
+    public XmlTemplateTest(String name)
+    {
+        super(name);
+    }
+
+    /**
+     * See abstract class
+     */
+    public void setUp()
+    {
+        super.setUp();
+
+        xmlTemplate = new XmlTemplate();
+
+        // additional setup not provided automatically by the shale mock stuff
+        facesContext.setResponseWriter(new MockResponseWriter(mockWriter, null, null));
+
+        // TODO remove these two lines once shale-test goes alpha, see MYFACES-1155
+        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
+
+        fooBean = new ManagedFoo();
+        fooBean.setContentLocation(PETS_CONTENT);
+        fooBean.setStylesheetLocation(PETS_STYLESHEET);
+
+        // put the foo bean in the request scope
+        MockHttpServletRequest request = (MockHttpServletRequest)facesContext.getExternalContext().getRequest();
+        request.setAttribute("foo", fooBean);
+
+        // setup input stream to be used in some of the test cases
+        ClassLoader loader = Thread.currentThread().getContextClassLoader();
+        if (loader == null)
+        {
+            loader = XmlTemplate.class.getClassLoader();
+        }
+
+        URL url = loader.getResource(PETS_CONTENT);
+        try
+        {
+            contentStream = new FileInputStream(new File(url.getFile()));
+
+            // now also populate the String variable for certain test cases
+            FileInputStream cs = new FileInputStream(new File(url.getFile()));
+            int x= cs.available();
+            byte b[]= new byte[x];
+            //noinspection ResultOfMethodCallIgnored
+            cs.read(b);
+            content = new String(b);
+        }
+        catch (IOException io)
+        {}  // do nothing - test will fail eventually
+
+        // setup stylesheet text to be used in some of the test cases
+        url = loader.getResource(PETS_STYLESHEET);
+        try
+        {
+            styleStream = new FileInputStream(new File(url.getFile()));
+
+            // now also populate the String variable for certain test cases
+            FileInputStream ss = new FileInputStream(new File(url.getFile()));
+            int x= ss.available();
+            byte b[]= new byte[x];
+            //noinspection ResultOfMethodCallIgnored
+            ss.read(b);
+            stylesheet = new String(b);
+        }
+        catch (IOException io)
+        {}  // do nothing - test will fail eventually
+
+        fooBean.setContent(content);
+        fooBean.setStylesheet(stylesheet);
+        fooBean.setContentStream(contentStream);
+        fooBean.setStyleStream(styleStream);
+    }
+
+    /**
+     * Test the save and restore state methods.
+     */
+    public void testSaveAndRestoreState()
+    {
+        /**
+         * NOTE: Normally you would not set all of these properties together in the component, but for the
+         * purposes of testing, we want to make sure all fields are saved and restored properly.
+         */
+        xmlTemplate.setContent(content);
+        xmlTemplate.setContentLocation(contentLocation);
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.setStylesheetLocation(stylesheetLocation);
+        xmlTemplate.setContentStream(contentStream);
+        xmlTemplate.setStyleStream(styleStream);
+
+        Object state = xmlTemplate.saveState(facesContext);
+        xmlTemplate = new XmlTemplate();
+        xmlTemplate.restoreState(facesContext, state);
+
+        assertEquals(content, xmlTemplate.getContent());
+        assertEquals(contentLocation, xmlTemplate.getContentLocation());
+        assertEquals(stylesheet, xmlTemplate.getStylesheet());
+        assertEquals(stylesheetLocation, xmlTemplate.getStylesheetLocation());
+        assertNull("contentStream should be null since it cannot be serialized", xmlTemplate.getContentStream());
+        assertNull("styleStream should be null since it cannot be serialized", xmlTemplate.getStyleStream());
+    }
+
+    /**
+     * Test the save and restore state methods with all values as value binding expressions.  This also tests
+     * the value bindings themselves to make sure they are working.
+     */
+    public void testSaveAndRestoreStateValueBinding()
+    {
+        /**
+         * NOTE: Normally you would not set all of these properties together in the component, but for the
+         * purposes of testing, we want to make sure all fields are saved and restored properly.
+         */
+        xmlTemplate.setValueBinding("content", new MockValueBinding(application, "#{foo.content}"));
+        xmlTemplate.setValueBinding("contentLocation", new MockValueBinding(application, "#{foo.contentLocation}"));
+        xmlTemplate.setValueBinding("stylesheet", new MockValueBinding(application, "#{foo.stylesheet}"));
+        xmlTemplate.setValueBinding("stylesheetLocation", new MockValueBinding(application, "#{foo.stylesheetLocation}"));
+        xmlTemplate.setValueBinding("contentStream", new MockValueBinding(application, "#{foo.contentStream}"));
+        xmlTemplate.setValueBinding("styleStream", new MockValueBinding(application, "#{foo.styleStream}"));
+
+        Object state = xmlTemplate.saveState(facesContext);
+        xmlTemplate = new XmlTemplate();
+        xmlTemplate.restoreState(facesContext, state);
+
+        assertEquals(content, xmlTemplate.getContent());
+        assertEquals(contentLocation, xmlTemplate.getContentLocation());
+        assertEquals(stylesheet, xmlTemplate.getStylesheet());
+        assertEquals(stylesheetLocation, xmlTemplate.getStylesheetLocation());
+        assertEquals(contentStream, xmlTemplate.getContentStream());
+    }
+
+    public void testSetContent()
+    {
+        xmlTemplate.setContent("foo");
+        assertEquals("foo", xmlTemplate.getContent());
+
+        // reset property so we can test value binding
+        xmlTemplate.setContent(null);
+        xmlTemplate.setValueBinding("content", new MockValueBinding(application, "#{foo.content}"));
+        assertEquals(fooBean.getContent(), xmlTemplate.getContent());
+    }
+
+    public void testSetContentStream()
+    {
+        xmlTemplate.setContentStream(fooBean.getContentStream());
+        assertEquals(fooBean.getContentStream(), xmlTemplate.getContentStream());
+    }
+
+    public void testSetContentStreamValueBinding()
+    {
+        xmlTemplate.setValueBinding("contentStream", new MockValueBinding(application, "#{foo.contentStream}"));
+        assertEquals(fooBean.getContentStream(), xmlTemplate.getContentStream());
+    }
+
+    public void testSetStylesheet()
+    {
+        xmlTemplate.setStylesheet("foo");
+        assertEquals("foo", xmlTemplate.getStylesheet());
+
+        // reset property so we can test value binding
+        xmlTemplate.setStylesheet(null);
+        xmlTemplate.setValueBinding("stylesheet", new MockValueBinding(application, "#{foo.stylesheet}"));
+        assertEquals(fooBean.getStylesheet(), xmlTemplate.getStylesheet());
+    }
+
+    /**
+     * Component should throw NPE if no stylesheet or template is provided
+     */
+    public void testNoTransformInfo() throws IOException
+    {
+        try
+        {
+            xmlTemplate.encodeBegin(facesContext);
+        }
+        catch (NullPointerException e)
+        {
+            return;
+        }
+
+        fail("Expected exception when no template or stylesheet provided");
+    }
+
+    /**
+     * Component should throw NPE if no content is provided
+     */
+    public void testStylesheetNoContent() throws IOException
+    {
+        // stylesheet is not sufficient, content must be provided
+        xmlTemplate.setStylesheet("blah");
+
+        try
+        {
+            xmlTemplate.encodeBegin(facesContext);
+        }
+        catch (NullPointerException e)
+        {
+            return;
+        }
+
+        fail("Expected exception when stylesheet but no content provided");
+    }
+
+    public void testStyleSheet() throws IOException
+    {
+        xmlTemplate.setContentLocation(contentLocation);
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testStyleSheetValueBinding() throws IOException
+    {
+        xmlTemplate.setContent(content);
+        xmlTemplate.setValueBinding("stylesheet", new MockValueBinding(application, "#{foo.stylesheet}"));
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testStylesheetLocation() throws IOException
+    {
+        xmlTemplate.setContent(content);
+        xmlTemplate.setStylesheetLocation(stylesheetLocation);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testStylesheetLocationValueBinding() throws IOException
+    {
+        xmlTemplate.setContent(content);
+        xmlTemplate.setValueBinding("stylesheetLocation", new MockValueBinding(application, "#{foo.stylesheetLocation}"));
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testStylesheetStream() throws IOException
+    {
+        xmlTemplate.setStyleStream(styleStream);
+        xmlTemplate.setContent(content);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testStylesheetStreamValueBinding() throws IOException
+    {
+        xmlTemplate.setValueBinding("styleStream", new MockValueBinding(application, "#{foo.styleStream}"));
+        xmlTemplate.setContent(content);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testContent() throws IOException
+    {
+        xmlTemplate.setContent(content);
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testContentValueBinding() throws IOException
+    {
+        xmlTemplate.setValueBinding("content", new MockValueBinding(application, "#{foo.content}"));
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testContentLocation() throws IOException
+    {
+        xmlTemplate.setContentLocation(contentLocation);
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public void testContentLocationValueBinding() throws IOException
+    {
+        xmlTemplate.setValueBinding("contentLocation", new MockValueBinding(application, "#{foo.contentLocation}"));
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    /**
+     * Tests the actual transformation process using an InputStream as the source for content.
+     * @throws IOException
+     */
+    public void testContentStream() throws IOException
+    {
+        xmlTemplate.setContentStream(contentStream);
+        xmlTemplate.setStylesheet(stylesheet);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    /**
+     * Tests the actual transformation process using an InputStream as the source for content.  This test
+     * sets the property to a value binding (as you would through use of XmlTemplateTag) instead of setting
+     * the value of the contentStream on the component directly.
+     *
+     * @throws IOException
+     */
+    public void testContentStreamValueBinding() throws IOException
+    {
+        xmlTemplate.setValueBinding("contentStream", new MockValueBinding(application, "#{foo.contentStream}"));
+        xmlTemplate.setStylesheetLocation(stylesheetLocation);
+        xmlTemplate.encodeBegin(facesContext);
+
+        String responseText = mockWriter.toString();
+        assertEquals("Unexpected response text from content transformation", EXPECTED_TEXT, responseText);
+    }
+
+    public static Test suite()
+    {
+        return new TestSuite(XmlTemplateTest.class);
+    }
+
+}

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/test/java/org/apache/myfaces/custom/template/XmlTemplateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/assembly/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/assembly/pom.xml?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/assembly/pom.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/assembly/pom.xml Tue Aug  1 10:43:28 2006
@@ -1,78 +1,78 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <packaging>pom</packaging>
-    <name>Tomahawk Sandbox Examples Assembly</name>
-    <groupId>org.apache.myfaces.tomahawk</groupId>
-    <artifactId>tomahawk-sandbox-examples-assembly</artifactId>
-
-    <parent>
-        <groupId>org.apache.myfaces.tomahawk</groupId>
-        <artifactId>sandbox-project</artifactId>
-        <version>1.1.5-SNAPSHOT</version>
-    </parent>
-
-    <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/examples</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/examples</developerConnection>
-        <url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/sandbox/examples</url>
-    </scm>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>dependency-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>copy-war</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.apache.myfaces.tomahawk</groupId>
-                                    <artifactId>tomahawk-sandbox-examples</artifactId>
-                                    <version>${version}</version>
-                                    <type>war</type>	
-                                </artifactItem>
-			    </artifactItems>	
-                            <outputDirectory>${project.build.directory}/war</outputDirectory>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.0.1</version>
-                <configuration>
-		    <descriptors>	
-	                <descriptor>src/main/assembly/dep.xml</descriptor>
- 		    </descriptors>
-		    <finalName>tomahawk-sandbox-examples-${version}</finalName>
-                    <outputDirectory>${project.build.directory}/out</outputDirectory>
-                    <workDirectory>${project.build.directory}/work</workDirectory>
-                </configuration>
-            </plugin>
-	    
-            <plugin>
-                <groupId>org.apache.myfaces.maven</groupId>
-                <artifactId>wagon-maven-plugin</artifactId>
-                <version>1.0.4-SNAPSHOT</version>
-                <configuration>
-                    <id>myfaces-nightly-builds</id>
-                    <url>scpexe://minotaur.apache.org/www/cvs.apache.org/builds/myfaces/nightly</url>
-                    <inputDirectory>${project.build.directory}/out</inputDirectory>
-                </configuration>
-            </plugin>
-
-        </plugins>
-
-    </build>
-
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>pom</packaging>
+    <name>Tomahawk Sandbox Examples Assembly</name>
+    <groupId>org.apache.myfaces.tomahawk</groupId>
+    <artifactId>tomahawk-sandbox-examples-assembly</artifactId>
+
+    <parent>
+        <groupId>org.apache.myfaces.tomahawk</groupId>
+        <artifactId>sandbox-project</artifactId>
+        <version>1.1.5-SNAPSHOT</version>
+    </parent>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/examples</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/sandbox/examples</developerConnection>
+        <url>http://svn.apache.org/viewcvs.cgi/myfaces/tomahawk/trunk/sandbox/examples</url>
+    </scm>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>dependency-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-war</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.myfaces.tomahawk</groupId>
+                                    <artifactId>tomahawk-sandbox-examples</artifactId>
+                                    <version>${version}</version>
+                                    <type>war</type>	
+                                </artifactItem>
+			    </artifactItems>	
+                            <outputDirectory>${project.build.directory}/war</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.0.1</version>
+                <configuration>
+		    <descriptors>	
+	                <descriptor>src/main/assembly/dep.xml</descriptor>
+ 		    </descriptors>
+		    <finalName>tomahawk-sandbox-examples-${version}</finalName>
+                    <outputDirectory>${project.build.directory}/out</outputDirectory>
+                    <workDirectory>${project.build.directory}/work</workDirectory>
+                </configuration>
+            </plugin>
+	    
+            <plugin>
+                <groupId>org.apache.myfaces.maven</groupId>
+                <artifactId>wagon-maven-plugin</artifactId>
+                <version>1.0.4-SNAPSHOT</version>
+                <configuration>
+                    <id>myfaces-nightly-builds</id>
+                    <url>scpexe://minotaur.apache.org/www/cvs.apache.org/builds/myfaces/nightly</url>
+                    <inputDirectory>${project.build.directory}/out</inputDirectory>
+                </configuration>
+            </plugin>
+
+        </plugins>
+
+    </build>
+
+</project>

Propchange: myfaces/tomahawk/trunk/sandbox/examples/assembly/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/autoupdatedatatable/AutoUpdateDataTableBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/autoupdatedatatable/AutoUpdateDataTableBean.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/autoupdatedatatable/AutoUpdateDataTableBean.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/autoupdatedatatable/AutoUpdateDataTableBean.java Tue Aug  1 10:43:28 2006
@@ -1,41 +1,41 @@
-/*
- * 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.apache.myfaces.examples.autoupdatedatatable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Backing Bean for ajaxDataTableSingle.jsp
- */
-public class AutoUpdateDataTableBean {
-
-    private List testList = new ArrayList();
-
-    public List getTestList()
-    {
-        testList.clear();
-
-        for (int i = 0; i < 10; i++)
-            testList.add(new Integer((int) (Math.random() * 100)));
-
-        return testList;
-    }
-
-
-
-
-}
+/*
+ * 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.apache.myfaces.examples.autoupdatedatatable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Backing Bean for ajaxDataTableSingle.jsp
+ */
+public class AutoUpdateDataTableBean {
+
+    private List testList = new ArrayList();
+
+    public List getTestList()
+    {
+        testList.clear();
+
+        for (int i = 0; i < 10; i++)
+            testList.add(new Integer((int) (Math.random() * 100)));
+
+        return testList;
+    }
+
+
+
+
+}

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/autoupdatedatatable/AutoUpdateDataTableBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/dateTimeConverter/DateTimeConverterBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/debug/DebugPhaseListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java Tue Aug  1 10:43:28 2006
@@ -1,51 +1,51 @@
-/*
- * Copyright 2006 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.myfaces.examples.fisheye;
-
-import java.io.Serializable;
-
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ActionEvent;
-
-import org.apache.myfaces.custom.navmenu.UINavigationMenuItem;
-
-/**
- * Handler for the FishEye example
- * 
- * @author Jurgen Lust (latest modification by $Author$)
- * @version $Revision$ $Date$
- */
-public class FishEyeHandler implements Serializable
-{
-    private String _actionName;
-
-    public FishEyeHandler()
-    {
-        this._actionName = "please click on a menu item";
-    }
-
-    public String getActionName()
-    {
-        return _actionName;
-    }
-
-    public void processAction(ActionEvent event) throws AbortProcessingException
-    {   
-        UINavigationMenuItem comp = (UINavigationMenuItem) event.getComponent(); 
-        this._actionName = comp.getItemLabel() + " item was clicked";
-        
-    }
+/*
+ * Copyright 2006 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.myfaces.examples.fisheye;
+
+import java.io.Serializable;
+
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+
+import org.apache.myfaces.custom.navmenu.UINavigationMenuItem;
+
+/**
+ * Handler for the FishEye example
+ * 
+ * @author Jurgen Lust (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+public class FishEyeHandler implements Serializable
+{
+    private String _actionName;
+
+    public FishEyeHandler()
+    {
+        this._actionName = "please click on a menu item";
+    }
+
+    public String getActionName()
+    {
+        return _actionName;
+    }
+
+    public void processAction(ActionEvent event) throws AbortProcessingException
+    {   
+        UINavigationMenuItem comp = (UINavigationMenuItem) event.getComponent(); 
+        this._actionName = comp.getItemLabel() + " item was clicked";
+        
+    }
 }

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/form/FormBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/form/FormBean.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/form/FormBean.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/form/FormBean.java Tue Aug  1 10:43:28 2006
@@ -1,20 +1,20 @@
-package org.apache.myfaces.examples.form;
-
-/**
- * @author Martin Marinschek
- */
-public class FormBean
-{
-    public FormBean()
-    {
-        super();
-        System.out.println("Initialize formBean");
-    }
-
-    public String testAction()
-    {
-        System.out.println("test");
-        
-        return null;
-    }
-}
+package org.apache.myfaces.examples.form;
+
+/**
+ * @author Martin Marinschek
+ */
+public class FormBean
+{
+    public FormBean()
+    {
+        super();
+        System.out.println("Initialize formBean");
+    }
+
+    public String testAction()
+    {
+        System.out.println("test");
+        
+        return null;
+    }
+}

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/form/FormBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/Address.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/Address.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/Address.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/Address.java Tue Aug  1 10:43:28 2006
@@ -1,82 +1,82 @@
-package org.apache.myfaces.examples.inputSuggestAjax;
-
-import javax.faces.model.SelectItem;
-
-/**
- * @author Gerald Muellan
- *         Date: 12.02.2006
- *         Time: 23:30:40
- */
-public class Address
-{
-    private int _streetNumber;
-    private String _streetName;
-    private String _city;
-    private String _state;
-    private long _zip;
-
-
-    public Address(int streetNumber,
-                   String streetName,
-                   String city,
-                   long zip,String state)
-    {
-        _streetNumber = streetNumber;      
-        _streetName = streetName;
-        _city = city;
-        _state = state;
-        _zip = zip;
-    }
-
-
-
-    public int getStreetNumber()
-    {
-        return _streetNumber;
-    }
-
-    public void setStreetNumber(int streetNumber)
-    {
-        _streetNumber = streetNumber;
-    }
-
-    public String getStreetName()
-    {
-        return _streetName;
-    }
-
-    public void setStreetName(String streetName)
-    {
-        _streetName = streetName;
-    }
-
-    public String getCity()
-    {
-        return _city;
-    }
-
-    public void setCity(String city)
-    {
-        _city = city;
-    }
-
-    public String  getState()
-    {
-        return _state;
-    }
-
-    public void setState(String  state)
-    {
-        _state = state;
-    }
-
-    public long getZip()
-    {
-        return _zip;
-    }
-
-    public void setZip(long zip)
-    {
-        _zip = zip;
-    }
-}
+package org.apache.myfaces.examples.inputSuggestAjax;
+
+import javax.faces.model.SelectItem;
+
+/**
+ * @author Gerald Muellan
+ *         Date: 12.02.2006
+ *         Time: 23:30:40
+ */
+public class Address
+{
+    private int _streetNumber;
+    private String _streetName;
+    private String _city;
+    private String _state;
+    private long _zip;
+
+
+    public Address(int streetNumber,
+                   String streetName,
+                   String city,
+                   long zip,String state)
+    {
+        _streetNumber = streetNumber;      
+        _streetName = streetName;
+        _city = city;
+        _state = state;
+        _zip = zip;
+    }
+
+
+
+    public int getStreetNumber()
+    {
+        return _streetNumber;
+    }
+
+    public void setStreetNumber(int streetNumber)
+    {
+        _streetNumber = streetNumber;
+    }
+
+    public String getStreetName()
+    {
+        return _streetName;
+    }
+
+    public void setStreetName(String streetName)
+    {
+        _streetName = streetName;
+    }
+
+    public String getCity()
+    {
+        return _city;
+    }
+
+    public void setCity(String city)
+    {
+        _city = city;
+    }
+
+    public String  getState()
+    {
+        return _state;
+    }
+
+    public void setState(String  state)
+    {
+        _state = state;
+    }
+
+    public long getZip()
+    {
+        return _zip;
+    }
+
+    public void setZip(long zip)
+    {
+        _zip = zip;
+    }
+}

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/Address.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/City.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/InputSuggestAjaxBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/InputSuggestAjaxBean.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/InputSuggestAjaxBean.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/InputSuggestAjaxBean.java Tue Aug  1 10:43:28 2006
@@ -1,160 +1,160 @@
-/*
- * Copyright 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.myfaces.examples.inputSuggestAjax;
-
-import javax.faces.model.SelectItem;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * Backing bean for the input-suggest-ajax component
- *
- * @author Gerald Müllan (latest modification by $Author$)
- * @version $Revision$
- */
-public class InputSuggestAjaxBean
-{
-    private String suggestValue = null;
-    private static List cities = new ArrayList();
-    
-    static { 
-        cities.add(new City("San Antonio", "Texas", "TX", "78821"));
-        cities.add(new City("Sacramento", "California", "CA", "78880"));
-        cities.add(new City("Salinas", "California", "CA", "78881"));
-        cities.add(new City("San Bernardino", "California", "CA", "78882"));
-        cities.add(new City("San Clemente", "California", "CA", "78883"));
-        cities.add(new City("San Diego", "California", "CA", "78884"));
-        cities.add(new City("San Dimas", "California", "CA", "78885"));
-        cities.add(new City("San Fernando", "California", "CA", "78886"));
-        cities.add(new City("San Francisco", "California", "CA", "78887"));
-        cities.add(new City("San Gabriel", "California", "CA", "78888"));
-        cities.add(new City("San Jose", "California", "CA", "78889"));
-        cities.add(new City("San Marino", "California", "CA", "78890"));
-        cities.add(new City("San Mateo", "California", "CA", "78895"));
-        cities.add(new City("San Padre", "Texas", "TX", "78823"));
-        cities.add(new City("San Rafael", "California", "CA", "78845"));
-        cities.add(new City("Santa Ana", "California", "CA", "78811"));
-        cities.add(new City("Santa Monica", "California", "CA", "78345"));
-        cities.add(new City("Seal Beach", "California", "CA", "78526"));
-    }
-    
-    public List getCityList(String cityFragment)
-    {
-        List filteredCities = new ArrayList();
-        
-        Iterator it = cities.iterator();
-        while (it.hasNext()) 
-        {
-            City city = (City) it.next();
-            if (city.getCity().startsWith(cityFragment))
-            {
-                filteredCities.add(city);
-            }
-        }
-        System.out.println("returning cities: " + filteredCities.size());
-        return filteredCities;
-    }
-        
-
-    public List getAddressList(String cityFragment)
-    {
-        List addressList = new ArrayList();
-
-        addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
-        addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
-        addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
-        addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
-        addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
-        addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
-
-        return addressList;
-    }
-
-    public List getAddressList(String cityFragment, Integer maxSize)
-    {
-        List addressList = new ArrayList();
-
-        if (cityFragment.startsWith("as"))
-        {
-            addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
-            addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
-            addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
-            addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
-            addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
-            addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
-            addressList.add(new Address(11,"noname",cityFragment+"max",15,"KL"));
-            addressList.add(new Address(12,"max",cityFragment+"nomax",14,"SJ"));
-            addressList.add(new Address(13,"phil",cityFragment+"detroit",13,"NW"));
-            addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
-            addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
-            addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
-            addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
-            addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
-            addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
-            addressList.add(new Address(11,"noname",cityFragment+"max",15,"KL"));
-            addressList.add(new Address(12,"max",cityFragment+"nomax",14,"SJ"));
-            addressList.add(new Address(13,"phil",cityFragment+"detroit",13,"NW"));
-        }
-        else
-        {
-            addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
-            addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
-            addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
-            addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
-            addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
-            addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
-            addressList.add(new Address(11,"noname",cityFragment+"max",15,"KL"));
-            addressList.add(new Address(12,"max",cityFragment+"nomax",14,"SJ"));
-        }
-
-        return addressList;
-    }
-
-    public List getItems(String prefix)
-    {
-        List li = new ArrayList();
-        li.add(prefix+1);
-        li.add(prefix+2);
-        li.add(prefix+3);
-        li.add(prefix+4);
-        li.add(prefix+5);
-        li.add(prefix+6);
-        return li;
-    }
-
-    public List getItems(String prefix, Integer maxSize) {
-
-    	List li = new ArrayList();
-
-    	for(int i = 0; i < maxSize.intValue(); i++) {
-    		li.add(prefix+ " " +(i+1));
-    	}
-
-    	return li;
-    }
-
-    public String getSuggestValue()
-    {
-        return suggestValue;
-    }
-
-    public void setSuggestValue(String suggestValue)
-    {
-        this.suggestValue = suggestValue;
-    }
+/*
+ * Copyright 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.myfaces.examples.inputSuggestAjax;
+
+import javax.faces.model.SelectItem;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Backing bean for the input-suggest-ajax component
+ *
+ * @author Gerald Müllan (latest modification by $Author$)
+ * @version $Revision$
+ */
+public class InputSuggestAjaxBean
+{
+    private String suggestValue = null;
+    private static List cities = new ArrayList();
+    
+    static { 
+        cities.add(new City("San Antonio", "Texas", "TX", "78821"));
+        cities.add(new City("Sacramento", "California", "CA", "78880"));
+        cities.add(new City("Salinas", "California", "CA", "78881"));
+        cities.add(new City("San Bernardino", "California", "CA", "78882"));
+        cities.add(new City("San Clemente", "California", "CA", "78883"));
+        cities.add(new City("San Diego", "California", "CA", "78884"));
+        cities.add(new City("San Dimas", "California", "CA", "78885"));
+        cities.add(new City("San Fernando", "California", "CA", "78886"));
+        cities.add(new City("San Francisco", "California", "CA", "78887"));
+        cities.add(new City("San Gabriel", "California", "CA", "78888"));
+        cities.add(new City("San Jose", "California", "CA", "78889"));
+        cities.add(new City("San Marino", "California", "CA", "78890"));
+        cities.add(new City("San Mateo", "California", "CA", "78895"));
+        cities.add(new City("San Padre", "Texas", "TX", "78823"));
+        cities.add(new City("San Rafael", "California", "CA", "78845"));
+        cities.add(new City("Santa Ana", "California", "CA", "78811"));
+        cities.add(new City("Santa Monica", "California", "CA", "78345"));
+        cities.add(new City("Seal Beach", "California", "CA", "78526"));
+    }
+    
+    public List getCityList(String cityFragment)
+    {
+        List filteredCities = new ArrayList();
+        
+        Iterator it = cities.iterator();
+        while (it.hasNext()) 
+        {
+            City city = (City) it.next();
+            if (city.getCity().startsWith(cityFragment))
+            {
+                filteredCities.add(city);
+            }
+        }
+        System.out.println("returning cities: " + filteredCities.size());
+        return filteredCities;
+    }
+        
+
+    public List getAddressList(String cityFragment)
+    {
+        List addressList = new ArrayList();
+
+        addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
+        addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
+        addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
+        addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
+        addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
+        addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
+
+        return addressList;
+    }
+
+    public List getAddressList(String cityFragment, Integer maxSize)
+    {
+        List addressList = new ArrayList();
+
+        if (cityFragment.startsWith("as"))
+        {
+            addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
+            addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
+            addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
+            addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
+            addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
+            addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
+            addressList.add(new Address(11,"noname",cityFragment+"max",15,"KL"));
+            addressList.add(new Address(12,"max",cityFragment+"nomax",14,"SJ"));
+            addressList.add(new Address(13,"phil",cityFragment+"detroit",13,"NW"));
+            addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
+            addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
+            addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
+            addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
+            addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
+            addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
+            addressList.add(new Address(11,"noname",cityFragment+"max",15,"KL"));
+            addressList.add(new Address(12,"max",cityFragment+"nomax",14,"SJ"));
+            addressList.add(new Address(13,"phil",cityFragment+"detroit",13,"NW"));
+        }
+        else
+        {
+            addressList.add(new Address(11,"noname",cityFragment+"nocity",15,"KL"));
+            addressList.add(new Address(12,"max",cityFragment+"muster",14,"SJ"));
+            addressList.add(new Address(13,"phil",cityFragment+"philadelphia",13,"NW"));
+            addressList.add(new Address(14,"new",cityFragment+"new york",12,"IL"));
+            addressList.add(new Address(15,"san",cityFragment+"san francisco",11,"NY"));
+            addressList.add(new Address(16,"san",cityFragment+"san diego",16,"MH"));
+            addressList.add(new Address(11,"noname",cityFragment+"max",15,"KL"));
+            addressList.add(new Address(12,"max",cityFragment+"nomax",14,"SJ"));
+        }
+
+        return addressList;
+    }
+
+    public List getItems(String prefix)
+    {
+        List li = new ArrayList();
+        li.add(prefix+1);
+        li.add(prefix+2);
+        li.add(prefix+3);
+        li.add(prefix+4);
+        li.add(prefix+5);
+        li.add(prefix+6);
+        return li;
+    }
+
+    public List getItems(String prefix, Integer maxSize) {
+
+    	List li = new ArrayList();
+
+    	for(int i = 0; i < maxSize.intValue(); i++) {
+    		li.add(prefix+ " " +(i+1));
+    	}
+
+    	return li;
+    }
+
+    public String getSuggestValue()
+    {
+        return suggestValue;
+    }
+
+    public void setSuggestValue(String suggestValue)
+    {
+        this.suggestValue = suggestValue;
+    }
 }

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputSuggestAjax/InputSuggestAjaxBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/StateInfo.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/StateInfo.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/StateInfo.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/StateInfo.java Tue Aug  1 10:43:28 2006
@@ -1,53 +1,53 @@
-/*
- * 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.apache.myfaces.examples.inputsuggest;
-
-/**
- * This class is basically designed to simulate an application-specific bean that might exist in some
- * application.  The point here is to demonstrate how an application-specific bean such as this can
- * be integrated into inputSuggest.  The JSP page and the inputSuggest component know nothing about
- * StateInfo or {@link User}.  The {@link UserHandler} backing bean and the value binding expression in
- * the JSP help bridge this gap.
- *
- * @author Sean Schofield
- * @version $Revision: $ $Date: $
- */
-public class StateInfo {
-    private String key;
-    private String text;
-
-    public StateInfo(String key, String text) {
-        this.key = key;
-        this.text = text;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public void setKey(String key) {
-        this.key = key;
-    }
-
-    public String getText() {
-        return text;
-    }
-
-    public void setText(String text)
-    {
-        this.text = text;
-    }
-}
+/*
+ * 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.apache.myfaces.examples.inputsuggest;
+
+/**
+ * This class is basically designed to simulate an application-specific bean that might exist in some
+ * application.  The point here is to demonstrate how an application-specific bean such as this can
+ * be integrated into inputSuggest.  The JSP page and the inputSuggest component know nothing about
+ * StateInfo or {@link User}.  The {@link UserHandler} backing bean and the value binding expression in
+ * the JSP help bridge this gap.
+ *
+ * @author Sean Schofield
+ * @version $Revision: $ $Date: $
+ */
+public class StateInfo {
+    private String key;
+    private String text;
+
+    public StateInfo(String key, String text) {
+        this.key = key;
+        this.text = text;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text)
+    {
+        this.text = text;
+    }
+}

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/StateInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/User.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/User.java?rev=427657&r1=427656&r2=427657&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/User.java (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/User.java Tue Aug  1 10:43:28 2006
@@ -1,39 +1,39 @@
-/*
- * 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.apache.myfaces.examples.inputsuggest;
-
-/**
- * This class is basically designed to simulate an application-specific bean that might exist in some
- * application.  The point here is to demonstrate how an application-specific bean such as this can
- * be integrated into inputSuggest.  The JSP page and the inputSuggest component know nothing about
- * {@link StateInfo} or User.  The {@link UserHandler} backing bean and the value binding expression in
- * the JSP help bridge this gap.
- *
- * @author Sean Schofield
- * @version $Revision: $ $Date: $
- */
-public class User {
-
-    private StateInfo state = new StateInfo("", "");
-
-    public StateInfo getState() {
-        return state;
-    }
-
-    public void setState(StateInfo state) {
-        this.state = state;
-    }
-}
+/*
+ * 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.apache.myfaces.examples.inputsuggest;
+
+/**
+ * This class is basically designed to simulate an application-specific bean that might exist in some
+ * application.  The point here is to demonstrate how an application-specific bean such as this can
+ * be integrated into inputSuggest.  The JSP page and the inputSuggest component know nothing about
+ * {@link StateInfo} or User.  The {@link UserHandler} backing bean and the value binding expression in
+ * the JSP help bridge this gap.
+ *
+ * @author Sean Schofield
+ * @version $Revision: $ $Date: $
+ */
+public class User {
+
+    private StateInfo state = new StateInfo("", "");
+
+    public StateInfo getState() {
+        return state;
+    }
+
+    public void setState(StateInfo state) {
+        this.state = state;
+    }
+}

Propchange: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/inputsuggest/User.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message