Bug 104186 - ContentGroup forms has problems with visibility
Summary: ContentGroup forms has problems with visibility
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
(Show other bugs)
Version: nightly
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Randy Graebner
QA Contact: Jon Orris
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 100952
TreeView+ depends on / blocked
 
Reported: 2003-09-10 22:36 UTC by Randy Graebner
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-15 18:02:02 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Randy Graebner 2003-09-10 22:36:50 UTC
Description of problem:
After adding or removing an item from the ContentGroup form the process listener
on the form is correctly run however, the visibility is not changed back to the
property sheet since the data is not valid.  The data is not valid because the
SearchForm in cms has a validation that fires and fails.  However, this
validation listener should not be firing since the form is not displayed on the
screen (but is still technically visible).  This if fixed with the below patch:


diff -u cms/src/com/arsdigita/cms/ui/SearchForm.java
intragroupe/src/com/arsdigita/cms/ui/SearchForm.java 
--- cms/src/com/arsdigita/cms/ui/SearchForm.java	Wed Sep 10 18:30:09 2003
+++ intragroupe/src/com/arsdigita/cms/ui/SearchForm.java	Wed Sep 10 18:28:55 2003
@@ -220,13 +219,16 @@
 
     private class TermValidator implements ParameterListener {
         public void validate(ParameterEvent e) {
-            ParameterData pd = e.getParameterData();
-            String terms = (String) m_terms.getValue(e.getPageState());
-            if (terms == null || terms.trim().equals("")) {
-                pd.addError(globalize("cms.ui.search_errors.empty_terms"));
-            } else {
-                SearchForm.this.validate(pd, terms);
-            }
+            PageState state = e.getPageState();
+            if (isVisible(state) && getSubmit().isSelected(state)) {
+                ParameterData pd = e.getParameterData();
+                String terms = (String) m_terms.getValue(e.getPageState());
+                if (terms == null || terms.trim().equals("")) {
+                    pd.addError(globalize("cms.ui.search_errors.empty_terms"));
+                } else {
+                    SearchForm.this.validate(pd, terms);
+                } 
+            } 
         }
     }
 
Version-Release number of selected component (if applicable):
6.0 

How reproducible:
Always

Steps to Reproduce:
1.  Create an item with a ContentGroup and try to add an item using the
ItemSearchWidget and notice that the item is added but you remain on the form.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Archit Shah 2003-10-21 17:37:24 UTC
fixed at @37212. this problem does not apply to the trunk because of changes in
search.

Comment 2 Jon Orris 2003-12-15 17:32:22 UTC
Leaving to PS to fully verify.

Comment 3 Randy Graebner 2003-12-15 18:02:02 UTC
This fix works with the Carrefour implementation (I removed my copy
and sync'd to 37212 and verified). 


Note You need to log in before you can comment on or make changes to this bug.