Hallo
This one drives me crazy.
(5.2.9)
I have a edit-form(recordview), with an tabpanel containing 2 related forms.
The edit-form is started from an select-form(table-view) with doubleclick:
forms.Pflege_Fragen.controller.show(‘Pflege_Fragen’,true);
The edit-form has a close-button where i do:
function m_form_ende()
{
globals.g_close_gedrueckt = "J";
databaseManager.rollbackEditedRecords();
application.closeForm(forms.Pflege_Fragen);
}
Everything OK! Back to select-form!
After deleting a record in the edit-form i also want to go back to the select-form.
Delete-button with:
function m_loeschen()
{
var vok = "NEIN";
vok = globals.DIALOGS.showInfoDialog("HALLO","Wollen Sie die Frage '"+fid+"' wirklich löschen?",'NEIN','OK');
if (vok == 'OK')
{
var success = foundset.deleteRecord();
globals.g_close_gedrueckt = "J";
application.closeForm(forms.Pflege_Fragen);
}
else
{
return;
}
}
The question(from mod_dialogs) is shown, record is deleted but:
Then another record is automaticly shown (with all its related infos))???
The edit-form doesn’t close (or is automaticly restarted)???
Even when coding ‘m_form_ende();’ immediatly after ‘var success = foundset.deleteRecord()’ the edit-form shows another record.
What do i miss??
Regards
Albert
Bin ratlos.
Wer hilft?
Gruss
Albert
so you show forms.Pflege_Fragen in a dialog with the name “Pflege_Fragen”
then your closeForm() call is a bit weird that should be " application.closeForm(“Pflege_Fragen”);
But don’t know if that is really the problem, is onhide on your edit form? does that return true? (not false)
Hello Johan
Now i do:
var success = foundset.deleteRecord();
globals.g_close_gedrueckt = “J”;
application.closeForm(‘Pflege_Fragen’);
No success!!
There was a function onHide:
if (globals.g_close_gedrueckt == “N”)
{
return false;
}
I don’t want to enable closing with “X”! Therefor i have globals.g_close_gedrueckt = N as default and set i to ‘J’ before closing with close-button and closing form after delete.
I set onhide to none.
No success!! Same behavior.
But i wasn’t correct in my description:
The form is not closed, another record is shown but the related records for this record are not shown in the tabpanel !!
Error calling server:
2011-08-05 11:05 http-8080-5 WARN org.apache.wicket.request.target.component.listener.BehaviorRequestTarget behavior not enabled; ignoring call. behavior: com.servoy.j2db.server.headlessclient.MainPage$1@129d69e at index: 1 on component: [Page class = com.servoy.j2db.server.headlessclient.MainPage, id = 5, version = 0, ajax = 6]
The record which is show is always the previous one from the select form.
Regards
Albert
so you get “error calling server” in the browser?
Then something goes wrong, if you try another browser does it work there?
Else make a sample and attach it to a case.
Hello
All forms now have onHide = none (pfege_fragen+ 2 related forms in tabpanel)
No more errors!
But the form is not closed, the next record is loaded with the correct related forms.
I tried forms.Pflege_Fragen.m_form_ende() and application.closeform(‘Pflege_Fragen’) immediatly after var success = foundset.deleteRecord();
Same result.
Only clicking on the close-button or “X” closes the form ???
Regards
Albert
as a said, make a sample and attach that to case.
Hello
Sorry, as a newbee i don’t know how to make a sample.
I can export the solution. But what about data. (the user data is in an Mysql-Database on another server).
To get this running we would need more then 5 tables.
Selection form has logic (getdatasetbyquery)to build individuall valuelists for comboboxes in search form.
Form with records found has valuelists filled with getdatasetbyquery to show names instead of id’s.
Form Fflege_Fragen has datacource a, and of course the 2 related forms have 2 other different datasources.
???
If only the form/s is/are needed how to copy the form/s into a sample solution.
Regards
Albert
You can export with data, but the best thing is to use also sample data in a sample solution,
Can you for example rebuild what you have with our example database we ship?