You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/02/04 22:52:21 UTC
svn commit: r374936 [10/14] - in /incubator/tobago/trunk: tobago-core/
tobago-core/src/main/java/org/apache/myfaces/tobago/
tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/api/
tobago-core/src/main/java/org/apache/myfaces/tobago/application/ t...
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/LogoutActionListener.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created 25.10.2004 17:57:53.
* $Id$
*/
-package org.apache.myfaces.tobago.webapp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -41,7 +43,7 @@
Object session = externalContext.getSession(false);
if (session != null) {
if (session instanceof HttpSession) {
- ((HttpSession)session).invalidate();
+ ((HttpSession) session).invalidate();
}
// TODO: PortletRequest ??
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataFilter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,20 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
-/*
- * Created 30.01.2003 17:00:56.
- * $Id$
- */
-package org.apache.myfaces.tobago.webapp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -34,17 +31,9 @@
public class TobagoMultipartFormdataFilter implements Filter {
-// ///////////////////////////////////////////// constant
-
private static final Log LOG
= LogFactory.getLog(TobagoMultipartFormdataFilter.class);
-// ///////////////////////////////////////////// attribute
-
-// ///////////////////////////////////////////// constructor
-
-// ///////////////////////////////////////////// code
-
public void init(FilterConfig filterConfig) throws ServletException {
}
@@ -59,12 +48,12 @@
wrapper = request;
} else {
String contentType = request.getContentType();
- if (contentType != null &&
- contentType.toLowerCase().startsWith("multipart/form-data")) {
+ if (contentType != null
+ && contentType.toLowerCase().startsWith("multipart/form-data")) {
if (LOG.isDebugEnabled()) {
LOG.debug("Wrapping " + request.getClass().getName()
- + " with ContentType=\"" + contentType + "\" " +
- "into TobagoMultipartFormdataRequest");
+ + " with ContentType=\"" + contentType + "\" "
+ + "into TobagoMultipartFormdataRequest");
}
wrapper = new TobagoMultipartFormdataRequest(
(HttpServletRequest) request);
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoMultipartFormdataRequest.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,20 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
- */
-/*
- * Created 30.01.2003 17:00:56.
- * $Id$
+ *
+ * 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.tobago.webapp;
import org.apache.commons.fileupload.DiskFileUpload;
import org.apache.commons.fileupload.FileItem;
@@ -39,24 +36,18 @@
public class TobagoMultipartFormdataRequest extends HttpServletRequestWrapper {
-// ///////////////////////////////////////////// constant
-
private static final Log LOG
= LogFactory.getLog(TobagoMultipartFormdataRequest.class);
-// ///////////////////////////////////////////// attribute
-
private Map parameters;
private Map fileItems;
-// ///////////////////////////////////////////// constructor
-
TobagoMultipartFormdataRequest(HttpServletRequest request) {
super(request);
String contentType = request.getContentType();
- if (contentType == null ||
- !contentType.toLowerCase().startsWith("multipart/form-data")) {
+ if (contentType == null
+ || !contentType.toLowerCase().startsWith("multipart/form-data")) {
String errorText = "contentType is not multipart/form-data but '"
+ contentType + "'";
LOG.error(errorText);
@@ -131,17 +122,12 @@
}
}
-// ////////////////////////////////////////////// code
-
public FileItem getFileItem(String key) {
if (fileItems != null) {
return (FileItem) fileItems.get(key);
}
return null;
}
-
-// ////////////////////////////////////////////// overwriten
-
public String getParameter(String key) {
String parameter = null;
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponse.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponse.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponse.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponse.java Sat Feb 4 13:47:46 2006
@@ -1,19 +1,20 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.tobago.webapp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -45,7 +46,7 @@
public void setBuffering() {
if (bufferedWriter == null) {
bufferedWriter = new StringWriter();
- printWriter = new PrintWriter(bufferedWriter) ;
+ printWriter = new PrintWriter(bufferedWriter);
}
}
public String getBufferedString() {
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,20 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
- */
-/*
- * Created 07.01.2004 10:34:32.
- * $Id$
+ *
+ * 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.tobago.webapp;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
@@ -38,8 +35,6 @@
public class TobagoResponseWriter extends ResponseWriter {
-// ///////////////////////////////////////////// constant
-
private static final Log LOG = LogFactory.getLog(TobagoResponseWriter.class);
private static final Set<String> EMPTY_TAG
@@ -50,8 +45,6 @@
"meta"}));
-// ///////////////////////////////////////////// attribute
-
private Writer writer;
private UIComponent component;
@@ -72,9 +65,6 @@
private HtmlWriterUtil attributeWriter;
private HtmlWriterUtil textWriter;
-
-// ///////////////////////////////////////////// constructor
-
public TobagoResponseWriter(final Writer writer, final String contentType,
final String characterEncoding) {
// LOG.info("new TobagoResponseWriter!");
@@ -95,8 +85,6 @@
textWriter = new HtmlWriterUtil(this, characterEncoding, false);
}
-// ///////////////////////////////////////////// code
-
private String findValue(final Object value, final String property) {
if (value != null) {
return value instanceof String ? (String) value : value.toString();
@@ -110,9 +98,8 @@
}
} else {
final String trace = getCallingClassStackTraceElementString();
- LOG.error(
- "Don't know what to do! " +
- "Property defined, but no component to get a value. "
+ LOG.error("Don't know what to do! "
+ + "Property defined, but no component to get a value. "
+ trace.substring(trace.indexOf('(')));
LOG.error("value = '" + value + "'");
LOG.error("property = '" + property + "'");
@@ -120,9 +107,8 @@
}
} else {
final String trace = getCallingClassStackTraceElementString();
- LOG.error(
- "Don't know what to do! " +
- "No value and no property defined. "
+ LOG.error("Don't know what to do! "
+ + "No value and no property defined. "
+ trace.substring(trace.indexOf('(')));
LOG.error("value = '" + value + "'");
LOG.error("property = '" + property + "'");
@@ -130,7 +116,7 @@
}
}
- public void write(final char cbuf[], final int off, final int len)
+ public void write(final char[] cbuf, final int off, final int len)
throws IOException {
writer.write(cbuf, off, len);
}
@@ -169,7 +155,7 @@
}
}
- public void writeText(final char text[], final int offset, final int length)
+ public void writeText(final char[] text, final int offset, final int length)
throws IOException {
if (startStillOpen) {
writer.write("\n>");
@@ -207,9 +193,9 @@
public void startElement(final String name) throws IOException {
startElement(name, null);
}
- public void startElement(final String name, final UIComponent component)
+ public void startElement(final String name, final UIComponent currentComponent)
throws IOException {
- this.component = component;
+ this.component = currentComponent;
stack.push(name);
// closeStartIfNecessary();
insideScriptOrStyle = isScriptOrStyle(name);
@@ -231,7 +217,7 @@
switch (name.charAt(1)) {
case 'c' :
if (name.charAt(2) == 'r' && name.charAt(3) == 'i'
- && name.charAt(4) == 'p' && name.charAt(5) == 't' ) {
+ && name.charAt(4) == 'p' && name.charAt(5) == 't') {
return true;
}
break;
@@ -241,10 +227,16 @@
return true;
}
break;
+ default:
+ return false;
}
break;
+ default:
+ return false;
}
- } catch (Exception e) { /* ignore */ }
+ } catch (Exception e) {
+ /* ignore */
+ }
return false;
}
@@ -256,8 +248,7 @@
final String top = stack.pop();
if (!top.equals(name)) {
final String trace = getCallingClassStackTraceElementString();
- LOG.error(
- "Element end with name='" + name + "' doesn't "
+ LOG.error("Element end with name='" + name + "' doesn't "
+ "match with top element on the stack='" + top + "' "
+ trace.substring(trace.indexOf('(')));
}
@@ -301,9 +292,9 @@
write("-->");
}
- public ResponseWriter cloneWithWriter(final Writer writer) {
+ public ResponseWriter cloneWithWriter(final Writer originalWriter) {
return new TobagoResponseWriter(
- writer, getContentType(), getCharacterEncoding());
+ originalWriter, getContentType(), getCharacterEncoding());
}
public void writeAttribute(final String name, final boolean on) throws IOException {
@@ -420,7 +411,5 @@
throws IOException {
LOG.error("Not implemented yet!"); // FIXME jsfbeta
}
-
-// ///////////////////////////////////////////// bean getter + setter
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoServletContextListener.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,20 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
- */
-/*
- * Created Nov 13, 2002 at 8:43:20 AM.
- * $Id$
+ *
+ * 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.tobago.webapp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -33,13 +30,9 @@
public class TobagoServletContextListener implements ServletContextListener {
-// ///////////////////////////////////////////// constants
-
private static final Log LOG
= LogFactory.getLog(TobagoServletContextListener.class);
-// ///////////////////////////////////////////// code
-
public void contextInitialized(ServletContextEvent event) {
if (LOG.isInfoEnabled()) {
@@ -68,8 +61,8 @@
} catch (Throwable e) {
if (LOG.isFatalEnabled()) {
- String error = "Error while deploy process. Tobago can't be initialized! " +
- "Application will not run!";
+ String error = "Error while deploy process. Tobago can't be initialized! "
+ + "Application will not run!";
LOG.fatal(error, e);
throw new RuntimeException(error, e);
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/WeblogicWorkaroundServlet.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/WeblogicWorkaroundServlet.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/WeblogicWorkaroundServlet.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/WeblogicWorkaroundServlet.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,20 @@
+package org.apache.myfaces.tobago.webapp;
+
/*
* Copyright 2002-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.
- */
-/*
- * Created 13.07.2004 12:34:10.
- * $Id$
+ *
+ * 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.tobago.webapp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -38,12 +35,9 @@
*/
public class WeblogicWorkaroundServlet extends HttpServlet {
-// ------------------------------------------------------------------ constants
private static final Log LOG
= LogFactory.getLog(WeblogicWorkaroundServlet.class);
-
-// ----------------------------------------------------------- business methods
public void init() throws ServletException {
if (LOG.isDebugEnabled()) {
Modified: incubator/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKeyUnitTest.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKeyUnitTest.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKeyUnitTest.java (original)
+++ incubator/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/renderkit/LabelWithAccessKeyUnitTest.java Sat Feb 4 13:47:46 2006
@@ -32,7 +32,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(-1, label.getPos());
- assertEquals(null, label.getAccessKey());
+ assertEquals(null, label.getAccessKey1());
}
// code-sniplet-start id="test1"
@@ -43,7 +43,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(0, label.getPos());
- assertEquals(new Character('s'), label.getAccessKey());
+ assertEquals(new Character('s'), label.getAccessKey1());
}
// code-sniplet-end id="test1"
@@ -54,7 +54,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(3, label.getPos());
- assertEquals(new Character('E'), label.getAccessKey());
+ assertEquals(new Character('E'), label.getAccessKey1());
}
public void testAmpersand() {
@@ -63,7 +63,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(0, label.getPos());
- assertEquals(new Character('S'), label.getAccessKey());
+ assertEquals(new Character('S'), label.getAccessKey1());
}
public void testAmpersandAtEnd() {
@@ -72,7 +72,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(-1, label.getPos());
- assertEquals(null, label.getAccessKey());
+ assertEquals(null, label.getAccessKey1());
}
public void testAmpersandNo() {
@@ -81,7 +81,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(-1, label.getPos());
- assertEquals(null, label.getAccessKey());
+ assertEquals(null, label.getAccessKey1());
}
public void testMixed() {
@@ -92,7 +92,7 @@
LabelWithAccessKey label = new LabelWithAccessKey(component);
assertEquals("Save", label.getText());
assertEquals(2, label.getPos());
- assertEquals(new Character('v'), label.getAccessKey());
+ assertEquals(new Character('v'), label.getAccessKey1());
}
}
Modified: incubator/tobago/trunk/tobago-example/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/pom.xml?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/pom.xml (original)
+++ incubator/tobago/trunk/tobago-example/pom.xml Sat Feb 4 13:47:46 2006
@@ -1,5 +1,24 @@
-<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">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Copyright 2002-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.
+-->
+
+<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>
<parent>
<groupId>org.apache.myfaces.tobago</groupId>
@@ -10,6 +29,26 @@
<name>Tobago Examples</name>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>tobago-example</artifactId>
+ <reporting>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jxr-maven-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>org/apache/myfaces/tobago/checkstyle.xml</configLocation>
+ <xrefLocation>xref</xrefLocation>
+ <excludes>**/package-info.java</excludes>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </reporting>
<modules>
<module>tobago-example-addressbook</module>
<module>tobago-example-blank</module>
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Address.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Address.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Address.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Address.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,26 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 29.11.2004 17:25:39.
* $Id: Address.java,v 1.1.1.1 2004/12/15 12:51:35 lofwyr Exp $
*/
-package org.apache.myfaces.tobago.example.addressbook;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressConverter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressConverter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressConverter.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressConverter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 03.12.2004 00:08:01.
* $Id: AddressConverter.java,v 1.1.1.1 2004/12/15 12:51:35 lofwyr Exp $
*/
-package org.apache.myfaces.tobago.example.addressbook;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAO.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAO.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAO.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAO.java Sat Feb 4 13:47:46 2006
@@ -1,22 +1,25 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 29.11.2004 17:36:20.
* $Id: Controller.java,v 1.2 2005/08/10 11:57:55 lofwyr Exp $
- */package org.apache.myfaces.tobago.example.addressbook;
+ */
import java.util.List;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAOException.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAOException.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAOException.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/AddressDAOException.java Sat Feb 4 13:47:46 2006
@@ -1,5 +1,21 @@
package org.apache.myfaces.tobago.example.addressbook;
+/*
+ * Copyright 2002-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.
+ */
+
public class AddressDAOException extends Exception {
public AddressDAOException() {
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Controller.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Controller.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Controller.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Controller.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 29.11.2004 17:36:20.
* $Id: Controller.java,v 1.2 2005/08/10 11:57:55 lofwyr Exp $
*/
-package org.apache.myfaces.tobago.example.addressbook;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.logging.Log;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Countries.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Countries.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Countries.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/Countries.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 02.12.2004 21:42:13.
* $Id: Countries.java,v 1.1.1.1 2004/12/15 12:51:35 lofwyr Exp $
*/
-package org.apache.myfaces.tobago.example.addressbook;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/EmailAddress.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/EmailAddress.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/EmailAddress.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/EmailAddress.java Sat Feb 4 13:47:46 2006
@@ -1,19 +1,20 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.tobago.example.addressbook;
public class EmailAddress {
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDAO.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDAO.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDAO.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/InMemoryAddressDAO.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 29.11.2004 17:36:20.
* $Id: Controller.java,v 1.2 2005/08/10 11:57:55 lofwyr Exp $
*/
-package org.apache.myfaces.tobago.example.addressbook;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/XStreamAddressDAO.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/XStreamAddressDAO.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/XStreamAddressDAO.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/java/org/apache/myfaces/tobago/example/addressbook/XStreamAddressDAO.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.addressbook;
+
/*
* Copyright 2002-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
+ * 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
+ * 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.
+ * 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.
*/
+
/*
* Created 29.11.2004 17:36:20.
* $Id: Controller.java,v 1.2 2005/08/10 11:57:55 lofwyr Exp $
*/
-package org.apache.myfaces.tobago.example.addressbook;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
@@ -86,7 +88,7 @@
return new ArrayList<Address>();
}
fr = new FileReader(storageFileName);
- return (List<Address>)xstream.fromXML(fr);
+ return (List<Address>) xstream.fromXML(fr);
} catch(Exception e) {
throw new AddressDAOException("error loading addresses", e);
} finally{
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java Sat Feb 4 13:47:46 2006
@@ -1,22 +1,24 @@
+package org.apache.myfaces.tobago.example.demo;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* $Id: TobagoDemoController.java 1270 2005-08-08 20:21:38 +0200 (Mo, 08 Aug 2005) lofwyr $
*/
-package org.apache.myfaces.tobago.example.demo;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -45,12 +47,8 @@
public class TobagoDemoController {
-// ///////////////////////////////////////////// constant
-
private static final Log LOG = LogFactory.getLog(TobagoDemoController.class);
-// ///////////////////////////////////////////// attribute
-
private String[] salutation;
private SelectItem[] salutationItems;
@@ -109,7 +107,6 @@
private SelectItem[] toolbarTextItems;
-// ///////////////////////////////////////////// constructor
public TobagoDemoController() {
@@ -121,7 +118,7 @@
};
salutationItems = getSelectItems(salutationKeys, "demo");
- this.salutation = new String[]{"" ,"" ,"" ,""};
+ this.salutation = new String[]{"", "", "", ""};
bool = new Boolean[10];
bool[0] = true;
@@ -149,11 +146,10 @@
text[9] = "longer Text abcdefg hijklmnop";
text[10]
= "**strong text**\n\n__emphasis__\n\nnormaler text\n\n__dieses "
- +
- "ist emphasis__\n\n**und nochmal strong**\n\n**__ strong und emphasis__**";
+ + "ist emphasis__\n\n**und nochmal strong**\n\n**__ strong und emphasis__**";
solarArray = SolarObject.getArray();
solarArrayColumns = createSolarArrayColumns();
- solarArrayColumnLayout = "3*;3*;3*";
+ solarArrayColumnLayout = "3*; 3*; 3*";
tree = new DefaultMutableTreeNode(
new Node("Root Node", "root"));
@@ -183,7 +179,10 @@
selectionItems = getSelectItems(values, "demo");
selectionType = (String) selectionItems[0].getValue();
- showIcons = showJunctions = showRoot = showRootJunction = true;
+ showIcons = true;
+ showJunctions = true;
+ showRoot = true;
+ showRootJunction = true;
solar = new Solar();
@@ -230,8 +229,6 @@
return items;
}
-// ///////////////////////////////////////////// code
-
public void updateTree() {
}
@@ -240,15 +237,11 @@
return new Node(name, id);
}
-// /////////////////////////////////////////////// action for links and buttons
-
public String clickButton() {
LOG.info("clickButton");
return "display";
}
-// ///////////////////////////////////////////// bean getter + setter
-
public String getSelectable() {
return multiselect ? "multi" : "none";
}
@@ -499,10 +492,6 @@
public void setNull(Object o) {
}
-
-// /////////////////////////////////////////////////////////////////////////
-// /////////////////////////////////////////////////////////////////////////
-// /////////////////////////////////////////////////////////////////////////
public static class Node {
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/SimpleTabChangeListener.java Sat Feb 4 13:47:46 2006
@@ -1,19 +1,20 @@
+package org.apache.myfaces.tobago.example.demo.actionlistener;
+
/*
* Copyright 2002-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.
+ *
+ * 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.tobago.example.demo.actionlistener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/TreeEditor.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/TreeEditor.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/TreeEditor.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/actionlistener/TreeEditor.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.actionlistener;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created 27.05.2003 13:37:22.
* $Id: TreeEditor.java 1270 2005-08-08 20:21:38 +0200 (Mo, 08 Aug 2005) lofwyr $
*/
-package org.apache.myfaces.tobago.example.demo.actionlistener;
import org.apache.myfaces.tobago.context.ResourceManagerUtil;
import org.apache.myfaces.tobago.event.DefaultTreeActionListener;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigController.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.clientConfig;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created 21.08.2002 at 18:00:22.
* $Id: ClientConfigController.java 1271 2005-08-08 20:44:11 +0200 (Mo, 08 Aug 2005) lofwyr $
*/
-package org.apache.myfaces.tobago.example.demo.clientConfig;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ClientConfigPhaseListener.java Sat Feb 4 13:47:46 2006
@@ -1,19 +1,20 @@
+package org.apache.myfaces.tobago.example.demo.clientConfig;
+
/*
* Copyright 2002-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.
+ *
+ * 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.tobago.example.demo.clientConfig;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
@@ -27,7 +28,7 @@
*/
public class ClientConfigPhaseListener implements PhaseListener {
- public static String[] BEAN_NAMES
+ public static final String[] BEAN_NAMES
= {"clientConfigController", "clientConfigController2"};
public void afterPhase(PhaseEvent event) {
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/clientConfig/ThemeConfigViewController.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.clientConfig;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created 13.07.2004 at 10:48:28.
* $Id: ThemeConfigViewController.java 1271 2005-08-08 20:44:11 +0200 (Mo, 08 Aug 2005) lofwyr $
*/
-package org.apache.myfaces.tobago.example.demo.clientConfig;
import org.apache.commons.collections.KeyValue;
import org.apache.commons.collections.keyvalue.DefaultKeyValue;
@@ -46,7 +48,6 @@
public class ThemeConfigViewController {
-// ///////////////////////////////////////////// constant
private static final Log LOG = LogFactory.getLog(ThemeConfigViewController.class);
@@ -105,8 +106,6 @@
"Verbatim"
};
-// ///////////////////////////////////////////// attribute
-
private String[] propertyNames;
private KeyValue[] entrys;
@@ -121,15 +120,11 @@
private UIComponent component;
-// ///////////////////////////////////////////// constructor
-
public ThemeConfigViewController() {
component = new UIInput();
init();
}
-// ///////////////////////////////////////////// code
-
private void init() {
String[] themes;
if (themeNames != null) {
@@ -139,7 +134,7 @@
}
final Set<String> names = new HashSet<String>();
- for (int j = 0; j < DEFAULT_THEMES.length ; j++) {
+ for (int j = 0; j < DEFAULT_THEMES.length; j++) {
Properties properties = new Properties();
String file = PROPERTY_FILE_PREFIX + themes[j] + PROPERTY_FILE_POSTFIX;
InputStream inputStream = null;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/AbstractConverter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created on: 02.09.2002, 23:33:19
* $Id: AbstractConverter.java,v 1.1.1.1 2004/04/15 18:41:00 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -31,22 +33,30 @@
public abstract class AbstractConverter implements Converter {
- private static final Log log = LogFactory.getLog(AbstractConverter.class);
+ private static final Log LOG = LogFactory.getLog(AbstractConverter.class);
private Pattern pattern;
- protected Perl5Matcher matcher = new Perl5Matcher();
- protected Perl5Compiler compiler = new Perl5Compiler();
- protected Perl5Util util = new Perl5Util();
+ private Perl5Matcher matcher = new Perl5Matcher();
+ private Perl5Compiler compiler = new Perl5Compiler();
+ private Perl5Util util = new Perl5Util();
public abstract Pattern initPattern() throws MalformedPatternException;
+ public Perl5Compiler getCompiler() {
+ return compiler;
+ }
+
+ public Perl5Util getUtil() {
+ return util;
+ }
+
public Pattern getPattern() {
if (pattern == null) {
try {
pattern = initPattern();
} catch (MalformedPatternException e) {
- log.error("", e);
+ LOG.error("", e);
}
}
return pattern;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/Converter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/Converter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/Converter.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/Converter.java Sat Feb 4 13:47:46 2006
@@ -1,29 +1,32 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created on: 02.09.2002, 23:26:31
* $Id: Converter.java,v 1.1.1.1 2004/04/15 18:41:00 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
public interface Converter {
- public String convertMisc(String fragment);
- public String convertMatch(String fragment);
+ String convertMisc(String fragment);
+
+ String convertMatch(String fragment);
- public String convert(String fragment);
+ String convert(String fragment);
}
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspFormatter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created on: 02.09.2002, 22:11:52
* $Id: JspFormatter.java,v 1.1.1.1 2004/04/15 18:41:00 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
import javax.servlet.jsp.JspWriter;
import java.io.FileNotFoundException;
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/JspTagConverter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created on: 02.09.2002, 23:37:54
* $Id: JspTagConverter.java,v 1.1.1.1 2004/04/15 18:41:00 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -30,28 +32,28 @@
public class JspTagConverter extends AbstractConverter {
- private static final Log log = LogFactory.getLog(JspTagConverter.class);
+ private static final Log LOG = LogFactory.getLog(JspTagConverter.class);
private TagConverter tagConverter = new TagConverter();
- private Map<String,String> tags = new HashMap<String, String>();
+ private Map<String, String> tags = new HashMap<String, String>();
public Pattern initPattern() throws MalformedPatternException {
// return compiler.compile("(?s)<%.*?%>");
// return compiler.compile("(?s)<%(--)?.*?\\1%>");
- return compiler.compile("(?s)(<%--.*?--%>)|(<%.*?%>)");
+ return getCompiler().compile("(?s)(<%--.*?--%>)|(<%.*?%>)");
}
public String highlightJavaKeyword(String java) {
- return util.substitute("s/(\\bassert\\b|break\\b|\\bbyte\\b|\\bboolean\\b" +
- "|\\bcatch\\b|\\bcase\\b|\\bchar\\b|\\bcontinue\\b|\\bdouble\\b" +
- "|\\bdo\\b|\\belse\\b|\\bextends\\b|\\bfalse\\b|\\bfinal\\b" +
- "|\\bfloat\\b|\\bfor\\b|\\bfinally\\b|\\bif\\b|\\bimplements\\b" +
- "|\\bint\\b|\\binterface\\b|\\binstanceof\\b|\\blong\\b|\\blength\\b" +
- "|\\bnew\\b|\\bnull\\b|\\bprivate\\b|\\bprotected\\b|\\bpublic\\b" +
- "|\\breturn\\b|\\bswitch\\b|\\bsynchronized\\b|\\bshort\\b" +
- "|\\bstatic\\b|\\bsuper\\b|\\btry\\b|\\btrue\\b|\\bthis\\b" +
- "|\\bthrow\\b|\\bthrows\\b|\\bvoid\\b|\\bwhile\\b)" +
- "/<span class=\"keyword\">$1<\\/span>/g", java);
+ return getUtil().substitute("s/(\\bassert\\b|break\\b|\\bbyte\\b|\\bboolean\\b"
+ + "|\\bcatch\\b|\\bcase\\b|\\bchar\\b|\\bcontinue\\b|\\bdouble\\b"
+ + "|\\bdo\\b|\\belse\\b|\\bextends\\b|\\bfalse\\b|\\bfinal\\b"
+ + "|\\bfloat\\b|\\bfor\\b|\\bfinally\\b|\\bif\\b|\\bimplements\\b"
+ + "|\\bint\\b|\\binterface\\b|\\binstanceof\\b|\\blong\\b|\\blength\\b"
+ + "|\\bnew\\b|\\bnull\\b|\\bprivate\\b|\\bprotected\\b|\\bpublic\\b"
+ + "|\\breturn\\b|\\bswitch\\b|\\bsynchronized\\b|\\bshort\\b"
+ + "|\\bstatic\\b|\\bsuper\\b|\\btry\\b|\\btrue\\b|\\bthis\\b"
+ + "|\\bthrow\\b|\\bthrows\\b|\\bvoid\\b|\\bwhile\\b)"
+ + "/<span class=\"keyword\">$1<\\/span>/g", java);
}
public String convertMatch(String fragment) {
@@ -75,14 +77,14 @@
tag = highlightJavaKeyword(tag);
tag = "<span class=\"jsp-tag\">" + tag + "</span>";
} else {
- log.error("error: " + fragment);
+ LOG.error("error: " + fragment);
}
tags.put(key, tag);
return "${" + key + "}";
}
public String convert(String input) {
- String result;// = StringUtils.replace(input, "$", "$$");
+ String result; // = StringUtils.replace(input, "$", "$$");
result = super.convert(input);
result = tagConverter.convert(result);
StringExpression stringExpression = new StringExpression(result);
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/StringExpression.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created on: Apr 10, 2002, 11:04:12 PM
* $Id: StringExpression.java,v 1.1.1.1 2004/04/15 18:40:59 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
import org.apache.commons.logging.Log;
@@ -46,13 +48,13 @@
return string;
}
- public String substitute(Map<String,String> variables) {
+ public String substitute(Map<String, String> variables) {
return replaceVariables(string, variables);
}
// implementation copied from ant.ProjectHelper
private static String replaceVariables(
- String stringExpression, Map<String,String> variables) {
+ String stringExpression, Map<String, String> variables) {
if (stringExpression == null) {
return null;
}
@@ -112,7 +114,7 @@
}
public static void main(String[] args) {
- Map<String,String> env = new HashMap<String, String>();
+ Map<String, String> env = new HashMap<String, String>();
env.put("v1", "var1");
env.put("v2", "var2");
String expression = "bla${v1}blup${v2}";
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java?rev=374936&r1=374935&r2=374936&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/jsp/TagConverter.java Sat Feb 4 13:47:46 2006
@@ -1,23 +1,25 @@
+package org.apache.myfaces.tobago.example.demo.jsp;
+
/*
* Copyright 2002-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.
+ *
+ * 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.
*/
+
/*
* Created on: 02.09.2002, 23:40:26
* $Id: TagConverter.java,v 1.1.1.1 2004/04/15 18:41:00 idus Exp $
*/
-package org.apache.myfaces.tobago.example.demo.jsp;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.Pattern;
@@ -25,17 +27,16 @@
public class TagConverter extends AbstractConverter {
public Pattern initPattern() throws MalformedPatternException {
- return compiler.compile("(?s)<.*?>");
+ return getCompiler().compile("(?s)<.*?>");
}
public String convertMatch(String fragment) {
// String escaped = XmlUtils.escape(fragment);
- String withLinks = util.substitute(
- "s/^<jsp:include page=\\\"([\\-\\.\\/\\w]+)" +
- "/<jsp:include page=\\\"<a href='viewSource.jsp?jsp=$1'>$1<\\/a>/", fragment);
+ String withLinks = getUtil().substitute("s/^<jsp:include page=\\\"([\\-\\.\\/\\w]+)"
+ + "/<jsp:include page=\\\"<a href='viewSource.jsp?jsp=$1'>$1<\\/a>/", fragment);
- String escaped = util.substitute("s/^(<\\/?)(\\w+):/$1<b>$2<\\/b>:/", withLinks);
+ String escaped = getUtil().substitute("s/^(<\\/?)(\\w+):/$1<b>$2<\\/b>:/", withLinks);
escaped = highlightStrings(escaped);
return "<span class=\"html-tag\"><" + escaped.substring(1, escaped.length()-1) + "></span>";
}