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 2012/02/21 22:24:01 UTC

svn commit: r1292039 - in /myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago: context/MarkupEditor.java layout/MeasureEditor.java

Author: bommel
Date: Tue Feb 21 21:24:01 2012
New Revision: 1292039

URL: http://svn.apache.org/viewvc?rev=1292039&view=rev
Log:
(TOBAGO-1095) JSP Tag should are more fault-tolerant for the type of markup and the type of measure

Added:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/MarkupEditor.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/MeasureEditor.java

Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/MarkupEditor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/MarkupEditor.java?rev=1292039&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/MarkupEditor.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/MarkupEditor.java Tue Feb 21 21:24:01 2012
@@ -0,0 +1,29 @@
+package org.apache.myfaces.tobago.context;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+import java.beans.PropertyEditorSupport;
+
+public class MarkupEditor extends PropertyEditorSupport {
+
+    @Override
+    public void setAsText(String text) throws IllegalArgumentException {
+        setValue(Markup.valueOf(text));
+    }
+
+}

Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/MeasureEditor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/MeasureEditor.java?rev=1292039&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/MeasureEditor.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/layout/MeasureEditor.java Tue Feb 21 21:24:01 2012
@@ -0,0 +1,29 @@
+package org.apache.myfaces.tobago.layout;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+import java.beans.PropertyEditorSupport;
+
+public class MeasureEditor extends PropertyEditorSupport {
+
+    @Override
+    public void setAsText(String text) throws IllegalArgumentException {
+        setValue(Measure.valueOf(text));
+    }
+
+}