Probably a bug in JHeadstart
76334Jan 10 2005 — edited Feb 16 2005Hi everybody
We have stuck in a odd situation which looks like a bug. We have master/detail tables
and have created a master/detail form using jheadstart 9.0.5.1 (UIX/Struts/BC4J) with
samePage=false and layoutStyle=table. On the other hand, we use Headstart to
implement CDM Rule Frame and have created a change event rule on the master table
to insert some records into the detail table during the insert into master table base on
some information in the master record. It is very helpful, because there is no need for
user to insert many records in the detail table and the user is supposed to update only
one nullable field of these previously inserted records.
When the user create a record in the master page, all related records are inserted
automatically and when the user see the detail page (in other page because samePage
set to false) everything is fine. Now, if the user updates the demanded field in all
the previously inserted records and saves them and goes back to the master page for repeating
the scenario and create a new master record, the detail link will not be enabled to allow user
to update the detail page. It is very strange, because if the user do not update the
demanded field in all the detail records, this situation will not happen, but if the user
updated all records he/she will stick in this odd situation.
I have tried this scenario with both OC4J 9.0.3 and 9.0.4 and this situation always
occurs. Also, in order to decrease side effects of our codes, I have created a test
master/detail application on these 2 tables by using JHeadstart without any coding
and I have fallen again in this problem. I have found out that if I use layoutStyle=form
instead of table in the detail group, everything will be fine.Also, If I use samePage=true
it will work fine too.So, I think it must be a JHeadstart bug.
For finding a workaround, I have written an action which
inherits from jheadstart SaveDataObject and changed the execute method as following :
public ActionForward execute(JhsActionMapping mapping, SessionData sessionData, ActionForm form) throws UserException, Exception
{
ActionForward af = super.execute(mapping, sessionData, form);
String s1 = af.getName() ;
if ( s1.equals("success") == true )
{
DataObject dataObject = (DataObject) sessionData.getAttribute(mapping.getDataObjectName());
dataObject.addTransientAttribute("isInserting" , Boolean.FALSE );
dataObject.addTransientAttribute("isNotInserting" , Boolean.TRUE );
}
return af ;
}
Now, using my action instead of SaveDataObject in saving master record, I have fallen in
another odd situation in which after creating a record in the master form for the second
time, the detail link become enable and the user can go to the detail form but no record
is shown in the detail page, although the required detail records have inserted successfully
in detail table which can see by using SQL Plus.
Could anybody help me? Is there any workaround to overcome this problem?
Any help would be really appreciated