[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Yes/No/Cancel Listener?  XML
Forum Index -> Development
Author Message
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

I have the following problem:

I want to open a Yes/No/Cancel popup after the user clicked to some other line in the grid and ask him, if he/she wants to save the changes of the details page. I can react on yes and no, that's fine. But the problem is that I can not react on cancel. Since the client components already selects the other line, but I want to "reselect" the old line if the user presses cancel.

Any chance to provide some other listener interface which provides the possibility to react on cancel?

Tobias
CaptainCasa

Power User
[Avatar]

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

...no problem, we just updated as follows:

Code:
     public static interface IYesNoListener
     {
         public void reactOnYes();
         public void reactOnNo();
     }
     
     public static interface IYesNoCancelListener extends IYesNoListener
     {
         public void reactOnCancel();
     }
 


and...:

Code:
     public void onYes(ActionEvent ae)
     {
         m_yesNoListener.reactOnYes();
         m_modalPopup.close();
         ...
     }
 
     public void onNo(ActionEvent ae)
     {
         m_yesNoListener.reactOnNo();
         m_modalPopup.close();
         ...
     }
 
     public void onCancel(ActionEvent ae)
     {
         if (m_yesNoListener instanceof IYesNoCancelListener)
             ((IYesNoCancelListener)m_yesNoListener).reactOnCancel();
         m_modalPopup.close();
         ...
     }
 


...available "on request"...

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team