Bug 109978

Summary: The super type for WidgetLabel type in PDL doesn't correspond with supertype is Java domain class
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel BerrangĂ© <berrange>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-10 20:10:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100952, 109973    

Description Daniel Berrangé 2003-11-13 16:49:36 UTC
Description of problem:
The super type of WidgetLabel in the PDL is 'Widget'. The super class
of WidgetLabel in Java is 'Component'. The Java is correct & when you
attempt to save a WidgetLabel object, it obviously complains that the
property 'parameterName' (which is from Widget) is missing. The SQL
create table statement is also incorrectly referencing bebop_widgets
rather than bebop_components.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a form
2. Try and add a 'Text field' to it
3.
  
Actual results:
com.redhat.persistence.FlushException: Unable to send all events to
database for object [com.arsdigita.formbuilder.WidgetLabel:{id=13003}]
because these required properties are null:
 [com.arsdigita.formbuilder.WidgetLabel:{id=13003}].parameterName
        at com.redhat.persistence.Session.assertFlushed(Session.java:463)
        at
com.arsdigita.persistence.DataObjectImpl.assertFlushed(DataObjectImpl.java:439)
        at
com.arsdigita.persistence.DataObjectImpl.save(DataObjectImpl.java:422)
        at com.arsdigita.domain.DomainObject.save(DomainObject.java:315)
        at
com.arsdigita.formbuilder.ui.editors.WidgetLabelForm.addToForm(WidgetLabelForm.java:144)
        at
com.arsdigita.formbuilder.ui.editors.WidgetForm$WidgetFormProcessListener.process(WidgetForm.java:282)
        at
com.arsdigita.bebop.FormSection.fireProcess(FormSection.java:490)
        at com.arsdigita.bebop.FormSection$4.process(FormSection.java:464)
        at
com.arsdigita.bebop.FormModel.fireFormProcess(FormModel.java:475)
        at com.arsdigita.bebop.FormModel.process(FormModel.java:342)
        at com.arsdigita.bebop.Form.process(Form.java:440)
        at com.arsdigita.bebop.Form.respond(Form.java:281)
        at com.arsdigita.bebop.PageState.respond(PageState.java:367)
        at com.arsdigita.bebop.Page.process(Page.java:701)
        at com.arsdigita.bebop.Page.process(Page.java:683)
        at com.arsdigita.bebop.Page.buildDocument(Page.java:737)
        at
com.arsdigita.cms.dispatcher.CMSPage$1.excurse(CMSPage.java:280)
        at com.arsdigita.cms.CMSExcursion$1.excurse(CMSExcursion.java:80)
        at
com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
        at com.arsdigita.cms.CMSExcursion.run(CMSExcursion.java:75)
        at com.arsdigita.cms.dispatcher.CMSPage.dispatch(CMSPage.java:294)
        at
_packages._content_22dsection._www._admin._item__jsp._jspService(_item__jsp.java:61)


Expected results:
The text field is added.

Additional info:
The following two patches fix it

dan@camden$ P4DIFF="diff -ub" p4 diff core/pdl/...
====
//core-platform/dev/pdl/com/arsdigita/formbuilder/WidgetLabel.pdl#5 -
/var/ccm-devel/dev/dan/aplaws-rickshaw/core/pdl/com/arsdigita/formbuilder/WidgetLabel.pdl
====
--- /tmp/tmp.12783.0    Thu Nov 13 16:49:47 2003
+++
/var/ccm-devel/dev/dan/aplaws-rickshaw/core/pdl/com/arsdigita/formbuilder/WidgetLabel.pdl
  Thu Nov 13 16:31:32 2003
@@ -16,7 +16,7 @@
 
 model com.arsdigita.formbuilder;
 
-object type WidgetLabel extends Widget {
+object type WidgetLabel extends Component {
     BigDecimal[1..1] widgetId = forms_widget_label.widget_id INTEGER;
 
     reference key (forms_widget_label.label_id);
dan@camden$ P4DIFF="diff -ub" p4 diff core/sql/...
====
//core-platform/dev/sql/ccm-core/default/formbuilder/table-forms_widget_label.sql#1
-
/var/ccm-devel/dev/dan/aplaws-rickshaw/core/sql/ccm-core/default/formbuilder/table-forms_widget_label.sql
====
--- /tmp/tmp.12786.0    Thu Nov 13 16:49:55 2003
+++
/var/ccm-devel/dev/dan/aplaws-rickshaw/core/sql/ccm-core/default/formbuilder/table-forms_widget_label.sql
  Thu Nov 13 16:46:18 2003
@@ -17,7 +17,7 @@
 create table forms_widget_label (
     label_id integer
         constraint forms_wgt_label_label_id_fk
-        references bebop_widgets (widget_id)
+        references bebop_components (component_id)
         constraint forms_wgt_label_label_id_pk primary key,
     widget_id integer
         constraint forms_wgt_label_widget_id_fk
dan@camden$

Comment 1 Daniel Berrangé 2003-11-13 18:59:15 UTC
Fixed on dev in p4 37978.

This mailing list thread indicates a similar fix & shows we needs to
port it back to Troika

https://listman.redhat.com/archives/redhat-ccm-list/2003-September/msg00105.html



Comment 2 Archit Shah 2003-11-18 21:46:39 UTC
applied to 6.0.x (38130)