Bug 104186 - ContentGroup forms has problems with visibility
ContentGroup forms has problems with visibility
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Randy Graebner
Jon Orris
:
Depends On:
Blocks: 100952
  Show dependency treegraph
 
Reported: 2003-09-10 18:36 EDT by Randy Graebner
Modified: 2007-04-18 12:57 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Randy Graebner 2003-09-10 18:36:50 EDT
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 13:37:24 EDT
fixed at @37212. this problem does not apply to the trunk because of changes in
search.
Comment 2 Jon Orris 2003-12-15 12:32:22 EST
Leaving to PS to fully verify.
Comment 3 Randy Graebner 2003-12-15 13:02:02 EST
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.