[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
closeForced vs. closeSupported  XML
Forum Index -> Development
Author Message
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi Björn

With CC version 20190820, I have detected a different behavior of WorkpageContainer's method closeAllWorkpages() that should force the closing of all workpages. Now the closing is prevented for wokpages with no close supported. A warning popup window is opened instead. This obeys to the following code in the private method removeWorkpageLOCAL(IWorkpage workpage, boolean withCloseForced, Runnable continueOperation):

if (workpage.isCloseSupported() == false)
{
OKPopup.createInstance(I18N.getString("WP_titleWorkpageCannotBeClosed"),I18N.getString("WP_textWorkpageCannotBeClosed"));
return true;
}

I would expect the clause to be (workpage.isCloseSupported() == false) && (withCloseForced == false).

Otherwise, I must workaround by setting for every workpage isCloseSupported = true before calling closeAllWorkpages().

Can you please take a look at it?

Regards, Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi Daniel,

we treted the bahavior as bug: a page says "closeSupported = false" and then you can close by API... But I agree: your intentaon of using "closeSupported = false" is, that there is no renderening of corresponding icons + that you do the closing via your code internally (using the API).

We will provide some solution on this with next update, so that we internally know if some API was called by own processing (=> we will never close a page with closeSupported = true) or by "outside" processing (=> if someone calls the processing: do it!). Should be part of next update.

Thansk + Regards! Björn


Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi Björn

I have verified CC version 20191120_2.
On the one hand, the warning popup is not opened anymore.
But, on the other hand, the closing is still prevented for pages with no close supported.

So I have to maintain the workaround described previously.

Could you please check?

Kind regards, Daniel
[WWW]
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi Björn

I want to download a new CC version because of a couple of issues you resolved. Unfortunately this one is still missing to be solved, I am waiting for it. I would appreciate this issue beeing checked.

Kind regards, Daniel
[WWW]
Admin

Power User

Joined: 21/11/2007 11:36:10
Messages: 38
Offline

Hi Daniel,

sorry on this. To be honest, we had some problems to figure out if a call is coming from outside or if it is some internal call...

What we now provide: a new method on IWorkpageContainer:

Code:
     public void closeWorkpage(IWorkpage workpage, boolean alsoCloseWorkpageWithNoCloseSupported);
     public void closeWorkpageForced(IWorkpage workpage, boolean alsoCloseWorkpageWithNoCloseSupported);
 


So you can explicitly control if you want to override the default behavior of not deleting these pages.

Is available with next update (expected for tomorrow morning).

Thanks + Regards! Björn
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team