portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r773028 - in /portals/jetspeed-2/applications/j2-admin/trunk/src: main/java/org/apache/jetspeed/portlets/profiler/ main/resources/org/apache/jetspeed/portlets/profiler/ main/resources/org/apache/jetspeed/portlets/profiler/resources/ webapp/...
Date Fri, 08 May 2009 15:11:48 GMT
Author: vkumar
Date: Fri May  8 15:11:48 2009
New Revision: 773028

URL: http://svn.apache.org/viewvc?rev=773028&view=rev
Log:
Fixing validation issue profiler portlet
Adding context param for wicket to run in production mode

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin$RuleEditPanel.html
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/resources/ProfilerResources.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/webapp/WEB-INF/web.xml

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin.java?rev=773028&r1=773027&r2=773028&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin.java
Fri May  8 15:11:48 2009
@@ -21,6 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.jetspeed.portlets.AdminPortletWebPage;
 import org.apache.jetspeed.profiler.Profiler;
 import org.apache.jetspeed.profiler.ProfilerException;
@@ -172,7 +173,7 @@
             ruleEditForm.add(new Label("ruleClassLabel", new ResourceModel("profiler.rule.class")));
             
             ruleIdField = new TextField("ruleIdField", new PropertyModel(WicketProfilerAdmin.this,
"profilingRule.id"));
-            ruleIdField.setRequired(true);
+            ruleIdField.setRequired(true);            
             ruleIdField.add(new ProfileRuleValidator());
             
             TextField ruleTitleField = new TextField("ruleTitleField", new PropertyModel(WicketProfilerAdmin.this,
"profilingRule.title"));
@@ -190,6 +191,7 @@
                         if (!getRules().contains(profilingRule)) {
                             getRules().add(profilingRule);
                         }
+                        ruleIdFieldReadOnly(true);
                     } catch (ProfilerException e) {
                         logger.error("Failed to update rule: " + profilingRule, e);
                     }
@@ -274,6 +276,13 @@
 
                 @Override
                 public void onSubmit() {
+                    
+                    if(StringUtils.isEmpty(getProfilingRule().getId()))
+                    {
+                        error(getLocalizer().getString("ruleIdField.Required",this));
+                        return;
+                    }
+                    
                     Profiler profiler = getServiceLocator().getProfiler();
                     try {
                         criterion = profiler.createRuleCriterion();
@@ -285,7 +294,9 @@
                 }
                 
             };
-            ruleEditForm.add(newCriterionButton);
+            Form criterionForm = new Form("criterionForm");
+            criterionForm.add(newCriterionButton);
+            add(criterionForm);
             
             setCriterion(null);
             criterionEditPanel = new CriterionEditPanel("criterionEditPanel");

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin$RuleEditPanel.html
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin%24RuleEditPanel.html?rev=773028&r1=773027&r2=773028&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin$RuleEditPanel.html
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/WicketProfilerAdmin$RuleEditPanel.html
Fri May  8 15:11:48 2009
@@ -50,16 +50,17 @@
 	        </table>
 	        
 	        <span wicket:id="ruleCriteriaLabel">rule criteria</span>
-	        <table wicket:id="ruleCriteriaTable" cellpadding="2"></table>
-	
-	        <input type="submit" wicket:id="newCriterionButton"/>
-	        
-            
+	        <table wicket:id="ruleCriteriaTable" cellpadding="2"></table>		    
   	                  
 	        
 	        <input type="submit" wicket:id="ruleSaveButton"/>
 	        <input type="submit" wicket:id="ruleRemoveButton"/>
 	        
 	    </form>
+	    
+	    <form wicket:id="criterionForm">
+	    	<input type="submit" wicket:id="newCriterionButton"/>
+	    </form>
+	    
 	    <div wicket:id="criterionEditPanel">criterionEditPanel</div>
     </div>
 </wicket:panel>
\ No newline at end of file

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/resources/ProfilerResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/resources/ProfilerResources.properties?rev=773028&r1=773027&r2=773028&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/resources/ProfilerResources.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/profiler/resources/ProfilerResources.properties
Fri May  8 15:11:48 2009
@@ -31,4 +31,5 @@
 criterion.fallback.order=Order
 criterion.resolver=Resolver Type
 criterion.fallback.type=Fallback
+ruleIdField.Required=RuleId is required field.
 WicketProfilerAdmin$ProfileRuleValidator= Rule already exits
\ No newline at end of file

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/webapp/WEB-INF/web.xml?rev=773028&r1=773027&r2=773028&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/webapp/WEB-INF/web.xml (original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/webapp/WEB-INF/web.xml Fri May  8 15:11:48
2009
@@ -31,6 +31,12 @@
         <param-name>com.ibm.ws.webcontainer.invokefilterscompatibility</param-name>
         <param-value>true</param-value>
     </context-param>
+
+    <!-- Wicket configuration to run in deployment mode -->
+    <context-param>
+      <param-name>configuration</param-name>
+      <param-value>deployment</param-value>
+    </context-param>
     
     <context-param>
 		<param-name>webAppRootKey</param-name>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message