Re: ModalWindow question

2010-10-18 Thread drf

Neither of the suggested solutions will work:

1) The Cookie idea relies on session timeout - or some timeout - which is
not relevant here. The user could click the back button and then straight
away select a menu item.

2) Clearing the value in the Wicket Session from the constructor of the page
the user returns to with the back button also will not work. The page is
stored in the cache and will be rendered by the browser without any Wicket
intervention - no java will be invoked.

There must be a Wicket-y way of doing this. Can anyone else help or advise -
thanks!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-question-tp2999304p3001005.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



ModalWindow question

2010-10-17 Thread drf

Does anyone have ideas on how to handle the following issue:

During processing of a wizard, I store a boolean flag in the Session object
to indicate that the wizard has not completed. If, during the course of the
wizard, the user clicks on another menu item, the flag in the session is
checked, and accordingly a modal window will appear asking the user to
confirm that they do indeed wish to exit the wizard. This works well.

The problem is, if the user clicks the back button and in effect exits the
wizard that way, the flag in the session is still set, and later when the
user clicks on a menu link the modal will appear - not good.
What is a better way to do this? I thought about disabling the back button,
but that seems to be bad practice (correct?), certainly not what the user
expects.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-question-tp2999304p2999304.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ModalWindow question

2010-10-17 Thread Martin Grigorov
what about storing the flag as a cookie ?
one stored it will be there for the session timelife

On Sun, Oct 17, 2010 at 9:25 PM, drf davidrfi...@gmail.com wrote:


 Does anyone have ideas on how to handle the following issue:

 During processing of a wizard, I store a boolean flag in the Session object
 to indicate that the wizard has not completed. If, during the course of the
 wizard, the user clicks on another menu item, the flag in the session is
 checked, and accordingly a modal window will appear asking the user to
 confirm that they do indeed wish to exit the wizard. This works well.

 The problem is, if the user clicks the back button and in effect exits the
 wizard that way, the flag in the session is still set, and later when the
 user clicks on a menu link the modal will appear - not good.
 What is a better way to do this? I thought about disabling the back button,
 but that seems to be bad practice (correct?), certainly not what the user
 expects.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-question-tp2999304p2999304.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: ModalWindow question

2010-10-17 Thread Martin Makundi
Maybe you can clear the session object in the previous screen (the
page that renders as result of Back button)?

**
Martin

2010/10/17 drf davidrfi...@gmail.com:

 Does anyone have ideas on how to handle the following issue:

 During processing of a wizard, I store a boolean flag in the Session object
 to indicate that the wizard has not completed. If, during the course of the
 wizard, the user clicks on another menu item, the flag in the session is
 checked, and accordingly a modal window will appear asking the user to
 confirm that they do indeed wish to exit the wizard. This works well.

 The problem is, if the user clicks the back button and in effect exits the
 wizard that way, the flag in the session is still set, and later when the
 user clicks on a menu link the modal will appear - not good.
 What is a better way to do this? I thought about disabling the back button,
 but that seems to be bad practice (correct?), certainly not what the user
 expects.
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-question-tp2999304p2999304.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ModalWindow - Question

2010-07-07 Thread Alis

Hello Martin, i´m use dialog(name ModalWindow).close(target)...thank you!
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-Question-tp2279695p2280890.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



ModalWindow - Question

2010-07-06 Thread Alis


Hello! i´m done a ModalWindow the question, where it's show two button: yes
/ no. When the user do click the button,  i done a close the ModalWindow and
have a error.

Help me!


  AjaxButton yesB= new AjaxButton(YesButton){
public void onSubmit(AjaxRequestTarget target, Form form){
confirm.setAnswer(true);
AjaxRequestTarget art = AjaxRequestTarget.get();
if (art != null) {
dialog.close(target);
   }
   
};


};

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/ModalWindow-Question-tp2279695p2279695.html
Sent from the Wicket - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ModalWindow - Question

2010-07-06 Thread Martin Makundi
why not use close(target)?

**
Martin

2010/7/6 Alis ajcalve...@yahoo.es:


 Hello! i´m done a ModalWindow the question, where it's show two button: yes
 / no. When the user do click the button,  i done a close the ModalWindow and
 have a error.

 Help me!


  AjaxButton yesB= new AjaxButton(YesButton){
            public void onSubmit(AjaxRequestTarget target, Form form){
                confirm.setAnswer(true);
                AjaxRequestTarget art = AjaxRequestTarget.get();
                if (art != null) {
                        dialog.close(target);
               }

            };


        };

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/ModalWindow-Question-tp2279695p2279695.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



ModalWindow question

2007-11-01 Thread Doug Leeper

I would like to use a ModalWindow to prompt for a choice of action for the
user.

Upon selecting the choice, I would like to close the ModalWindow then
redirect the user to a page based on the selected choice.

I know you can use setResponsePage in the Link on the ModalWindow page...so
how would one go about doing this?

Thanks in advance,
- Doug
-- 
View this message in context: 
http://www.nabble.com/ModalWindow-question-tf4731828.html#a13530210
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: ModalWindow question

2007-11-01 Thread Doug Leeper

Thanks Stefan.

I figured that this is what I was left with...had to wait to the
onWindowCloseCallback to handle the user action properly.  

I was hoping for a more elegant (already built) means to be able to pass
back to the calling ModalWindow to identify what action was performed. 
But since I was not able to find anything, I did the following:

1) Created a ModalWindowCallbackState

public class ModalWindowCallbackState implements Serializable {
public Object value;
}

2) Passed that into my displayed component in the ModalWindow

final ModalWindowCallbackState callbackState = new
ModalWindowCallbackState();

...

successWindow.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
return new SuccessConfirmation(successWindow, callbackState);
}
});


3)  Check the callback state in the onWindowClosedCallback

successWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
{
public void onClose(AjaxRequestTarget target) {
if ( callbackState.value == null || callbackState.value.equals( 
/* Cancel
*/ ) {
setResponsePage( /* CancelPage */ );
}
else if ( callbackState.value.equals( /* ACTION FOO */)) {
setResponsePage(  /* FooPage */ );
}
...
} );
-- 
View this message in context: 
http://www.nabble.com/ModalWindow-question-tf4731828.html#a13532596
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]