You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2005/07/10 18:05:13 UTC
svn commit: r210021 - in /myfaces:
examples/trunk/standard/src/java/org/apache/myfaces/examples/ajaxInputSuggest/
forrest/trunk/build/ forrest/trunk/content/xdocs/components/
impl/trunk/src/java/org/apache/myfaces/renderkit/html/
sandbox/trunk/src/java...
Author: mmarinschek
Date: Sun Jul 10 09:05:11 2005
New Revision: 210021
URL: http://svn.apache.org/viewcvs?rev=210021&view=rev
Log:
working on AJAXInputSuggest, fixed Forrest-files
Modified:
myfaces/examples/trunk/standard/src/java/org/apache/myfaces/examples/ajaxInputSuggest/TestFilter.java
myfaces/forrest/trunk/build/forrest.properties
myfaces/forrest/trunk/content/xdocs/components/rssTicker.xml
myfaces/forrest/trunk/content/xdocs/components/uiSaveState.xml
myfaces/forrest/trunk/content/xdocs/components/validateCreditCard.xml
myfaces/forrest/trunk/content/xdocs/components/validateEmail.xml
myfaces/forrest/trunk/content/xdocs/components/validateEqual.xml
myfaces/forrest/trunk/content/xdocs/components/validateRegExpr.xml
myfaces/impl/trunk/src/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js
myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/prototype.js
Modified: myfaces/examples/trunk/standard/src/java/org/apache/myfaces/examples/ajaxInputSuggest/TestFilter.java
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/standard/src/java/org/apache/myfaces/examples/ajaxInputSuggest/TestFilter.java?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/examples/trunk/standard/src/java/org/apache/myfaces/examples/ajaxInputSuggest/TestFilter.java (original)
+++ myfaces/examples/trunk/standard/src/java/org/apache/myfaces/examples/ajaxInputSuggest/TestFilter.java Sun Jul 10 09:05:11 2005
@@ -1,7 +1,9 @@
package org.apache.myfaces.examples.ajaxInputSuggest;
import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
+import java.io.BufferedReader;
/**
* Created by IntelliJ IDEA.
@@ -19,6 +21,18 @@
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
{
+ HttpServletRequest request = (HttpServletRequest) servletRequest;
+
+ if(request.getParameter("_")!=null)
+ {
+ BufferedReader reader = request.getReader();
+
+ String s;
+
+ while((s=reader.readLine())!=null)
+ System.out.println(s);
+ }
+
filterChain.doFilter(servletRequest, servletResponse);
}
Modified: myfaces/forrest/trunk/build/forrest.properties
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/build/forrest.properties?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/build/forrest.properties (original)
+++ myfaces/forrest/trunk/build/forrest.properties Sun Jul 10 09:05:11 2005
@@ -9,6 +9,6 @@
project.name=myfaces
# Specifies name of Forrest skin to use
-project.skin=forrest-site
+project.skin=pelt
#project.skin=forrest-css
#project.skin=avalon-tigris
Modified: myfaces/forrest/trunk/content/xdocs/components/rssTicker.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/components/rssTicker.xml?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/components/rssTicker.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/components/rssTicker.xml Sun Jul 10 09:05:11 2005
@@ -5,15 +5,14 @@
<!-- component name -->
<header>
<title>RSS Ticker</title>
- <subtitle><x:rssTicker></subtitle>
+ <subtitle><x:rssTicker></subtitle>
</header>
<body>
<!-- Description -->
<section>
<title>Description</title>
<p>
- A component, that displays the topics of a desired RDF-Newsfeed.
- Extends standard commandButton by user role support.
+ A component displaying the topics of a desired RDF-Newsfeed.
</p>
</section>
<!-- screen shot -->
@@ -31,7 +30,7 @@
</tr>
<tr>
<td>author</td>
- <td>Matthias Weßendorf</td>
+ <td>Matthias Wessendorf</td>
</tr>
<tr>
<td>component-family</td>
@@ -68,7 +67,7 @@
<title>Instructions</title>
<p>
Enter the url of a rss-source into attribute rssUrl.
- rssUrl - URL on whichs the rss-information are available.
+ rssUrl - URL on which the rss-information is available.
</p>
</section>
</body>
Modified: myfaces/forrest/trunk/content/xdocs/components/uiSaveState.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/components/uiSaveState.xml?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/components/uiSaveState.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/components/uiSaveState.xml Sun Jul 10 09:05:11 2005
@@ -10,6 +10,7 @@
<body>
<section>
+ <title>Description</title>
<p>
Traditional JSP Applications save their state information within
HttpSession objects. This is an easy to use but not always satisfying approach:
@@ -35,9 +36,6 @@
cluster environments which are expensive and difficult to handle.
</li>
</ul>
- </section>
-
- <section>
<p>
MyFaces supports a different approach. It makes it possible to write
sophisticated applications without any use of the HttpSession. All
Modified: myfaces/forrest/trunk/content/xdocs/components/validateCreditCard.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/components/validateCreditCard.xml?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/components/validateCreditCard.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/components/validateCreditCard.xml Sun Jul 10 09:05:11 2005
@@ -11,7 +11,7 @@
<!-- ex. JSCook Menu -->
<title>Validate a CreditCard</title>
<!-- ex. <x:jsCookMenu> -->
- <subtitle><x:validateCreditCard/></subtitle>
+ <subtitle><x:validateCreditCard/></subtitle>
</header>
<body>
<!-- Description -->
@@ -49,7 +49,7 @@
</tr>
<tr>
<td>author</td>
- <td>Matthias Weßendorf</td>
+ <td>Matthias Wessendorf</td>
</tr>
<tr>
<td>validatorId</td>
Modified: myfaces/forrest/trunk/content/xdocs/components/validateEmail.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/components/validateEmail.xml?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/components/validateEmail.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/components/validateEmail.xml Sun Jul 10 09:05:11 2005
@@ -11,7 +11,7 @@
<!-- ex. JSCook Menu -->
<title>Validate email addresses</title>
<!-- ex. <x:jsCookMenu> -->
- <subtitle><x:validateEmail/></subtitle>
+ <subtitle><x:validateEmail/></subtitle>
</header>
<body>
<!-- Description -->
@@ -33,7 +33,7 @@
</tr>
<tr>
<td>author</td>
- <td>Matthias Weßendorf</td>
+ <td>Matthias Wessendorf</td>
</tr>
<tr>
<td>validatorId</td>
Modified: myfaces/forrest/trunk/content/xdocs/components/validateEqual.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/components/validateEqual.xml?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/components/validateEqual.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/components/validateEqual.xml Sun Jul 10 09:05:11 2005
@@ -11,7 +11,7 @@
<!-- ex. JSCook Menu -->
<title>Validate equal inputs</title>
<!-- ex. <x:jsCookMenu> -->
- <subtitle><x:validateEqual/></subtitle>
+ <subtitle><x:validateEqual/></subtitle>
</header>
<body>
<!-- Description -->
@@ -33,7 +33,7 @@
</tr>
<tr>
<td>author</td>
- <td>Matthias Weßendorf</td>
+ <td>Matthias Wessendorf</td>
</tr>
<tr>
<td>validatorId</td>
Modified: myfaces/forrest/trunk/content/xdocs/components/validateRegExpr.xml
URL: http://svn.apache.org/viewcvs/myfaces/forrest/trunk/content/xdocs/components/validateRegExpr.xml?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/forrest/trunk/content/xdocs/components/validateRegExpr.xml (original)
+++ myfaces/forrest/trunk/content/xdocs/components/validateRegExpr.xml Sun Jul 10 09:05:11 2005
@@ -11,7 +11,7 @@
<!-- ex. JSCook Menu -->
<title>Validate regular expressions</title>
<!-- ex. <x:jsCookMenu> -->
- <subtitle><x:validateRegExpr/></subtitle>
+ <subtitle><x:validateRegExpr/></subtitle>
</header>
<body>
<!-- Description -->
@@ -33,7 +33,7 @@
</tr>
<tr>
<td>author</td>
- <td>Matthias Weßendorf</td>
+ <td>Matthias Wessendorf</td>
</tr>
<tr>
<td>validatorId</td>
Modified: myfaces/impl/trunk/src/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/src/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/impl/trunk/src/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java (original)
+++ myfaces/impl/trunk/src/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java Sun Jul 10 09:05:11 2005
@@ -62,6 +62,7 @@
responseWriter.startElement(HTML.INPUT_ELEM, null);
responseWriter.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
responseWriter.writeAttribute(HTML.NAME_ATTR, TREE_PARAM, null);
+ responseWriter.writeAttribute(HTML.ID_ATTR, TREE_PARAM, null);
responseWriter.writeAttribute(HTML.VALUE_ATTR, treeStruct, null);
responseWriter.endElement(HTML.INPUT_ELEM);
}
@@ -70,6 +71,7 @@
responseWriter.startElement(HTML.INPUT_ELEM, null);
responseWriter.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
responseWriter.writeAttribute(HTML.NAME_ATTR, BASE64_TREE_PARAM, null);
+ responseWriter.writeAttribute(HTML.ID_ATTR, BASE64_TREE_PARAM, null);
responseWriter.writeAttribute(HTML.VALUE_ATTR, encode64(treeStruct), null);
responseWriter.endElement(HTML.INPUT_ELEM);
}
@@ -86,6 +88,7 @@
responseWriter.startElement(HTML.INPUT_ELEM, null);
responseWriter.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
responseWriter.writeAttribute(HTML.NAME_ATTR, STATE_PARAM, null);
+ responseWriter.writeAttribute(HTML.ID_ATTR, STATE_PARAM, null);
responseWriter.writeAttribute(HTML.VALUE_ATTR, compStates, null);
responseWriter.endElement(HTML.INPUT_ELEM);
}
@@ -94,6 +97,7 @@
responseWriter.startElement(HTML.INPUT_ELEM, null);
responseWriter.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
responseWriter.writeAttribute(HTML.NAME_ATTR, BASE64_STATE_PARAM, null);
+ responseWriter.writeAttribute(HTML.ID_ATTR, BASE64_STATE_PARAM, null);
responseWriter.writeAttribute(HTML.VALUE_ATTR, encode64(compStates), null);
responseWriter.endElement(HTML.INPUT_ELEM);
}
@@ -106,6 +110,7 @@
responseWriter.startElement(HTML.INPUT_ELEM, null);
responseWriter.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
responseWriter.writeAttribute(HTML.NAME_ATTR, VIEWID_PARAM, null);
+ responseWriter.writeAttribute(HTML.ID_ATTR, VIEWID_PARAM, null);
responseWriter.writeAttribute(HTML.VALUE_ATTR, facescontext.getViewRoot().getViewId(), null);
responseWriter.endElement(HTML.INPUT_ELEM);
}
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/AjaxInputSuggestRenderer.java Sun Jul 10 09:05:11 2005
@@ -116,7 +116,11 @@
out.writeText(component.getClientId(context)+"_auto_complete",null);
out.writeText("','",null);
out.writeText("/demos/ajax/auto_suggest",null);
- out.writeText("', {})",null);
+ out.writeText("', {\n" +
+ " method: 'post',\n" +
+ " asynchronous: true,\n" +
+ " parameters: 'jsf_tree_64='+/*document.getElementById('jsf_tree_64').value+*/'&jsf_state_64='/*+document.getElementById('jsf_state_64').value*/" +
+ " })",null);
out.endElement(HTML.SCRIPT_ELEM);
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/controls.js Sun Jul 10 09:05:11 2005
@@ -116,7 +116,13 @@
this.changed = false;
if(this.element.value.length>=this.options.min_chars) {
this.startIndicator();
- this.options.parameters = this.options.callback ?
+
+ if(this.options.parameters && this.options.parameters.length>0){
+ this.options.parameters += '&';
+ } else {
+ this.options.parameters = '';
+ }
+ this.options.parameters += this.options.callback ?
this.options.callback(this.element, Form.Element.getValue(this.element)) :
Form.Element.serialize(this.element);
new Ajax.Request(this.url, this.options);
Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/prototype.js
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/prototype.js?rev=210021&r1=210020&r2=210021&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/prototype.js (original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/ajaxsuggest/resource/prototype.js Sun Jul 10 09:05:11 2005
@@ -216,6 +216,7 @@
if (this.options.method == 'get')
url += '?' + parameters;
+
this.transport.open(this.options.method, url,
this.options.asynchronous);