Author: jdonnerstag
Date: Fri Mar 25 07:48:41 2011
New Revision: 1085272

URL: http://svn.apache.org/viewvc?rev=1085272&view=rev
Log:
rename Markup.get(String) to .of(String)

Modified:
    
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java
    wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/Markup.java
    
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_3.java
    
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java?rev=1085272&r1=1085271&r2=1085272&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java
 (original)
+++ 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/IMarkupResourceStreamProvider.java
 Fri Mar 25 07:48:41 2011
@@ -23,6 +23,9 @@ import org.apache.wicket.util.resource.I
  * To be implemented by MarkupContainer which wish to implement their own 
algorithms for loading the
  * markup resource stream.
  * <p>
+ * Since 1.5 you may also use Component.setMarkup() or getMarkup() to attach 
Markup to your
+ * component.
+ * <p>
  * Note: IResourceStreamLocators should be used in case the strategy to find a 
markup resource is
  * meant to be applied to ALL components of your application.
  * <p>

Modified: 
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/Markup.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/Markup.java?rev=1085272&r1=1085271&r2=1085272&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/Markup.java 
(original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/Markup.java 
Fri Mar 25 07:48:41 2011
@@ -55,10 +55,15 @@ public class Markup implements IMarkupFr
 
        /**
         * Take the markup string, parse it and return the Markup (list of 
MarkupElements).
+        * <p>
+        * Limitation: Please note that MarkupFactory is NOT used and thus no 
caching is used (which
+        * doesn't matter for Strings anyway), but what might matter is that 
your own MarkupFilters are
+        * not applied, which you might have registered with MarkupFactory.
+        * 
         * @param markup
         * @return Markup
         */
-       public static Markup get(final String markup)
+       public static Markup of(final String markup)
        {
                try
                {

Modified: 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_3.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_3.java?rev=1085272&r1=1085271&r2=1085272&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_3.java
 (original)
+++ 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePage_3.java
 Fri Mar 25 07:48:41 2011
@@ -47,7 +47,7 @@ public class SimplePage_3 extends Simple
        @Override
        public IMarkupFragment getMarkup()
        {
-               return Markup.get("<html xmlns:wicket><body>" //
+               return Markup.of("<html xmlns:wicket><body>" //
                        + "<span wicket:id='myLabel'>mein Label</span>" //
                        + "<span wicket:id='test'>body</span>" //
                        + "<span wicket:id='myPanel'>panel</span>" //

Modified: 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java?rev=1085272&r1=1085271&r2=1085272&view=diff
==============================================================================
--- 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
 (original)
+++ 
wicket/trunk/wicket-core/src/test/java/org/apache/wicket/markup/html/page/SimplePanel.java
 Fri Mar 25 07:48:41 2011
@@ -44,6 +44,6 @@ public class SimplePanel extends Panel
        @Override
        public IMarkupFragment getMarkup()
        {
-               return Markup.get("<wicket:panel><span 
wicket:id='label'></span></wicket:panel>");
+               return Markup.of("<wicket:panel><span 
wicket:id='label'></span></wicket:panel>");
        }
 }


Reply via email to